From ac5220840933a0b83e44d70468fdc0772a7e50f8 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Fri, 28 Feb 2020 16:06:47 +0000 Subject: [PATCH] removed most of clang-tidy warnings, introduced logmap in asn1, fixed info object naming in s1ap and ngap for successful and unsuccessful outcomes --- lib/include/srslte/asn1/asn1_utils.h | 37 +- lib/include/srslte/asn1/ngap_nr_asn1.h | 952 +- lib/include/srslte/asn1/rrc_asn1.h | 20 +- lib/include/srslte/asn1/rrc_nr_asn1.h | 20 +- lib/include/srslte/asn1/s1ap_asn1.h | 754 +- lib/src/asn1/CMakeLists.txt | 8 +- lib/src/asn1/asn1_utils.cc | 159 +- lib/src/asn1/ngap_nr_asn1.cc | 13242 +++++++---------------- lib/src/asn1/rrc_asn1.cc | 3059 +++--- lib/src/asn1/rrc_asn1_enum.cc | 6602 ++++++----- lib/src/asn1/rrc_asn1_utils.cc | 5 +- lib/src/asn1/rrc_nr_asn1.cc | 5057 +++++---- lib/src/asn1/s1ap_asn1.cc | 12138 +++++++-------------- lib/test/asn1/ngap_asn1_test.cc | 10 +- lib/test/asn1/rrc_asn1_test.cc | 17 +- lib/test/asn1/s1ap_asn1_test.cc | 152 + lib/test/asn1/s1ap_test.cc | 4 +- srsenb/hdr/stack/enb_stack_lte.h | 1 - srsenb/src/stack/enb_stack_lte.cc | 8 - srsenb/src/stack/upper/s1ap.cc | 30 +- srsue/hdr/stack/ue_stack_lte.h | 2 - srsue/src/stack/ue_stack_lte.cc | 8 - 22 files changed, 15557 insertions(+), 26728 deletions(-) create mode 100644 lib/test/asn1/s1ap_asn1_test.cc diff --git a/lib/include/srslte/asn1/asn1_utils.h b/lib/include/srslte/asn1/asn1_utils.h index cadc68bf6..1b7728c1c 100644 --- a/lib/include/srslte/asn1/asn1_utils.h +++ b/lib/include/srslte/asn1/asn1_utils.h @@ -22,7 +22,7 @@ #ifndef SRSASN_COMMON_UTILS_H #define SRSASN_COMMON_UTILS_H -#include "srslte/common/log.h" +#include "srslte/common/logmap.h" #include #include #include @@ -46,20 +46,6 @@ constexpr Integer ceil_frac(Integer n, Integer d) return (n + (d - 1)) / d; } -/************************ - logging -************************/ - -using srsasn_logger_level_t = srslte::LOG_LEVEL_ENUM; -using srslte::LOG_LEVEL_DEBUG; -using srslte::LOG_LEVEL_ERROR; -using srslte::LOG_LEVEL_INFO; -using srslte::LOG_LEVEL_WARNING; - -void vlog_print(srslte::log* log_ptr, srsasn_logger_level_t log_level, const char* format, va_list args); -void srsasn_log_register_handler(srslte::log* ctx); -void srsasn_log_print(srsasn_logger_level_t log_level, const char* format, ...); - /************************ error handling ************************/ @@ -251,7 +237,7 @@ public: void push_back(const T& elem) { if (current_size >= MAX_N) { - srsasn_log_print(srslte::LOG_LEVEL_ERROR, "Maximum size %d achieved for bounded_array.\n", MAX_N); + srslte::logmap::get("ASN1")->error("Maximum size %d achieved for bounded_array.\n", MAX_N); } data_[current_size++] = elem; } @@ -614,8 +600,8 @@ public: fixed_octstring& from_string(const std::string& hexstr) { if (hexstr.size() != 2 * N) { - srsasn_log_print( - srslte::LOG_LEVEL_ERROR, "The provided hex string size is not valid (%d!=2*%d).\n", hexstr.size(), N); + srslte::logmap::get("ASN1")->error( + "The provided hex string size is not valid (%zd!=2*%zd).\n", hexstr.size(), (size_t)N); } else { string_to_octstring(&octets_[0], hexstr); } @@ -784,11 +770,8 @@ public: this_type& from_string(const std::string& s) { if (s.size() < lb or s.size() > ub) { - srsasn_log_print(srslte::LOG_LEVEL_ERROR, - "The provided string size=%zd is not withing the bounds [%d, %d]\n", - s.size(), - lb, - ub); + srslte::logmap::get("ASN1")->error( + "The provided string size=%zd is not withing the bounds [%d, %d]\n", s.size(), lb, ub); } else { resize(s.size()); for (uint32_t i = 0; i < s.size(); ++i) { @@ -1116,6 +1099,8 @@ struct choice_buffer_base_t { using buffer_t = typename std::aligned_storage::type; buffer_t buffer; + choice_buffer_base_t() : buffer() {} + template T& get() { @@ -1275,17 +1260,17 @@ int test_pack_unpack_consistency(const Msg& msg) // unpack and last pack done for the same number of bits if (bref3.distance() != bref2.distance()) { - srsasn_log_print(LOG_LEVEL_ERROR, "[%s][%d] .\n", __FILE__, __LINE__); + srslte::logmap::get("ASN1")->error("[%s][%d] .\n", __FILE__, __LINE__); return -1; } // ensure packed messages are the same if (bref3.distance() != bref.distance()) { - srsasn_log_print(LOG_LEVEL_ERROR, "[%s][%d] .\n", __FILE__, __LINE__); + srslte::logmap::get("ASN1")->error("[%s][%d] .\n", __FILE__, __LINE__); return -1; } if (memcmp(buf, buf2, bref.distance_bytes()) != 0) { - srsasn_log_print(LOG_LEVEL_ERROR, "[%s][%d] .\n", __FILE__, __LINE__); + srslte::logmap::get("ASN1")->error("[%s][%d] .\n", __FILE__, __LINE__); return -1; } return SRSASN_SUCCESS; diff --git a/lib/include/srslte/asn1/ngap_nr_asn1.h b/lib/include/srslte/asn1/ngap_nr_asn1.h index d65284fff..2f7f4796c 100644 --- a/lib/include/srslte/asn1/ngap_nr_asn1.h +++ b/lib/include/srslte/asn1/ngap_nr_asn1.h @@ -39,12 +39,6 @@ namespace ngap_nr { * Functions for external logging ******************************************************************************/ -extern srslte::log* ngap_nr_log_ptr; - -void ngap_nr_log_register_handler(srslte::log* ctx); - -void ngap_nr_log_print(srslte::LOG_LEVEL_ENUM log_level, const char* format, ...); - void log_invalid_access_choice_id(uint32_t val, uint32_t choice_id); void assert_choice_type(uint32_t val, uint32_t choice_id); @@ -56,19 +50,7 @@ void assert_choice_type(const std::string& access_type, const char* convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t enum_val, const char* enum_type); template -ItemType convert_enum_idx(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type) -{ - if (enum_val >= nof_types) { - if (enum_val == nof_types) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "The enum of type %s was not initialized.\n", enum_type); - } else { - ngap_nr_log_print( - LOG_LEVEL_ERROR, "The provided enum value=%d of type %s cannot be converted.\n", enum_val, enum_type); - } - return 0; - } - return array[enum_val]; -} +ItemType map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type); /******************************************************************************* * Constant Definitions @@ -14805,8 +14787,8 @@ struct write_replace_warning_resp_s { void to_json(json_writer& j) const; }; -// NGAP-ELEMENTARY-PROCEDURES-CLASS-1 ::= OBJECT SET OF NGAP-ELEMENTARY-PROCEDURE -struct ngap_elem_procs_class_minus1_o { +// NGAP-ELEMENTARY-PROCEDURES ::= OBJECT SET OF NGAP-ELEMENTARY-PROCEDURE +struct ngap_elem_procs_o { // InitiatingMessage ::= OPEN TYPE struct init_msg_c { struct types_opts { @@ -14829,273 +14811,6 @@ struct ngap_elem_procs_class_minus1_o { ue_context_release_cmd, ue_radio_cap_check_request, write_replace_warning_request, - nulltype - } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - init_msg_c() = default; - init_msg_c(const init_msg_c& other); - init_msg_c& operator=(const init_msg_c& other); - ~init_msg_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - amf_cfg_upd_s& amf_cfg_upd(); - ho_cancel_s& ho_cancel(); - ho_required_s& ho_required(); - ho_request_s& ho_request(); - init_context_setup_request_s& init_context_setup_request(); - ng_reset_s& ng_reset(); - ng_setup_request_s& ng_setup_request(); - path_switch_request_s& path_switch_request(); - pdu_session_res_modify_request_s& pdu_session_res_modify_request(); - pdu_session_res_modify_ind_s& pdu_session_res_modify_ind(); - pdu_session_res_release_cmd_s& pdu_session_res_release_cmd(); - pdu_session_res_setup_request_s& pdu_session_res_setup_request(); - pws_cancel_request_s& pws_cancel_request(); - ran_cfg_upd_s& ran_cfg_upd(); - ue_context_mod_request_s& ue_context_mod_request(); - ue_context_release_cmd_s& ue_context_release_cmd(); - ue_radio_cap_check_request_s& ue_radio_cap_check_request(); - write_replace_warning_request_s& write_replace_warning_request(); - const amf_cfg_upd_s& amf_cfg_upd() const; - const ho_cancel_s& ho_cancel() const; - const ho_required_s& ho_required() const; - const ho_request_s& ho_request() const; - const init_context_setup_request_s& init_context_setup_request() const; - const ng_reset_s& ng_reset() const; - const ng_setup_request_s& ng_setup_request() const; - const path_switch_request_s& path_switch_request() const; - const pdu_session_res_modify_request_s& pdu_session_res_modify_request() const; - const pdu_session_res_modify_ind_s& pdu_session_res_modify_ind() const; - const pdu_session_res_release_cmd_s& pdu_session_res_release_cmd() const; - const pdu_session_res_setup_request_s& pdu_session_res_setup_request() const; - const pws_cancel_request_s& pws_cancel_request() const; - const ran_cfg_upd_s& ran_cfg_upd() const; - const ue_context_mod_request_s& ue_context_mod_request() const; - const ue_context_release_cmd_s& ue_context_release_cmd() const; - const ue_radio_cap_check_request_s& ue_radio_cap_check_request() const; - const write_replace_warning_request_s& write_replace_warning_request() const; - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - // SuccessfulOutcome ::= OPEN TYPE - struct successful_outcome_c { - struct types_opts { - enum options { - amf_cfg_upd, - ho_cancel, - ho_required, - ho_request, - init_context_setup_request, - ng_reset, - ng_setup_request, - path_switch_request, - pdu_session_res_modify_request, - pdu_session_res_modify_ind, - pdu_session_res_release_cmd, - pdu_session_res_setup_request, - pws_cancel_request, - ran_cfg_upd, - ue_context_mod_request, - ue_context_release_cmd, - ue_radio_cap_check_request, - write_replace_warning_request, - nulltype - } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - successful_outcome_c() = default; - successful_outcome_c(const successful_outcome_c& other); - successful_outcome_c& operator=(const successful_outcome_c& other); - ~successful_outcome_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - amf_cfg_upd_ack_s& amf_cfg_upd(); - ho_cancel_ack_s& ho_cancel(); - ho_cmd_s& ho_required(); - ho_request_ack_s& ho_request(); - init_context_setup_resp_s& init_context_setup_request(); - ng_reset_ack_s& ng_reset(); - ng_setup_resp_s& ng_setup_request(); - path_switch_request_ack_s& path_switch_request(); - pdu_session_res_modify_resp_s& pdu_session_res_modify_request(); - pdu_session_res_modify_confirm_s& pdu_session_res_modify_ind(); - pdu_session_res_release_resp_s& pdu_session_res_release_cmd(); - pdu_session_res_setup_resp_s& pdu_session_res_setup_request(); - pws_cancel_resp_s& pws_cancel_request(); - ran_cfg_upd_ack_s& ran_cfg_upd(); - ue_context_mod_resp_s& ue_context_mod_request(); - ue_context_release_complete_s& ue_context_release_cmd(); - ue_radio_cap_check_resp_s& ue_radio_cap_check_request(); - write_replace_warning_resp_s& write_replace_warning_request(); - const amf_cfg_upd_ack_s& amf_cfg_upd() const; - const ho_cancel_ack_s& ho_cancel() const; - const ho_cmd_s& ho_required() const; - const ho_request_ack_s& ho_request() const; - const init_context_setup_resp_s& init_context_setup_request() const; - const ng_reset_ack_s& ng_reset() const; - const ng_setup_resp_s& ng_setup_request() const; - const path_switch_request_ack_s& path_switch_request() const; - const pdu_session_res_modify_resp_s& pdu_session_res_modify_request() const; - const pdu_session_res_modify_confirm_s& pdu_session_res_modify_ind() const; - const pdu_session_res_release_resp_s& pdu_session_res_release_cmd() const; - const pdu_session_res_setup_resp_s& pdu_session_res_setup_request() const; - const pws_cancel_resp_s& pws_cancel_request() const; - const ran_cfg_upd_ack_s& ran_cfg_upd() const; - const ue_context_mod_resp_s& ue_context_mod_request() const; - const ue_context_release_complete_s& ue_context_release_cmd() const; - const ue_radio_cap_check_resp_s& ue_radio_cap_check_request() const; - const write_replace_warning_resp_s& write_replace_warning_request() const; - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - // UnsuccessfulOutcome ::= OPEN TYPE - struct unsuccessful_outcome_c { - struct types_opts { - enum options { - amf_cfg_upd, - ho_cancel, - ho_required, - ho_request, - init_context_setup_request, - ng_reset, - ng_setup_request, - path_switch_request, - pdu_session_res_modify_request, - pdu_session_res_modify_ind, - pdu_session_res_release_cmd, - pdu_session_res_setup_request, - pws_cancel_request, - ran_cfg_upd, - ue_context_mod_request, - ue_context_release_cmd, - ue_radio_cap_check_request, - write_replace_warning_request, - nulltype - } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - unsuccessful_outcome_c() = default; - unsuccessful_outcome_c(const unsuccessful_outcome_c& other); - unsuccessful_outcome_c& operator=(const unsuccessful_outcome_c& other); - ~unsuccessful_outcome_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - amf_cfg_upd_fail_s& amf_cfg_upd(); - ho_prep_fail_s& ho_required(); - ho_fail_s& ho_request(); - init_context_setup_fail_s& init_context_setup_request(); - ng_setup_fail_s& ng_setup_request(); - path_switch_request_fail_s& path_switch_request(); - ran_cfg_upd_fail_s& ran_cfg_upd(); - ue_context_mod_fail_s& ue_context_mod_request(); - const amf_cfg_upd_fail_s& amf_cfg_upd() const; - const ho_prep_fail_s& ho_required() const; - const ho_fail_s& ho_request() const; - const init_context_setup_fail_s& init_context_setup_request() const; - const ng_setup_fail_s& ng_setup_request() const; - const path_switch_request_fail_s& path_switch_request() const; - const ran_cfg_upd_fail_s& ran_cfg_upd() const; - const ue_context_mod_fail_s& ue_context_mod_request() const; - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - - // members lookup methods - static uint16_t idx_to_proc_code(uint32_t idx); - static bool is_proc_code_valid(const uint16_t& proc_code); - static init_msg_c get_init_msg(const uint16_t& proc_code); - static successful_outcome_c get_successful_outcome(const uint16_t& proc_code); - static unsuccessful_outcome_c get_unsuccessful_outcome(const uint16_t& proc_code); - static crit_e get_crit(const uint16_t& proc_code); -}; - -// NGAP-ELEMENTARY-PROCEDURES-CLASS-2 ::= OBJECT SET OF NGAP-ELEMENTARY-PROCEDURE -struct ngap_elem_procs_class_minus2_o { - // InitiatingMessage ::= OPEN TYPE - struct init_msg_c { - struct types_opts { - enum options { amf_status_ind, cell_traffic_trace, deactiv_trace, @@ -15149,6 +14864,24 @@ struct ngap_elem_procs_class_minus2_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters + amf_cfg_upd_s& amf_cfg_upd(); + ho_cancel_s& ho_cancel(); + ho_required_s& ho_required(); + ho_request_s& ho_request(); + init_context_setup_request_s& init_context_setup_request(); + ng_reset_s& ng_reset(); + ng_setup_request_s& ng_setup_request(); + path_switch_request_s& path_switch_request(); + pdu_session_res_modify_request_s& pdu_session_res_modify_request(); + pdu_session_res_modify_ind_s& pdu_session_res_modify_ind(); + pdu_session_res_release_cmd_s& pdu_session_res_release_cmd(); + pdu_session_res_setup_request_s& pdu_session_res_setup_request(); + pws_cancel_request_s& pws_cancel_request(); + ran_cfg_upd_s& ran_cfg_upd(); + ue_context_mod_request_s& ue_context_mod_request(); + ue_context_release_cmd_s& ue_context_release_cmd(); + ue_radio_cap_check_request_s& ue_radio_cap_check_request(); + write_replace_warning_request_s& write_replace_warning_request(); amf_status_ind_s& amf_status_ind(); cell_traffic_trace_s& cell_traffic_trace(); deactiv_trace_s& deactiv_trace(); @@ -15184,6 +14917,24 @@ struct ngap_elem_procs_class_minus2_o { ul_ran_cfg_transfer_s& ul_ran_cfg_transfer(); ul_ran_status_transfer_s& ul_ran_status_transfer(); ul_ueassociated_nrp_pa_transport_s& ul_ueassociated_nrp_pa_transport(); + const amf_cfg_upd_s& amf_cfg_upd() const; + const ho_cancel_s& ho_cancel() const; + const ho_required_s& ho_required() const; + const ho_request_s& ho_request() const; + const init_context_setup_request_s& init_context_setup_request() const; + const ng_reset_s& ng_reset() const; + const ng_setup_request_s& ng_setup_request() const; + const path_switch_request_s& path_switch_request() const; + const pdu_session_res_modify_request_s& pdu_session_res_modify_request() const; + const pdu_session_res_modify_ind_s& pdu_session_res_modify_ind() const; + const pdu_session_res_release_cmd_s& pdu_session_res_release_cmd() const; + const pdu_session_res_setup_request_s& pdu_session_res_setup_request() const; + const pws_cancel_request_s& pws_cancel_request() const; + const ran_cfg_upd_s& ran_cfg_upd() const; + const ue_context_mod_request_s& ue_context_mod_request() const; + const ue_context_release_cmd_s& ue_context_release_cmd() const; + const ue_radio_cap_check_request_s& ue_radio_cap_check_request() const; + const write_replace_warning_request_s& write_replace_warning_request() const; const amf_status_ind_s& amf_status_ind() const; const cell_traffic_trace_s& cell_traffic_trace() const; const deactiv_trace_s& deactiv_trace() const; @@ -15222,7 +14973,8 @@ struct ngap_elem_procs_class_minus2_o { private: types type_; - choice_buffer_t + ul_ueassociated_nrp_pa_transport_s, + write_replace_warning_request_s> c; void destroy_(); @@ -15265,426 +15034,24 @@ struct ngap_elem_procs_class_minus2_o { struct successful_outcome_c { struct types_opts { enum options { - amf_status_ind, - cell_traffic_trace, - deactiv_trace, - dl_nas_transport, - dl_non_ueassociated_nrp_pa_transport, - dl_ran_cfg_transfer, - dl_ran_status_transfer, - dl_ueassociated_nrp_pa_transport, - error_ind, - ho_notify, - init_ue_msg, - location_report, - location_report_ctrl, - location_report_fail_ind, - nas_non_delivery_ind, - overload_start, - overload_stop, - paging, - pdu_session_res_notify, - private_msg, - pws_fail_ind, - pws_restart_ind, - reroute_nas_request, - rrc_inactive_transition_report, - secondary_rat_data_usage_report, - trace_fail_ind, - trace_start, - ue_context_release_request, - ue_radio_cap_info_ind, - uetnla_binding_release_request, - ul_nas_transport, - ul_non_ueassociated_nrp_pa_transport, - ul_ran_cfg_transfer, - ul_ran_status_transfer, - ul_ueassociated_nrp_pa_transport, - nulltype - } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - successful_outcome_c() = default; - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - - private: - types type_; - }; - // UnsuccessfulOutcome ::= OPEN TYPE - struct unsuccessful_outcome_c { - struct types_opts { - enum options { - amf_status_ind, - cell_traffic_trace, - deactiv_trace, - dl_nas_transport, - dl_non_ueassociated_nrp_pa_transport, - dl_ran_cfg_transfer, - dl_ran_status_transfer, - dl_ueassociated_nrp_pa_transport, - error_ind, - ho_notify, - init_ue_msg, - location_report, - location_report_ctrl, - location_report_fail_ind, - nas_non_delivery_ind, - overload_start, - overload_stop, - paging, - pdu_session_res_notify, - private_msg, - pws_fail_ind, - pws_restart_ind, - reroute_nas_request, - rrc_inactive_transition_report, - secondary_rat_data_usage_report, - trace_fail_ind, - trace_start, - ue_context_release_request, - ue_radio_cap_info_ind, - uetnla_binding_release_request, - ul_nas_transport, - ul_non_ueassociated_nrp_pa_transport, - ul_ran_cfg_transfer, - ul_ran_status_transfer, - ul_ueassociated_nrp_pa_transport, - nulltype - } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - unsuccessful_outcome_c() = default; - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - - private: - types type_; - }; - - // members lookup methods - static uint16_t idx_to_proc_code(uint32_t idx); - static bool is_proc_code_valid(const uint16_t& proc_code); - static init_msg_c get_init_msg(const uint16_t& proc_code); - static successful_outcome_c get_successful_outcome(const uint16_t& proc_code); - static unsuccessful_outcome_c get_unsuccessful_outcome(const uint16_t& proc_code); - static crit_e get_crit(const uint16_t& proc_code); -}; - -// NGAP-ELEMENTARY-PROCEDURES ::= OBJECT SET OF NGAP-ELEMENTARY-PROCEDURE -struct ngap_elem_procs_o { - // InitiatingMessage ::= OPEN TYPE - struct init_msg_c { - struct types_opts { - enum options { - amf_cfg_upd, - ho_cancel, - ho_required, - ho_request, - init_context_setup_request, - ng_reset, - ng_setup_request, - path_switch_request, - pdu_session_res_modify_request, - pdu_session_res_modify_ind, - pdu_session_res_release_cmd, - pdu_session_res_setup_request, - pws_cancel_request, - ran_cfg_upd, - ue_context_mod_request, - ue_context_release_cmd, - ue_radio_cap_check_request, - write_replace_warning_request, - amf_status_ind, - cell_traffic_trace, - deactiv_trace, - dl_nas_transport, - dl_non_ueassociated_nrp_pa_transport, - dl_ran_cfg_transfer, - dl_ran_status_transfer, - dl_ueassociated_nrp_pa_transport, - error_ind, - ho_notify, - init_ue_msg, - location_report, - location_report_ctrl, - location_report_fail_ind, - nas_non_delivery_ind, - overload_start, - overload_stop, - paging, - pdu_session_res_notify, - private_msg, - pws_fail_ind, - pws_restart_ind, - reroute_nas_request, - rrc_inactive_transition_report, - secondary_rat_data_usage_report, - trace_fail_ind, - trace_start, - ue_context_release_request, - ue_radio_cap_info_ind, - uetnla_binding_release_request, - ul_nas_transport, - ul_non_ueassociated_nrp_pa_transport, - ul_ran_cfg_transfer, - ul_ran_status_transfer, - ul_ueassociated_nrp_pa_transport, - nulltype - } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - init_msg_c() = default; - init_msg_c(const init_msg_c& other); - init_msg_c& operator=(const init_msg_c& other); - ~init_msg_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - amf_cfg_upd_s& amf_cfg_upd(); - ho_cancel_s& ho_cancel(); - ho_required_s& ho_required(); - ho_request_s& ho_request(); - init_context_setup_request_s& init_context_setup_request(); - ng_reset_s& ng_reset(); - ng_setup_request_s& ng_setup_request(); - path_switch_request_s& path_switch_request(); - pdu_session_res_modify_request_s& pdu_session_res_modify_request(); - pdu_session_res_modify_ind_s& pdu_session_res_modify_ind(); - pdu_session_res_release_cmd_s& pdu_session_res_release_cmd(); - pdu_session_res_setup_request_s& pdu_session_res_setup_request(); - pws_cancel_request_s& pws_cancel_request(); - ran_cfg_upd_s& ran_cfg_upd(); - ue_context_mod_request_s& ue_context_mod_request(); - ue_context_release_cmd_s& ue_context_release_cmd(); - ue_radio_cap_check_request_s& ue_radio_cap_check_request(); - write_replace_warning_request_s& write_replace_warning_request(); - amf_status_ind_s& amf_status_ind(); - cell_traffic_trace_s& cell_traffic_trace(); - deactiv_trace_s& deactiv_trace(); - dl_nas_transport_s& dl_nas_transport(); - dl_non_ueassociated_nrp_pa_transport_s& dl_non_ueassociated_nrp_pa_transport(); - dl_ran_cfg_transfer_s& dl_ran_cfg_transfer(); - dl_ran_status_transfer_s& dl_ran_status_transfer(); - dl_ueassociated_nrp_pa_transport_s& dl_ueassociated_nrp_pa_transport(); - error_ind_s& error_ind(); - ho_notify_s& ho_notify(); - init_ue_msg_s& init_ue_msg(); - location_report_s& location_report(); - location_report_ctrl_s& location_report_ctrl(); - location_report_fail_ind_s& location_report_fail_ind(); - nas_non_delivery_ind_s& nas_non_delivery_ind(); - overload_start_s& overload_start(); - overload_stop_s& overload_stop(); - paging_s& paging(); - pdu_session_res_notify_s& pdu_session_res_notify(); - private_msg_s& private_msg(); - pws_fail_ind_s& pws_fail_ind(); - pws_restart_ind_s& pws_restart_ind(); - reroute_nas_request_s& reroute_nas_request(); - rrc_inactive_transition_report_s& rrc_inactive_transition_report(); - secondary_rat_data_usage_report_s& secondary_rat_data_usage_report(); - trace_fail_ind_s& trace_fail_ind(); - trace_start_s& trace_start(); - ue_context_release_request_s& ue_context_release_request(); - ue_radio_cap_info_ind_s& ue_radio_cap_info_ind(); - uetnla_binding_release_request_s& uetnla_binding_release_request(); - ul_nas_transport_s& ul_nas_transport(); - ul_non_ueassociated_nrp_pa_transport_s& ul_non_ueassociated_nrp_pa_transport(); - ul_ran_cfg_transfer_s& ul_ran_cfg_transfer(); - ul_ran_status_transfer_s& ul_ran_status_transfer(); - ul_ueassociated_nrp_pa_transport_s& ul_ueassociated_nrp_pa_transport(); - const amf_cfg_upd_s& amf_cfg_upd() const; - const ho_cancel_s& ho_cancel() const; - const ho_required_s& ho_required() const; - const ho_request_s& ho_request() const; - const init_context_setup_request_s& init_context_setup_request() const; - const ng_reset_s& ng_reset() const; - const ng_setup_request_s& ng_setup_request() const; - const path_switch_request_s& path_switch_request() const; - const pdu_session_res_modify_request_s& pdu_session_res_modify_request() const; - const pdu_session_res_modify_ind_s& pdu_session_res_modify_ind() const; - const pdu_session_res_release_cmd_s& pdu_session_res_release_cmd() const; - const pdu_session_res_setup_request_s& pdu_session_res_setup_request() const; - const pws_cancel_request_s& pws_cancel_request() const; - const ran_cfg_upd_s& ran_cfg_upd() const; - const ue_context_mod_request_s& ue_context_mod_request() const; - const ue_context_release_cmd_s& ue_context_release_cmd() const; - const ue_radio_cap_check_request_s& ue_radio_cap_check_request() const; - const write_replace_warning_request_s& write_replace_warning_request() const; - const amf_status_ind_s& amf_status_ind() const; - const cell_traffic_trace_s& cell_traffic_trace() const; - const deactiv_trace_s& deactiv_trace() const; - const dl_nas_transport_s& dl_nas_transport() const; - const dl_non_ueassociated_nrp_pa_transport_s& dl_non_ueassociated_nrp_pa_transport() const; - const dl_ran_cfg_transfer_s& dl_ran_cfg_transfer() const; - const dl_ran_status_transfer_s& dl_ran_status_transfer() const; - const dl_ueassociated_nrp_pa_transport_s& dl_ueassociated_nrp_pa_transport() const; - const error_ind_s& error_ind() const; - const ho_notify_s& ho_notify() const; - const init_ue_msg_s& init_ue_msg() const; - const location_report_s& location_report() const; - const location_report_ctrl_s& location_report_ctrl() const; - const location_report_fail_ind_s& location_report_fail_ind() const; - const nas_non_delivery_ind_s& nas_non_delivery_ind() const; - const overload_start_s& overload_start() const; - const overload_stop_s& overload_stop() const; - const paging_s& paging() const; - const pdu_session_res_notify_s& pdu_session_res_notify() const; - const private_msg_s& private_msg() const; - const pws_fail_ind_s& pws_fail_ind() const; - const pws_restart_ind_s& pws_restart_ind() const; - const reroute_nas_request_s& reroute_nas_request() const; - const rrc_inactive_transition_report_s& rrc_inactive_transition_report() const; - const secondary_rat_data_usage_report_s& secondary_rat_data_usage_report() const; - const trace_fail_ind_s& trace_fail_ind() const; - const trace_start_s& trace_start() const; - const ue_context_release_request_s& ue_context_release_request() const; - const ue_radio_cap_info_ind_s& ue_radio_cap_info_ind() const; - const uetnla_binding_release_request_s& uetnla_binding_release_request() const; - const ul_nas_transport_s& ul_nas_transport() const; - const ul_non_ueassociated_nrp_pa_transport_s& ul_non_ueassociated_nrp_pa_transport() const; - const ul_ran_cfg_transfer_s& ul_ran_cfg_transfer() const; - const ul_ran_status_transfer_s& ul_ran_status_transfer() const; - const ul_ueassociated_nrp_pa_transport_s& ul_ueassociated_nrp_pa_transport() const; - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - // SuccessfulOutcome ::= OPEN TYPE - struct successful_outcome_c { - struct types_opts { - enum options { - amf_cfg_upd, - ho_cancel, - ho_required, - ho_request, - init_context_setup_request, - ng_reset, - ng_setup_request, - path_switch_request, - pdu_session_res_modify_request, - pdu_session_res_modify_ind, - pdu_session_res_release_cmd, - pdu_session_res_setup_request, - pws_cancel_request, - ran_cfg_upd, - ue_context_mod_request, - ue_context_release_cmd, - ue_radio_cap_check_request, - write_replace_warning_request, - amf_status_ind, - cell_traffic_trace, - deactiv_trace, - dl_nas_transport, - dl_non_ueassociated_nrp_pa_transport, - dl_ran_cfg_transfer, - dl_ran_status_transfer, - dl_ueassociated_nrp_pa_transport, - error_ind, - ho_notify, - init_ue_msg, - location_report, - location_report_ctrl, - location_report_fail_ind, - nas_non_delivery_ind, - overload_start, - overload_stop, - paging, - pdu_session_res_notify, - private_msg, - pws_fail_ind, - pws_restart_ind, - reroute_nas_request, - rrc_inactive_transition_report, - secondary_rat_data_usage_report, - trace_fail_ind, - trace_start, - ue_context_release_request, - ue_radio_cap_info_ind, - uetnla_binding_release_request, - ul_nas_transport, - ul_non_ueassociated_nrp_pa_transport, - ul_ran_cfg_transfer, - ul_ran_status_transfer, - ul_ueassociated_nrp_pa_transport, + amf_cfg_upd_ack, + ho_cancel_ack, + ho_cmd, + ho_request_ack, + init_context_setup_resp, + ng_reset_ack, + ng_setup_resp, + path_switch_request_ack, + pdu_session_res_modify_resp, + pdu_session_res_modify_confirm, + pdu_session_res_release_resp, + pdu_session_res_setup_resp, + pws_cancel_resp, + ran_cfg_upd_ack, + ue_context_mod_resp, + ue_context_release_complete, + ue_radio_cap_check_resp, + write_replace_warning_resp, nulltype } value; @@ -15703,42 +15070,42 @@ struct ngap_elem_procs_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - amf_cfg_upd_ack_s& amf_cfg_upd(); - ho_cancel_ack_s& ho_cancel(); - ho_cmd_s& ho_required(); - ho_request_ack_s& ho_request(); - init_context_setup_resp_s& init_context_setup_request(); - ng_reset_ack_s& ng_reset(); - ng_setup_resp_s& ng_setup_request(); - path_switch_request_ack_s& path_switch_request(); - pdu_session_res_modify_resp_s& pdu_session_res_modify_request(); - pdu_session_res_modify_confirm_s& pdu_session_res_modify_ind(); - pdu_session_res_release_resp_s& pdu_session_res_release_cmd(); - pdu_session_res_setup_resp_s& pdu_session_res_setup_request(); - pws_cancel_resp_s& pws_cancel_request(); - ran_cfg_upd_ack_s& ran_cfg_upd(); - ue_context_mod_resp_s& ue_context_mod_request(); - ue_context_release_complete_s& ue_context_release_cmd(); - ue_radio_cap_check_resp_s& ue_radio_cap_check_request(); - write_replace_warning_resp_s& write_replace_warning_request(); - const amf_cfg_upd_ack_s& amf_cfg_upd() const; - const ho_cancel_ack_s& ho_cancel() const; - const ho_cmd_s& ho_required() const; - const ho_request_ack_s& ho_request() const; - const init_context_setup_resp_s& init_context_setup_request() const; - const ng_reset_ack_s& ng_reset() const; - const ng_setup_resp_s& ng_setup_request() const; - const path_switch_request_ack_s& path_switch_request() const; - const pdu_session_res_modify_resp_s& pdu_session_res_modify_request() const; - const pdu_session_res_modify_confirm_s& pdu_session_res_modify_ind() const; - const pdu_session_res_release_resp_s& pdu_session_res_release_cmd() const; - const pdu_session_res_setup_resp_s& pdu_session_res_setup_request() const; - const pws_cancel_resp_s& pws_cancel_request() const; - const ran_cfg_upd_ack_s& ran_cfg_upd() const; - const ue_context_mod_resp_s& ue_context_mod_request() const; - const ue_context_release_complete_s& ue_context_release_cmd() const; - const ue_radio_cap_check_resp_s& ue_radio_cap_check_request() const; - const write_replace_warning_resp_s& write_replace_warning_request() const; + amf_cfg_upd_ack_s& amf_cfg_upd_ack(); + ho_cancel_ack_s& ho_cancel_ack(); + ho_cmd_s& ho_cmd(); + ho_request_ack_s& ho_request_ack(); + init_context_setup_resp_s& init_context_setup_resp(); + ng_reset_ack_s& ng_reset_ack(); + ng_setup_resp_s& ng_setup_resp(); + path_switch_request_ack_s& path_switch_request_ack(); + pdu_session_res_modify_resp_s& pdu_session_res_modify_resp(); + pdu_session_res_modify_confirm_s& pdu_session_res_modify_confirm(); + pdu_session_res_release_resp_s& pdu_session_res_release_resp(); + pdu_session_res_setup_resp_s& pdu_session_res_setup_resp(); + pws_cancel_resp_s& pws_cancel_resp(); + ran_cfg_upd_ack_s& ran_cfg_upd_ack(); + ue_context_mod_resp_s& ue_context_mod_resp(); + ue_context_release_complete_s& ue_context_release_complete(); + ue_radio_cap_check_resp_s& ue_radio_cap_check_resp(); + write_replace_warning_resp_s& write_replace_warning_resp(); + const amf_cfg_upd_ack_s& amf_cfg_upd_ack() const; + const ho_cancel_ack_s& ho_cancel_ack() const; + const ho_cmd_s& ho_cmd() const; + const ho_request_ack_s& ho_request_ack() const; + const init_context_setup_resp_s& init_context_setup_resp() const; + const ng_reset_ack_s& ng_reset_ack() const; + const ng_setup_resp_s& ng_setup_resp() const; + const path_switch_request_ack_s& path_switch_request_ack() const; + const pdu_session_res_modify_resp_s& pdu_session_res_modify_resp() const; + const pdu_session_res_modify_confirm_s& pdu_session_res_modify_confirm() const; + const pdu_session_res_release_resp_s& pdu_session_res_release_resp() const; + const pdu_session_res_setup_resp_s& pdu_session_res_setup_resp() const; + const pws_cancel_resp_s& pws_cancel_resp() const; + const ran_cfg_upd_ack_s& ran_cfg_upd_ack() const; + const ue_context_mod_resp_s& ue_context_mod_resp() const; + const ue_context_release_complete_s& ue_context_release_complete() const; + const ue_radio_cap_check_resp_s& ue_radio_cap_check_resp() const; + const write_replace_warning_resp_s& write_replace_warning_resp() const; private: types type_; @@ -15768,59 +15135,14 @@ struct ngap_elem_procs_o { struct unsuccessful_outcome_c { struct types_opts { enum options { - amf_cfg_upd, - ho_cancel, - ho_required, - ho_request, - init_context_setup_request, - ng_reset, - ng_setup_request, - path_switch_request, - pdu_session_res_modify_request, - pdu_session_res_modify_ind, - pdu_session_res_release_cmd, - pdu_session_res_setup_request, - pws_cancel_request, - ran_cfg_upd, - ue_context_mod_request, - ue_context_release_cmd, - ue_radio_cap_check_request, - write_replace_warning_request, - amf_status_ind, - cell_traffic_trace, - deactiv_trace, - dl_nas_transport, - dl_non_ueassociated_nrp_pa_transport, - dl_ran_cfg_transfer, - dl_ran_status_transfer, - dl_ueassociated_nrp_pa_transport, - error_ind, - ho_notify, - init_ue_msg, - location_report, - location_report_ctrl, - location_report_fail_ind, - nas_non_delivery_ind, - overload_start, - overload_stop, - paging, - pdu_session_res_notify, - private_msg, - pws_fail_ind, - pws_restart_ind, - reroute_nas_request, - rrc_inactive_transition_report, - secondary_rat_data_usage_report, - trace_fail_ind, - trace_start, - ue_context_release_request, - ue_radio_cap_info_ind, - uetnla_binding_release_request, - ul_nas_transport, - ul_non_ueassociated_nrp_pa_transport, - ul_ran_cfg_transfer, - ul_ran_status_transfer, - ul_ueassociated_nrp_pa_transport, + amf_cfg_upd_fail, + ho_prep_fail, + ho_fail, + init_context_setup_fail, + ng_setup_fail, + path_switch_request_fail, + ran_cfg_upd_fail, + ue_context_mod_fail, nulltype } value; @@ -15839,22 +15161,22 @@ struct ngap_elem_procs_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - amf_cfg_upd_fail_s& amf_cfg_upd(); - ho_prep_fail_s& ho_required(); - ho_fail_s& ho_request(); - init_context_setup_fail_s& init_context_setup_request(); - ng_setup_fail_s& ng_setup_request(); - path_switch_request_fail_s& path_switch_request(); - ran_cfg_upd_fail_s& ran_cfg_upd(); - ue_context_mod_fail_s& ue_context_mod_request(); - const amf_cfg_upd_fail_s& amf_cfg_upd() const; - const ho_prep_fail_s& ho_required() const; - const ho_fail_s& ho_request() const; - const init_context_setup_fail_s& init_context_setup_request() const; - const ng_setup_fail_s& ng_setup_request() const; - const path_switch_request_fail_s& path_switch_request() const; - const ran_cfg_upd_fail_s& ran_cfg_upd() const; - const ue_context_mod_fail_s& ue_context_mod_request() const; + amf_cfg_upd_fail_s& amf_cfg_upd_fail(); + ho_prep_fail_s& ho_prep_fail(); + ho_fail_s& ho_fail(); + init_context_setup_fail_s& init_context_setup_fail(); + ng_setup_fail_s& ng_setup_fail(); + path_switch_request_fail_s& path_switch_request_fail(); + ran_cfg_upd_fail_s& ran_cfg_upd_fail(); + ue_context_mod_fail_s& ue_context_mod_fail(); + const amf_cfg_upd_fail_s& amf_cfg_upd_fail() const; + const ho_prep_fail_s& ho_prep_fail() const; + const ho_fail_s& ho_fail() const; + const init_context_setup_fail_s& init_context_setup_fail() const; + const ng_setup_fail_s& ng_setup_fail() const; + const path_switch_request_fail_s& path_switch_request_fail() const; + const ran_cfg_upd_fail_s& ran_cfg_upd_fail() const; + const ue_context_mod_fail_s& ue_context_mod_fail() const; private: types type_; diff --git a/lib/include/srslte/asn1/rrc_asn1.h b/lib/include/srslte/asn1/rrc_asn1.h index 2dcdf6fae..6dc662990 100644 --- a/lib/include/srslte/asn1/rrc_asn1.h +++ b/lib/include/srslte/asn1/rrc_asn1.h @@ -39,12 +39,6 @@ namespace rrc { * Functions for external logging ******************************************************************************/ -extern srslte::log* rrc_log_ptr; - -void rrc_log_register_handler(srslte::log* ctx); - -void rrc_log_print(srslte::LOG_LEVEL_ENUM log_level, const char* format, ...); - void log_invalid_access_choice_id(uint32_t val, uint32_t choice_id); void assert_choice_type(uint32_t val, uint32_t choice_id); @@ -56,19 +50,7 @@ void assert_choice_type(const std::string& access_type, const char* convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t enum_val, const char* enum_type); template -ItemType convert_enum_idx(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type) -{ - if (enum_val >= nof_types) { - if (enum_val == nof_types) { - rrc_log_print(LOG_LEVEL_ERROR, "The enum of type %s was not initialized.\n", enum_type); - } else { - rrc_log_print( - LOG_LEVEL_ERROR, "The provided enum value=%d of type %s cannot be converted.\n", enum_val, enum_type); - } - return 0; - } - return array[enum_val]; -} +ItemType map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type); /******************************************************************************* * Constant Definitions diff --git a/lib/include/srslte/asn1/rrc_nr_asn1.h b/lib/include/srslte/asn1/rrc_nr_asn1.h index f72f8ddff..83b97068e 100644 --- a/lib/include/srslte/asn1/rrc_nr_asn1.h +++ b/lib/include/srslte/asn1/rrc_nr_asn1.h @@ -39,12 +39,6 @@ namespace rrc_nr { * Functions for external logging ******************************************************************************/ -extern srslte::log* rrc_nr_log_ptr; - -void rrc_nr_log_register_handler(srslte::log* ctx); - -void rrc_nr_log_print(srslte::LOG_LEVEL_ENUM log_level, const char* format, ...); - void log_invalid_access_choice_id(uint32_t val, uint32_t choice_id); void assert_choice_type(uint32_t val, uint32_t choice_id); @@ -56,19 +50,7 @@ void assert_choice_type(const std::string& access_type, const char* convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t enum_val, const char* enum_type); template -ItemType convert_enum_idx(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type) -{ - if (enum_val >= nof_types) { - if (enum_val == nof_types) { - rrc_nr_log_print(LOG_LEVEL_ERROR, "The enum of type %s was not initialized.\n", enum_type); - } else { - rrc_nr_log_print( - LOG_LEVEL_ERROR, "The provided enum value=%d of type %s cannot be converted.\n", enum_val, enum_type); - } - return 0; - } - return array[enum_val]; -} +ItemType map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type); /******************************************************************************* * Constant Definitions diff --git a/lib/include/srslte/asn1/s1ap_asn1.h b/lib/include/srslte/asn1/s1ap_asn1.h index 00bace424..4eda2b613 100644 --- a/lib/include/srslte/asn1/s1ap_asn1.h +++ b/lib/include/srslte/asn1/s1ap_asn1.h @@ -39,12 +39,6 @@ namespace s1ap { * Functions for external logging ******************************************************************************/ -extern srslte::log* s1ap_log_ptr; - -void s1ap_log_register_handler(srslte::log* ctx); - -void s1ap_log_print(srslte::LOG_LEVEL_ENUM log_level, const char* format, ...); - void log_invalid_access_choice_id(uint32_t val, uint32_t choice_id); void assert_choice_type(uint32_t val, uint32_t choice_id); @@ -56,19 +50,7 @@ void assert_choice_type(const std::string& access_type, const char* convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t enum_val, const char* enum_type); template -ItemType convert_enum_idx(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type) -{ - if (enum_val >= nof_types) { - if (enum_val == nof_types) { - s1ap_log_print(LOG_LEVEL_ERROR, "The enum of type %s was not initialized.\n", enum_type); - } else { - s1ap_log_print( - LOG_LEVEL_ERROR, "The provided enum value=%d of type %s cannot be converted.\n", enum_val, enum_type); - } - return 0; - } - return array[enum_val]; -} +ItemType map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type); /******************************************************************************* * Constant Definitions @@ -15505,532 +15487,6 @@ struct write_replace_warning_resp_s { void to_json(json_writer& j) const; }; -// S1AP-ELEMENTARY-PROCEDURES-CLASS-1 ::= OBJECT SET OF S1AP-ELEMENTARY-PROCEDURE -struct s1ap_elem_procs_class_minus1_o { - // InitiatingMessage ::= OPEN TYPE - struct init_msg_c { - struct types_opts { - enum options { - ho_required, - ho_request, - path_switch_request, - erab_setup_request, - erab_modify_request, - erab_release_cmd, - init_context_setup_request, - ho_cancel, - kill_request, - reset, - s1_setup_request, - ue_context_mod_request, - ue_context_release_cmd, - enb_cfg_upd, - mme_cfg_upd, - write_replace_warning_request, - nulltype - } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; - - // choice methods - init_msg_c() = default; - init_msg_c(const init_msg_c& other); - init_msg_c& operator=(const init_msg_c& other); - ~init_msg_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - ho_required_s& ho_required(); - ho_request_s& ho_request(); - path_switch_request_s& path_switch_request(); - erab_setup_request_s& erab_setup_request(); - erab_modify_request_s& erab_modify_request(); - erab_release_cmd_s& erab_release_cmd(); - init_context_setup_request_s& init_context_setup_request(); - ho_cancel_s& ho_cancel(); - kill_request_s& kill_request(); - reset_s& reset(); - s1_setup_request_s& s1_setup_request(); - ue_context_mod_request_s& ue_context_mod_request(); - ue_context_release_cmd_s& ue_context_release_cmd(); - enb_cfg_upd_s& enb_cfg_upd(); - mme_cfg_upd_s& mme_cfg_upd(); - write_replace_warning_request_s& write_replace_warning_request(); - const ho_required_s& ho_required() const; - const ho_request_s& ho_request() const; - const path_switch_request_s& path_switch_request() const; - const erab_setup_request_s& erab_setup_request() const; - const erab_modify_request_s& erab_modify_request() const; - const erab_release_cmd_s& erab_release_cmd() const; - const init_context_setup_request_s& init_context_setup_request() const; - const ho_cancel_s& ho_cancel() const; - const kill_request_s& kill_request() const; - const reset_s& reset() const; - const s1_setup_request_s& s1_setup_request() const; - const ue_context_mod_request_s& ue_context_mod_request() const; - const ue_context_release_cmd_s& ue_context_release_cmd() const; - const enb_cfg_upd_s& enb_cfg_upd() const; - const mme_cfg_upd_s& mme_cfg_upd() const; - const write_replace_warning_request_s& write_replace_warning_request() const; - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - // SuccessfulOutcome ::= OPEN TYPE - struct successful_outcome_c { - struct types_opts { - enum options { - ho_required, - ho_request, - path_switch_request, - erab_setup_request, - erab_modify_request, - erab_release_cmd, - init_context_setup_request, - ho_cancel, - kill_request, - reset, - s1_setup_request, - ue_context_mod_request, - ue_context_release_cmd, - enb_cfg_upd, - mme_cfg_upd, - write_replace_warning_request, - nulltype - } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; - - // choice methods - successful_outcome_c() = default; - successful_outcome_c(const successful_outcome_c& other); - successful_outcome_c& operator=(const successful_outcome_c& other); - ~successful_outcome_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - ho_cmd_s& ho_required(); - ho_request_ack_s& ho_request(); - path_switch_request_ack_s& path_switch_request(); - erab_setup_resp_s& erab_setup_request(); - erab_modify_resp_s& erab_modify_request(); - erab_release_resp_s& erab_release_cmd(); - init_context_setup_resp_s& init_context_setup_request(); - ho_cancel_ack_s& ho_cancel(); - kill_resp_s& kill_request(); - reset_ack_s& reset(); - s1_setup_resp_s& s1_setup_request(); - ue_context_mod_resp_s& ue_context_mod_request(); - ue_context_release_complete_s& ue_context_release_cmd(); - enb_cfg_upd_ack_s& enb_cfg_upd(); - mme_cfg_upd_ack_s& mme_cfg_upd(); - write_replace_warning_resp_s& write_replace_warning_request(); - const ho_cmd_s& ho_required() const; - const ho_request_ack_s& ho_request() const; - const path_switch_request_ack_s& path_switch_request() const; - const erab_setup_resp_s& erab_setup_request() const; - const erab_modify_resp_s& erab_modify_request() const; - const erab_release_resp_s& erab_release_cmd() const; - const init_context_setup_resp_s& init_context_setup_request() const; - const ho_cancel_ack_s& ho_cancel() const; - const kill_resp_s& kill_request() const; - const reset_ack_s& reset() const; - const s1_setup_resp_s& s1_setup_request() const; - const ue_context_mod_resp_s& ue_context_mod_request() const; - const ue_context_release_complete_s& ue_context_release_cmd() const; - const enb_cfg_upd_ack_s& enb_cfg_upd() const; - const mme_cfg_upd_ack_s& mme_cfg_upd() const; - const write_replace_warning_resp_s& write_replace_warning_request() const; - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - // UnsuccessfulOutcome ::= OPEN TYPE - struct unsuccessful_outcome_c { - struct types_opts { - enum options { - ho_required, - ho_request, - path_switch_request, - erab_setup_request, - erab_modify_request, - erab_release_cmd, - init_context_setup_request, - ho_cancel, - kill_request, - reset, - s1_setup_request, - ue_context_mod_request, - ue_context_release_cmd, - enb_cfg_upd, - mme_cfg_upd, - write_replace_warning_request, - nulltype - } value; - typedef uint8_t number_type; - - std::string to_string() const; - uint8_t to_number() const; - }; - typedef enumerated types; - - // choice methods - unsuccessful_outcome_c() = default; - unsuccessful_outcome_c(const unsuccessful_outcome_c& other); - unsuccessful_outcome_c& operator=(const unsuccessful_outcome_c& other); - ~unsuccessful_outcome_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - ho_prep_fail_s& ho_required(); - ho_fail_s& ho_request(); - path_switch_request_fail_s& path_switch_request(); - init_context_setup_fail_s& init_context_setup_request(); - s1_setup_fail_s& s1_setup_request(); - ue_context_mod_fail_s& ue_context_mod_request(); - enb_cfg_upd_fail_s& enb_cfg_upd(); - mme_cfg_upd_fail_s& mme_cfg_upd(); - const ho_prep_fail_s& ho_required() const; - const ho_fail_s& ho_request() const; - const path_switch_request_fail_s& path_switch_request() const; - const init_context_setup_fail_s& init_context_setup_request() const; - const s1_setup_fail_s& s1_setup_request() const; - const ue_context_mod_fail_s& ue_context_mod_request() const; - const enb_cfg_upd_fail_s& enb_cfg_upd() const; - const mme_cfg_upd_fail_s& mme_cfg_upd() const; - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - - // members lookup methods - static uint16_t idx_to_proc_code(uint32_t idx); - static bool is_proc_code_valid(const uint16_t& proc_code); - static init_msg_c get_init_msg(const uint16_t& proc_code); - static successful_outcome_c get_successful_outcome(const uint16_t& proc_code); - static unsuccessful_outcome_c get_unsuccessful_outcome(const uint16_t& proc_code); - static crit_e get_crit(const uint16_t& proc_code); -}; - -// S1AP-ELEMENTARY-PROCEDURES-CLASS-2 ::= OBJECT SET OF S1AP-ELEMENTARY-PROCEDURE -struct s1ap_elem_procs_class_minus2_o { - // InitiatingMessage ::= OPEN TYPE - struct init_msg_c { - struct types_opts { - enum options { - ho_notify, - erab_release_ind, - paging, - dl_nas_transport, - init_ue_msg, - ul_nas_transport, - error_ind, - nas_non_delivery_ind, - ue_context_release_request, - dl_s1cdma2000tunnelling, - ul_s1cdma2000tunnelling, - ue_cap_info_ind, - enb_status_transfer, - mme_status_transfer, - deactiv_trace, - trace_start, - trace_fail_ind, - cell_traffic_trace, - location_report_ctrl, - location_report_fail_ind, - location_report, - overload_start, - overload_stop, - enb_direct_info_transfer, - mme_direct_info_transfer, - enb_cfg_transfer, - mme_cfg_transfer, - private_msg, - nulltype - } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - init_msg_c() = default; - init_msg_c(const init_msg_c& other); - init_msg_c& operator=(const init_msg_c& other); - ~init_msg_c() { destroy_(); } - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - ho_notify_s& ho_notify(); - erab_release_ind_s& erab_release_ind(); - paging_s& paging(); - dl_nas_transport_s& dl_nas_transport(); - init_ue_msg_s& init_ue_msg(); - ul_nas_transport_s& ul_nas_transport(); - error_ind_s& error_ind(); - nas_non_delivery_ind_s& nas_non_delivery_ind(); - ue_context_release_request_s& ue_context_release_request(); - dl_s1cdma2000tunnelling_s& dl_s1cdma2000tunnelling(); - ul_s1cdma2000tunnelling_s& ul_s1cdma2000tunnelling(); - ue_cap_info_ind_s& ue_cap_info_ind(); - enb_status_transfer_s& enb_status_transfer(); - mme_status_transfer_s& mme_status_transfer(); - deactiv_trace_s& deactiv_trace(); - trace_start_s& trace_start(); - trace_fail_ind_s& trace_fail_ind(); - cell_traffic_trace_s& cell_traffic_trace(); - location_report_ctrl_s& location_report_ctrl(); - location_report_fail_ind_s& location_report_fail_ind(); - location_report_s& location_report(); - overload_start_s& overload_start(); - overload_stop_s& overload_stop(); - enb_direct_info_transfer_s& enb_direct_info_transfer(); - mme_direct_info_transfer_s& mme_direct_info_transfer(); - enb_cfg_transfer_s& enb_cfg_transfer(); - mme_cfg_transfer_s& mme_cfg_transfer(); - private_msg_s& private_msg(); - const ho_notify_s& ho_notify() const; - const erab_release_ind_s& erab_release_ind() const; - const paging_s& paging() const; - const dl_nas_transport_s& dl_nas_transport() const; - const init_ue_msg_s& init_ue_msg() const; - const ul_nas_transport_s& ul_nas_transport() const; - const error_ind_s& error_ind() const; - const nas_non_delivery_ind_s& nas_non_delivery_ind() const; - const ue_context_release_request_s& ue_context_release_request() const; - const dl_s1cdma2000tunnelling_s& dl_s1cdma2000tunnelling() const; - const ul_s1cdma2000tunnelling_s& ul_s1cdma2000tunnelling() const; - const ue_cap_info_ind_s& ue_cap_info_ind() const; - const enb_status_transfer_s& enb_status_transfer() const; - const mme_status_transfer_s& mme_status_transfer() const; - const deactiv_trace_s& deactiv_trace() const; - const trace_start_s& trace_start() const; - const trace_fail_ind_s& trace_fail_ind() const; - const cell_traffic_trace_s& cell_traffic_trace() const; - const location_report_ctrl_s& location_report_ctrl() const; - const location_report_fail_ind_s& location_report_fail_ind() const; - const location_report_s& location_report() const; - const overload_start_s& overload_start() const; - const overload_stop_s& overload_stop() const; - const enb_direct_info_transfer_s& enb_direct_info_transfer() const; - const mme_direct_info_transfer_s& mme_direct_info_transfer() const; - const enb_cfg_transfer_s& enb_cfg_transfer() const; - const mme_cfg_transfer_s& mme_cfg_transfer() const; - const private_msg_s& private_msg() const; - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - // SuccessfulOutcome ::= OPEN TYPE - struct successful_outcome_c { - struct types_opts { - enum options { - ho_notify, - erab_release_ind, - paging, - dl_nas_transport, - init_ue_msg, - ul_nas_transport, - error_ind, - nas_non_delivery_ind, - ue_context_release_request, - dl_s1cdma2000tunnelling, - ul_s1cdma2000tunnelling, - ue_cap_info_ind, - enb_status_transfer, - mme_status_transfer, - deactiv_trace, - trace_start, - trace_fail_ind, - cell_traffic_trace, - location_report_ctrl, - location_report_fail_ind, - location_report, - overload_start, - overload_stop, - enb_direct_info_transfer, - mme_direct_info_transfer, - enb_cfg_transfer, - mme_cfg_transfer, - private_msg, - nulltype - } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - successful_outcome_c() = default; - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - - private: - types type_; - }; - // UnsuccessfulOutcome ::= OPEN TYPE - struct unsuccessful_outcome_c { - struct types_opts { - enum options { - ho_notify, - erab_release_ind, - paging, - dl_nas_transport, - init_ue_msg, - ul_nas_transport, - error_ind, - nas_non_delivery_ind, - ue_context_release_request, - dl_s1cdma2000tunnelling, - ul_s1cdma2000tunnelling, - ue_cap_info_ind, - enb_status_transfer, - mme_status_transfer, - deactiv_trace, - trace_start, - trace_fail_ind, - cell_traffic_trace, - location_report_ctrl, - location_report_fail_ind, - location_report, - overload_start, - overload_stop, - enb_direct_info_transfer, - mme_direct_info_transfer, - enb_cfg_transfer, - mme_cfg_transfer, - private_msg, - nulltype - } value; - - std::string to_string() const; - }; - typedef enumerated types; - - // choice methods - unsuccessful_outcome_c() = default; - void set(types::options e = types::nulltype); - types type() const { return type_; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - - private: - types type_; - }; - - // members lookup methods - static uint16_t idx_to_proc_code(uint32_t idx); - static bool is_proc_code_valid(const uint16_t& proc_code); - static init_msg_c get_init_msg(const uint16_t& proc_code); - static successful_outcome_c get_successful_outcome(const uint16_t& proc_code); - static unsuccessful_outcome_c get_unsuccessful_outcome(const uint16_t& proc_code); - static crit_e get_crit(const uint16_t& proc_code); -}; - // S1AP-ELEMENTARY-PROCEDURES ::= OBJECT SET OF S1AP-ELEMENTARY-PROCEDURE struct s1ap_elem_procs_o { // InitiatingMessage ::= OPEN TYPE @@ -16242,50 +15698,22 @@ struct s1ap_elem_procs_o { struct successful_outcome_c { struct types_opts { enum options { - ho_required, - ho_request, - path_switch_request, - erab_setup_request, - erab_modify_request, - erab_release_cmd, - init_context_setup_request, - ho_cancel, - kill_request, - reset, - s1_setup_request, - ue_context_mod_request, - ue_context_release_cmd, - enb_cfg_upd, - mme_cfg_upd, - write_replace_warning_request, - ho_notify, - erab_release_ind, - paging, - dl_nas_transport, - init_ue_msg, - ul_nas_transport, - error_ind, - nas_non_delivery_ind, - ue_context_release_request, - dl_s1cdma2000tunnelling, - ul_s1cdma2000tunnelling, - ue_cap_info_ind, - enb_status_transfer, - mme_status_transfer, - deactiv_trace, - trace_start, - trace_fail_ind, - cell_traffic_trace, - location_report_ctrl, - location_report_fail_ind, - location_report, - overload_start, - overload_stop, - enb_direct_info_transfer, - mme_direct_info_transfer, - enb_cfg_transfer, - mme_cfg_transfer, - private_msg, + ho_cmd, + ho_request_ack, + path_switch_request_ack, + erab_setup_resp, + erab_modify_resp, + erab_release_resp, + init_context_setup_resp, + ho_cancel_ack, + kill_resp, + reset_ack, + s1_setup_resp, + ue_context_mod_resp, + ue_context_release_complete, + enb_cfg_upd_ack, + mme_cfg_upd_ack, + write_replace_warning_resp, nulltype } value; typedef uint8_t number_type; @@ -16306,38 +15734,38 @@ struct s1ap_elem_procs_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - ho_cmd_s& ho_required(); - ho_request_ack_s& ho_request(); - path_switch_request_ack_s& path_switch_request(); - erab_setup_resp_s& erab_setup_request(); - erab_modify_resp_s& erab_modify_request(); - erab_release_resp_s& erab_release_cmd(); - init_context_setup_resp_s& init_context_setup_request(); - ho_cancel_ack_s& ho_cancel(); - kill_resp_s& kill_request(); - reset_ack_s& reset(); - s1_setup_resp_s& s1_setup_request(); - ue_context_mod_resp_s& ue_context_mod_request(); - ue_context_release_complete_s& ue_context_release_cmd(); - enb_cfg_upd_ack_s& enb_cfg_upd(); - mme_cfg_upd_ack_s& mme_cfg_upd(); - write_replace_warning_resp_s& write_replace_warning_request(); - const ho_cmd_s& ho_required() const; - const ho_request_ack_s& ho_request() const; - const path_switch_request_ack_s& path_switch_request() const; - const erab_setup_resp_s& erab_setup_request() const; - const erab_modify_resp_s& erab_modify_request() const; - const erab_release_resp_s& erab_release_cmd() const; - const init_context_setup_resp_s& init_context_setup_request() const; - const ho_cancel_ack_s& ho_cancel() const; - const kill_resp_s& kill_request() const; - const reset_ack_s& reset() const; - const s1_setup_resp_s& s1_setup_request() const; - const ue_context_mod_resp_s& ue_context_mod_request() const; - const ue_context_release_complete_s& ue_context_release_cmd() const; - const enb_cfg_upd_ack_s& enb_cfg_upd() const; - const mme_cfg_upd_ack_s& mme_cfg_upd() const; - const write_replace_warning_resp_s& write_replace_warning_request() const; + ho_cmd_s& ho_cmd(); + ho_request_ack_s& ho_request_ack(); + path_switch_request_ack_s& path_switch_request_ack(); + erab_setup_resp_s& erab_setup_resp(); + erab_modify_resp_s& erab_modify_resp(); + erab_release_resp_s& erab_release_resp(); + init_context_setup_resp_s& init_context_setup_resp(); + ho_cancel_ack_s& ho_cancel_ack(); + kill_resp_s& kill_resp(); + reset_ack_s& reset_ack(); + s1_setup_resp_s& s1_setup_resp(); + ue_context_mod_resp_s& ue_context_mod_resp(); + ue_context_release_complete_s& ue_context_release_complete(); + enb_cfg_upd_ack_s& enb_cfg_upd_ack(); + mme_cfg_upd_ack_s& mme_cfg_upd_ack(); + write_replace_warning_resp_s& write_replace_warning_resp(); + const ho_cmd_s& ho_cmd() const; + const ho_request_ack_s& ho_request_ack() const; + const path_switch_request_ack_s& path_switch_request_ack() const; + const erab_setup_resp_s& erab_setup_resp() const; + const erab_modify_resp_s& erab_modify_resp() const; + const erab_release_resp_s& erab_release_resp() const; + const init_context_setup_resp_s& init_context_setup_resp() const; + const ho_cancel_ack_s& ho_cancel_ack() const; + const kill_resp_s& kill_resp() const; + const reset_ack_s& reset_ack() const; + const s1_setup_resp_s& s1_setup_resp() const; + const ue_context_mod_resp_s& ue_context_mod_resp() const; + const ue_context_release_complete_s& ue_context_release_complete() const; + const enb_cfg_upd_ack_s& enb_cfg_upd_ack() const; + const mme_cfg_upd_ack_s& mme_cfg_upd_ack() const; + const write_replace_warning_resp_s& write_replace_warning_resp() const; private: types type_; @@ -16365,50 +15793,14 @@ struct s1ap_elem_procs_o { struct unsuccessful_outcome_c { struct types_opts { enum options { - ho_required, - ho_request, - path_switch_request, - erab_setup_request, - erab_modify_request, - erab_release_cmd, - init_context_setup_request, - ho_cancel, - kill_request, - reset, - s1_setup_request, - ue_context_mod_request, - ue_context_release_cmd, - enb_cfg_upd, - mme_cfg_upd, - write_replace_warning_request, - ho_notify, - erab_release_ind, - paging, - dl_nas_transport, - init_ue_msg, - ul_nas_transport, - error_ind, - nas_non_delivery_ind, - ue_context_release_request, - dl_s1cdma2000tunnelling, - ul_s1cdma2000tunnelling, - ue_cap_info_ind, - enb_status_transfer, - mme_status_transfer, - deactiv_trace, - trace_start, - trace_fail_ind, - cell_traffic_trace, - location_report_ctrl, - location_report_fail_ind, - location_report, - overload_start, - overload_stop, - enb_direct_info_transfer, - mme_direct_info_transfer, - enb_cfg_transfer, - mme_cfg_transfer, - private_msg, + ho_prep_fail, + ho_fail, + path_switch_request_fail, + init_context_setup_fail, + s1_setup_fail, + ue_context_mod_fail, + enb_cfg_upd_fail, + mme_cfg_upd_fail, nulltype } value; typedef uint8_t number_type; @@ -16429,22 +15821,22 @@ struct s1ap_elem_procs_o { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - ho_prep_fail_s& ho_required(); - ho_fail_s& ho_request(); - path_switch_request_fail_s& path_switch_request(); - init_context_setup_fail_s& init_context_setup_request(); - s1_setup_fail_s& s1_setup_request(); - ue_context_mod_fail_s& ue_context_mod_request(); - enb_cfg_upd_fail_s& enb_cfg_upd(); - mme_cfg_upd_fail_s& mme_cfg_upd(); - const ho_prep_fail_s& ho_required() const; - const ho_fail_s& ho_request() const; - const path_switch_request_fail_s& path_switch_request() const; - const init_context_setup_fail_s& init_context_setup_request() const; - const s1_setup_fail_s& s1_setup_request() const; - const ue_context_mod_fail_s& ue_context_mod_request() const; - const enb_cfg_upd_fail_s& enb_cfg_upd() const; - const mme_cfg_upd_fail_s& mme_cfg_upd() const; + ho_prep_fail_s& ho_prep_fail(); + ho_fail_s& ho_fail(); + path_switch_request_fail_s& path_switch_request_fail(); + init_context_setup_fail_s& init_context_setup_fail(); + s1_setup_fail_s& s1_setup_fail(); + ue_context_mod_fail_s& ue_context_mod_fail(); + enb_cfg_upd_fail_s& enb_cfg_upd_fail(); + mme_cfg_upd_fail_s& mme_cfg_upd_fail(); + const ho_prep_fail_s& ho_prep_fail() const; + const ho_fail_s& ho_fail() const; + const path_switch_request_fail_s& path_switch_request_fail() const; + const init_context_setup_fail_s& init_context_setup_fail() const; + const s1_setup_fail_s& s1_setup_fail() const; + const ue_context_mod_fail_s& ue_context_mod_fail() const; + const enb_cfg_upd_fail_s& enb_cfg_upd_fail() const; + const mme_cfg_upd_fail_s& mme_cfg_upd_fail() const; private: types type_; diff --git a/lib/src/asn1/CMakeLists.txt b/lib/src/asn1/CMakeLists.txt index 5e1a4792d..92f6d7a7d 100644 --- a/lib/src/asn1/CMakeLists.txt +++ b/lib/src/asn1/CMakeLists.txt @@ -37,23 +37,23 @@ add_library(rrc_asn1 STATIC ) # Compile RRC ASN1 optimized for size target_compile_options(rrc_asn1 PRIVATE "-Os") -target_link_libraries(rrc_asn1 asn1_utils) +target_link_libraries(rrc_asn1 asn1_utils srslte_common) add_library(s1ap_asn1 STATIC s1ap_asn1.cc) target_compile_options(s1ap_asn1 PRIVATE "-Os") -target_link_libraries(s1ap_asn1 asn1_utils) +target_link_libraries(s1ap_asn1 asn1_utils srslte_common) if (ENABLE_5GNR) # RRC NR ASN1 add_library(rrc_nr_asn1 STATIC rrc_nr_asn1.cc) target_compile_options(rrc_nr_asn1 PRIVATE "-Os") - target_link_libraries(rrc_nr_asn1 asn1_utils) + target_link_libraries(rrc_nr_asn1 asn1_utils srslte_common) # NGAP ASN1 add_library(ngap_nr_asn1 STATIC ngap_nr_asn1.cc) target_compile_options(ngap_nr_asn1 PRIVATE "-Os") - target_link_libraries(ngap_nr_asn1 asn1_utils) + target_link_libraries(ngap_nr_asn1 asn1_utils srslte_common) endif(ENABLE_5GNR) diff --git a/lib/src/asn1/asn1_utils.cc b/lib/src/asn1/asn1_utils.cc index c744e32d9..0b7a95a28 100644 --- a/lib/src/asn1/asn1_utils.cc +++ b/lib/src/asn1/asn1_utils.cc @@ -23,62 +23,9 @@ #include #include -namespace asn1 { - -/************************ - logging -************************/ - -// Global ASN1 Log -static srslte::log* asn1_log_ptr = nullptr; - -// Demux of log level to respective log method -void srs_log_call(srslte::LOG_LEVEL_ENUM log_level, srslte::log* log_ptr, const char* str) -{ - switch (log_level) { - case LOG_LEVEL_ERROR: - log_ptr->error("%s", str); - break; - case LOG_LEVEL_WARNING: - log_ptr->warning("%s", str); - break; - case LOG_LEVEL_INFO: - log_ptr->info("%s", str); - break; - case LOG_LEVEL_DEBUG: - log_ptr->debug("%s", str); - default: - break; - } -} +using srslte::logmap; -void vlog_print(srslte::log* log_ptr, srsasn_logger_level_t log_level, const char* format, va_list args) -{ - if (log_ptr != nullptr) { - char* args_msg = nullptr; - if (vasprintf(&args_msg, format, args) > 0) { - srs_log_call(log_level, log_ptr, args_msg); - } - if (args_msg) { - free(args_msg); - } - } else { - vprintf(format, args); - } -} - -void srsasn_log_register_handler(srslte::log* ctx) -{ - asn1_log_ptr = ctx; -} - -void srsasn_log_print(srslte::LOG_LEVEL_ENUM log_level, const char* format, ...) -{ - va_list args; - va_start(args, format); - vlog_print(asn1_log_ptr, log_level, format, args); - va_end(args); -} +namespace asn1 { /************************ error handling @@ -88,13 +35,13 @@ void log_error_code(SRSASN_CODE code, const char* filename, int line) { switch (code) { case SRSASN_ERROR_ENCODE_FAIL: - srsasn_log_print(LOG_LEVEL_ERROR, "[%s][%d] Encoding failure.\n", filename, line); + logmap::get("ASN1")->error("[%s][%d] Encoding failure.\n", filename, line); break; case SRSASN_ERROR_DECODE_FAIL: - srsasn_log_print(LOG_LEVEL_ERROR, "[%s][%d] Decoding failure.\n", filename, line); + logmap::get("ASN1")->error("[%s][%d] Decoding failure.\n", filename, line); break; default: - srsasn_log_print(LOG_LEVEL_WARNING, "[%s][%d] SRSASN_CODE=%d not recognized.\n", filename, line, (int)code); + logmap::get("ASN1")->warning("[%s][%d] SRSASN_CODE=%d not recognized.\n", filename, line, (int)code); } } @@ -131,13 +78,13 @@ int bit_ref_impl::distance_bytes() const SRSASN_CODE bit_ref::pack(uint32_t val, uint32_t n_bits) { if (n_bits >= 32) { - srsasn_log_print(LOG_LEVEL_ERROR, "This method only supports packing up to 32 bits\n"); + logmap::get("ASN1")->error("This method only supports packing up to 32 bits\n"); return SRSASN_ERROR_ENCODE_FAIL; } uint32_t mask; while (n_bits > 0) { if (ptr >= max_ptr) { - srsasn_log_print(LOG_LEVEL_ERROR, "Buffer size limit was achieved\n"); + logmap::get("ASN1")->error("Buffer size limit was achieved\n"); return SRSASN_ERROR_ENCODE_FAIL; } mask = ((1u << n_bits) - 1u); @@ -163,13 +110,13 @@ template SRSASN_CODE unpack_bits(T& val, Ptr& ptr, uint8_t& offset, const uint8_t* max_ptr, uint32_t n_bits) { if (n_bits > sizeof(T) * 8) { - srsasn_log_print(LOG_LEVEL_ERROR, "This method only supports unpacking up to %d bits\n", (int)sizeof(T) * 8); + logmap::get("ASN1")->error("This method only supports unpacking up to %d bits\n", (int)sizeof(T) * 8); return SRSASN_ERROR_DECODE_FAIL; } val = 0; while (n_bits > 0) { if (ptr >= max_ptr) { - srsasn_log_print(LOG_LEVEL_ERROR, "Buffer size limit was achieved\n"); + logmap::get("ASN1")->error("Buffer size limit was achieved\n"); return SRSASN_ERROR_DECODE_FAIL; } if ((uint32_t)(8 - offset) > n_bits) { @@ -231,7 +178,7 @@ SRSASN_CODE bit_ref_impl::unpack_bytes(uint8_t* buf, uint32_t n_bytes) return SRSASN_SUCCESS; } if (ptr + n_bytes >= max_ptr) { - srsasn_log_print(LOG_LEVEL_ERROR, "Buffer size limit was achieved\n"); + logmap::get("ASN1")->error("Buffer size limit was achieved\n"); return SRSASN_ERROR_DECODE_FAIL; } if (offset == 0) { @@ -252,7 +199,7 @@ SRSASN_CODE bit_ref_impl::align_bytes() if (offset == 0) return SRSASN_SUCCESS; if (ptr >= max_ptr) { - srsasn_log_print(LOG_LEVEL_ERROR, "Buffer size limit was achieved\n"); + logmap::get("ASN1")->error("Buffer size limit was achieved\n"); return SRSASN_ERROR_DECODE_FAIL; } offset = 0; @@ -268,7 +215,7 @@ SRSASN_CODE bit_ref_impl::advance_bits(uint32_t n_bits) uint32_t bytes_offset = floorf((offset + n_bits) / 8.0f); if (ptr + bytes_required >= max_ptr) { - srsasn_log_print(LOG_LEVEL_ERROR, "Buffer size limit was achieved\n"); + logmap::get("ASN1")->error("Buffer size limit was achieved\n"); return SRSASN_ERROR_DECODE_FAIL; } ptr += bytes_offset; @@ -294,7 +241,7 @@ SRSASN_CODE bit_ref::pack_bytes(const uint8_t* buf, uint32_t n_bytes) return SRSASN_SUCCESS; } if (ptr + n_bytes >= max_ptr) { - srsasn_log_print(LOG_LEVEL_ERROR, "Buffer size limit was achieved\n"); + logmap::get("ASN1")->error("Buffer size limit was achieved\n"); return SRSASN_ERROR_ENCODE_FAIL; } if (offset == 0) { @@ -314,7 +261,7 @@ SRSASN_CODE bit_ref::align_bytes_zero() if (offset == 0) return SRSASN_SUCCESS; if (ptr >= max_ptr) { - srsasn_log_print(LOG_LEVEL_ERROR, "Buffer size limit was achieved\n"); + logmap::get("ASN1")->error("Buffer size limit was achieved\n"); return SRSASN_ERROR_ENCODE_FAIL; } uint8_t mask = (uint8_t)(256u - (1u << (8u - offset))); @@ -332,7 +279,7 @@ SRSASN_CODE pack_unsupported_ext_flag(bit_ref& bref, bool ext) { HANDLE_CODE(bref.pack(ext, 1)); if (ext) { - srsasn_log_print(LOG_LEVEL_ERROR, "asn1 error: ASN extensions not currently supported\n"); + logmap::get("ASN1")->error("asn1 error: ASN extensions not currently supported\n"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; @@ -342,7 +289,7 @@ SRSASN_CODE unpack_unsupported_ext_flag(bool& ext, bit_ref& bref) { SRSASN_CODE ret = bref.unpack(ext, 1); if (ext) { - srsasn_log_print(LOG_LEVEL_ERROR, "asn1 error: ASN extensions not currently supported\n"); + logmap::get("ASN1")->error("asn1 error: ASN extensions not currently supported\n"); return SRSASN_ERROR_DECODE_FAIL; } return ret; @@ -375,10 +322,8 @@ SRSASN_CODE pack_enum(bit_ref& bref, uint32_t enum_val, uint32_t nbits, uint32_t SRSASN_CODE pack_enum(bit_ref& bref, uint32_t e, uint32_t nof_types, uint32_t nof_exts, bool has_ext) { if (e >= nof_types) { - srsasn_log_print(LOG_LEVEL_ERROR, - "The provided enum is not within the range of possible values (%u>=%u)\n", - (unsigned)e, - (unsigned)nof_types); + logmap::get("ASN1")->error( + "The provided enum is not within the range of possible values (%u>=%u)\n", (unsigned)e, (unsigned)nof_types); return SRSASN_ERROR_ENCODE_FAIL; } SRSASN_CODE ret; @@ -413,10 +358,9 @@ ValOrError unpack_enum(uint32_t nof_types, uint32_t nof_exts, bool has_ext, cbit ret.code = bref.unpack(ret.val, nof_bits); } if (ret.val >= nof_types) { - srsasn_log_print(LOG_LEVEL_ERROR, - "The provided enum is not within the range of possible values (%u>=%u)\n", - (unsigned)ret.val, - (unsigned)nof_types); + logmap::get("ASN1")->error("The provided enum is not within the range of possible values (%u>=%u)\n", + (unsigned)ret.val, + (unsigned)nof_types); ret.code = SRSASN_ERROR_DECODE_FAIL; } return ret; @@ -440,8 +384,8 @@ template SRSASN_CODE pack_constrained_whole_number(bit_ref& bref, IntType n, IntType lb, IntType ub, bool aligned) { if (ub < lb or n < lb or n > ub) { - srsasn_log_print( - LOG_LEVEL_ERROR, "The condition lb <= n <= ub (%ld <= %ld <= %ld) was not met\n", (long)lb, (long)n, (long)ub); + logmap::get("ASN1")->error( + "The condition lb <= n <= ub (%ld <= %ld <= %ld) was not met\n", (long)lb, (long)n, (long)ub); return SRSASN_ERROR_ENCODE_FAIL; } uint64_t ra = (uint64_t)(ub - lb) + 1; // NOTE: Can overflow if IntType is kept @@ -509,7 +453,7 @@ template SRSASN_CODE unpack_constrained_whole_number(IntType& n, cbit_ref& bref, IntType lb, IntType ub, bool aligned) { if (ub < lb) { - srsasn_log_print(LOG_LEVEL_ERROR, "The condition lb <= ub (%ld <= %ld) was not met\n", (long)lb, (long)ub); + logmap::get("ASN1")->error("The condition lb <= ub (%ld <= %ld) was not met\n", (long)lb, (long)ub); return SRSASN_ERROR_DECODE_FAIL; } uint64_t ra = (uint64_t)(ub - lb) + 1; // NOTE: Can overflow if IntType is kept. @@ -523,11 +467,8 @@ SRSASN_CODE unpack_constrained_whole_number(IntType& n, cbit_ref& bref, IntType HANDLE_CODE(bref.unpack(n, n_bits)); n += lb; if (n > ub) { - srsasn_log_print(LOG_LEVEL_ERROR, - "The condition lb <= n <= ub (%ld <= %ld <= %ld) was not met\n", - (long)lb, - (long)n, - (long)ub); + logmap::get("ASN1")->error( + "The condition lb <= n <= ub (%ld <= %ld <= %ld) was not met\n", (long)lb, (long)n, (long)ub); return SRSASN_ERROR_DECODE_FAIL; } } else { @@ -584,7 +525,7 @@ SRSASN_CODE pack_norm_small_non_neg_whole_number(bit_ref& bref, UintType n) HANDLE_CODE(bref.pack(n, 7)); // [1 bit: 0 | 6 bit: n] } else { HANDLE_CODE(bref.pack(1, 1)); - srsasn_log_print(LOG_LEVEL_ERROR, "Long small integers not supported\n"); + logmap::get("ASN1")->error("Long small integers not supported\n"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; @@ -598,7 +539,7 @@ SRSASN_CODE unpack_norm_small_non_neg_whole_number(UintType& n, cbit_ref& bref) if (not ext) { ret = bref.unpack(n, 6); } else { - srsasn_log_print(LOG_LEVEL_ERROR, "Long small integers not supported\n"); + logmap::get("ASN1")->error("Long small integers not supported\n"); return SRSASN_ERROR_DECODE_FAIL; } return ret; @@ -717,7 +658,7 @@ SRSASN_CODE pack_length(bit_ref& bref, uint32_t val, bool aligned) HANDLE_CODE(bref.pack(0b10, 2)); HANDLE_CODE(bref.pack(val, 14)); } else { - srsasn_log_print(LOG_LEVEL_ERROR, "Not handling sizes longer than 16383 octets\n"); + logmap::get("ASN1")->error("Not handling sizes longer than 16383 octets\n"); return SRSASN_ERROR_ENCODE_FAIL; } } else { @@ -756,7 +697,7 @@ SRSASN_CODE unpack_length(uint32_t& val, cbit_ref& bref, bool aligned) if (not ext) { ret = bref.unpack(val, 14); } else { - srsasn_log_print(LOG_LEVEL_ERROR, "Not handling octet strings longer than 16383 octets\n"); + logmap::get("ASN1")->error("Not handling octet strings longer than 16383 octets\n"); val = 0; return SRSASN_ERROR_DECODE_FAIL; } @@ -796,7 +737,8 @@ SRSASN_CODE pack_integer(bit_ref& bref, IntType n, IntType lb, IntType ub, bool if (has_ext) { HANDLE_CODE(bref.pack(not within_bounds, 1)); } else if (not within_bounds) { - srsasn_log_print(LOG_LEVEL_ERROR, "The condition lb <= n <= ub (%d <= %d <= %d) was not met\n", lb, n, ub); + logmap::get("ASN1")->error( + "The condition lb <= n <= ub (%ld <= %ld <= %ld) was not met\n", (long)lb, (long)n, (long)ub); return SRSASN_ERROR_ENCODE_FAIL; } bool lower_bounded = lb != std::numeric_limits::min() or lb == 0; @@ -946,7 +888,7 @@ template struct integer_packer; uint64_t octstring_to_number(const uint8_t* ptr, uint32_t nbytes) { if (nbytes > 8) { - srsasn_log_print(LOG_LEVEL_ERROR, "octstring of size=%d does not fit in an uint64_t\n", nbytes); + logmap::get("ASN1")->error("octstring of size=%d does not fit in an uint64_t\n", nbytes); return 0; } uint64_t val = 0; @@ -959,7 +901,7 @@ uint64_t octstring_to_number(const uint8_t* ptr, uint32_t nbytes) void number_to_octstring(uint8_t* ptr, uint64_t number, uint32_t nbytes) { if (nbytes > 8) { - srsasn_log_print(LOG_LEVEL_ERROR, "octstring of size=%d does not fit in an uint64_t\n", nbytes); + logmap::get("ASN1")->error("octstring of size=%d does not fit in an uint64_t\n", nbytes); return; } for (uint32_t i = 0; i < nbytes; ++i) { @@ -988,12 +930,12 @@ std::string octstring_to_string(const uint8_t* ptr, uint32_t N) void string_to_octstring(uint8_t* ptr, const std::string& str) { if (str.size() % 2 != 0) { - srsasn_log_print(LOG_LEVEL_WARNING, "The provided hex string size=%zd is not a multiple of 2\n.", str.size()); + logmap::get("ASN1")->warning("The provided hex string size=%zd is not a multiple of 2\n.", str.size()); } char cstr[] = "\0\0\0"; for (uint32_t i = 0; i < str.size(); i += 2) { memcpy(&cstr[0], &str[i], 2); - ptr[i / 2] = strtoul(cstr, NULL, 16); + ptr[i / 2] = strtoul(cstr, nullptr, 16); } } @@ -1057,12 +999,12 @@ SRSASN_CODE pack_length_prefix(bit_ref& bref, bool is_aligned = false) { if (has_ext and ub == std::numeric_limits::max()) { - srsasn_log_print(LOG_LEVEL_ERROR, "has extension marker but it is an unbounded prefix size\n"); + logmap::get("ASN1")->error("has extension marker but it is an unbounded prefix size\n"); return SRSASN_ERROR_ENCODE_FAIL; } bool within_bounds = len >= lb and len <= ub; if (not within_bounds and not has_ext) { - srsasn_log_print(LOG_LEVEL_ERROR, "bitstring length=%d is not within bounds [%d, %d]\n", len, lb, ub); + logmap::get("ASN1")->error("bitstring length=%d is not within bounds [%d, %d]\n", len, lb, ub); return SRSASN_ERROR_ENCODE_FAIL; } @@ -1093,7 +1035,7 @@ SRSASN_CODE pack_length_prefix(bit_ref& bref, SRSASN_CODE pack_bitfield(bit_ref& bref, const uint8_t* buf, uint32_t nbits, uint32_t lb, uint32_t ub, bool is_aligned) { if (nbits == 0) { - srsasn_log_print(LOG_LEVEL_ERROR, "Invalid bitstring size=%d\n", nbits); + logmap::get("ASN1")->error("Invalid bitstring size=%d\n", nbits); return SRSASN_ERROR_ENCODE_FAIL; } if (is_aligned and (lb != ub or ub > 16)) { @@ -1156,7 +1098,7 @@ SRSASN_CODE unpack_length_prefix(uint32_t& len, cbit_ref& bref, uint32_t lb, uin SRSASN_CODE unpack_bitfield(uint8_t* buf, cbit_ref& bref, uint32_t n, uint32_t lb, uint32_t ub, bool is_aligned) { if (n > ASN_64K) { - srsasn_log_print(LOG_LEVEL_ERROR, "bitstrings longer than 64K not supported\n"); + logmap::get("ASN1")->error("bitstrings longer than 64K not supported\n"); return SRSASN_ERROR_DECODE_FAIL; } if (n == 0) { @@ -1179,7 +1121,7 @@ SRSASN_CODE unpack_bitfield(uint8_t* buf, cbit_ref& bref, uint32_t n, uint32_t l void from_number(uint8_t* ptr, uint64_t number, uint32_t nbits) { if (nbits > 64) { - srsasn_log_print(LOG_LEVEL_ERROR, "bitstring of size=%d does not fit in an uint64_t\n", nbits); + logmap::get("ASN1")->error("bitstring of size=%d does not fit in an uint64_t\n", nbits); return; } uint32_t nof_bytes = (uint32_t)ceilf(nbits / 8.0f); @@ -1204,7 +1146,7 @@ std::string to_string(const uint8_t* ptr, uint32_t nbits) uint64_t to_number(const uint8_t* ptr, uint32_t nbits) { if (nbits > 64) { - srsasn_log_print(LOG_LEVEL_ERROR, "bitstring of size=%d does not fit in an uint64_t\n", nbits); + logmap::get("ASN1")->error("bitstring of size=%d does not fit in an uint64_t\n", nbits); return 0; } uint64_t val = 0; @@ -1222,11 +1164,11 @@ uint64_t to_number(const uint8_t* ptr, uint32_t nbits) *********************/ void log_invalid_access_choice_id(uint32_t val, uint32_t choice_id) { - srsasn_log_print(LOG_LEVEL_ERROR, "The access choide id is invalid (%zd!=%zd)\n", (size_t)val, (size_t)choice_id); + logmap::get("ASN1")->error("The access choide id is invalid (%zd!=%zd)\n", (size_t)val, (size_t)choice_id); } void log_invalid_choice_id(uint32_t val, const char* choice_type) { - srsasn_log_print(LOG_LEVEL_ERROR, "Invalid choice id=%zd for choice type %s\n", (size_t)val, choice_type); + logmap::get("ASN1")->error("Invalid choice id=%zd for choice type %s\n", (size_t)val, choice_type); } /********************* @@ -1263,8 +1205,8 @@ pack(bit_ref& bref, const std::string& s, size_t lb, size_t ub, size_t alb, size if (not within_limits) { // TODO: print error // NOTE: This should be valid for exts - srsasn_log_print( - LOG_LEVEL_ERROR, "The PrintableString size=%zd is not within the limits [%zd, %zd]\n", s.size(), alb, aub); + logmap::get("ASN1")->error( + "The PrintableString size=%zd is not within the limits [%zd, %zd]\n", s.size(), alb, aub); return SRSASN_ERROR_ENCODE_FAIL; } size_t b = asn_string_utils::get_nof_bits_per_char(lb, ub, aligned); @@ -1301,7 +1243,7 @@ SRSASN_CODE unpack(std::string& s, cbit_ref& bref, size_t lb, size_t ub, size_t bool is_ext; HANDLE_CODE(bref.unpack(is_ext, 1)); if (is_ext) { - srsasn_log_print(LOG_LEVEL_ERROR, "Extension of PrintableString not supported\n"); + logmap::get("ASN1")->error("Extension of PrintableString not supported\n"); return SRSASN_ERROR_DECODE_FAIL; } } @@ -1424,10 +1366,9 @@ varlength_field_pack_guard::~varlength_field_pack_guard() // check how many bytes were written in total uint32_t nof_bytes = bref_tracker->distance(bref0) / (uint32_t)8; if (nof_bytes > sizeof(buffer)) { - srsasn_log_print(LOG_LEVEL_ERROR, - "The packed variable sized field is too long for the reserved buffer (%zd > %zd)\n", - (size_t)nof_bytes, - sizeof(buffer)); + logmap::get("ASN1")->error("The packed variable sized field is too long for the reserved buffer (%zd > %zd)\n", + (size_t)nof_bytes, + sizeof(buffer)); } // go back in time to pack length diff --git a/lib/src/asn1/ngap_nr_asn1.cc b/lib/src/asn1/ngap_nr_asn1.cc index 441912d4d..1a08d5231 100644 --- a/lib/src/asn1/ngap_nr_asn1.cc +++ b/lib/src/asn1/ngap_nr_asn1.cc @@ -24,29 +24,15 @@ using namespace asn1; using namespace asn1::ngap_nr; +using srslte::logmap; /******************************************************************************* * Logging Utilities ******************************************************************************/ -srslte::log* asn1::ngap_nr::ngap_nr_log_ptr = nullptr; - -void asn1::ngap_nr::ngap_nr_log_register_handler(srslte::log* ctx) -{ - ngap_nr_log_ptr = ctx; -} - -void asn1::ngap_nr::ngap_nr_log_print(srslte::LOG_LEVEL_ENUM log_level, const char* format, ...) -{ - va_list args; - va_start(args, format); - vlog_print(ngap_nr_log_ptr, log_level, format, args); - va_end(args); -} - void asn1::ngap_nr::log_invalid_access_choice_id(uint32_t val, uint32_t choice_id) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "The access choice id is invalid (%d!=%d)\n", val, choice_id); + logmap::get("ASN1::NGAP_NR")->error("The access choice id is invalid (%d!=%d)\n", val, choice_id); } void asn1::ngap_nr::assert_choice_type(uint32_t val, uint32_t choice_id) @@ -61,11 +47,11 @@ void asn1::ngap_nr::assert_choice_type(const std::string& access_type, const std::string& choice_type) { if (access_type != current_type) { - ngap_nr_log_print(LOG_LEVEL_ERROR, - "Invalid field access for choice type \"%s\" (\"%s\"!=\"%s\")\n", - choice_type.c_str(), - access_type.c_str(), - current_type.c_str()); + logmap::get("ASN1::NGAP_NR") + ->error("Invalid field access for choice type \"%s\" (\"%s\"!=\"%s\")\n", + choice_type.c_str(), + access_type.c_str(), + current_type.c_str()); } } @@ -74,29 +60,81 @@ asn1::ngap_nr::convert_enum_idx(const char* array[], uint32_t nof_types, uint32_ { if (enum_val >= nof_types) { if (enum_val == nof_types) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "The enum of type %s was not initialized.\n", enum_type); + logmap::get("ASN1::NGAP_NR")->error("The enum of type %s was not initialized.\n", enum_type); } else { - ngap_nr_log_print(LOG_LEVEL_ERROR, "The enum value=%d of type %s is not valid.\n", enum_val, enum_type); + logmap::get("ASN1::NGAP_NR")->error("The enum value=%d of type %s is not valid.\n", enum_val, enum_type); } return ""; } return array[enum_val]; } -#define ngap_nr_asn1_warn_assert(cond, file, line) \ - if ((cond)) { \ - ngap_nr_log_print(LOG_LEVEL_WARNING, "Assertion in [%s][%d] failed.\n", (file), (line)); \ +template +ItemType asn1::ngap_nr::map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type) +{ + if (enum_val >= nof_types) { + if (enum_val == nof_types) { + logmap::get("ASN1::NGAP_NR")->error("The enum of type %s is not initialized.\n", enum_type); + } else { + logmap::get("ASN1::NGAP_NR") + ->error("The enum value=%d of type %s cannot be converted to a number.\n", enum_val, enum_type); + } + return 0; } - + return array[enum_val]; +} +template const uint8_t asn1::ngap_nr::map_enum_number(const uint8_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint16_t asn1::ngap_nr::map_enum_number(const uint16_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint32_t asn1::ngap_nr::map_enum_number(const uint32_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint64_t asn1::ngap_nr::map_enum_number(const uint64_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int8_t asn1::ngap_nr::map_enum_number(const int8_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int16_t asn1::ngap_nr::map_enum_number(const int16_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int32_t asn1::ngap_nr::map_enum_number(const int32_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int64_t asn1::ngap_nr::map_enum_number(const int64_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const float asn1::ngap_nr::map_enum_number(const float* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); + +void ngap_nr_asn1_warn_assert(bool cond, const char* filename, int lineno) +{ + if (cond) { + logmap::get("ASN1::NGAP_NR")->warning("Assertion in [%s][%d] failed.\n", filename, lineno); + } +} static void log_invalid_choice_id(uint32_t val, const char* choice_type) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Invalid choice id=%d for choice type %s\n", val, choice_type); + logmap::get("ASN1::NGAP_NR")->error("Invalid choice id=%d for choice type %s\n", val, choice_type); } static void invalid_enum_number(int value, const char* name) { - ngap_nr_log_print( - LOG_LEVEL_ERROR, "The provided enum value=%d of type %s cannot be translated into a number\n", value, name); + logmap::get("ASN1::NGAP_NR") + ->error("The provided enum value=%d of type %s cannot be translated into a number\n", value, name); } /******************************************************************************* @@ -106,14 +144,14 @@ static void invalid_enum_number(int value, const char* name) // Criticality ::= ENUMERATED std::string crit_opts::to_string() const { - static constexpr const char* options[] = {"reject", "ignore", "notify"}; + static const char* options[] = {"reject", "ignore", "notify"}; return convert_enum_idx(options, 3, value, "crit_e"); } // Presence ::= ENUMERATED std::string presence_opts::to_string() const { - static constexpr const char* options[] = {"optional", "conditional", "mandatory"}; + static const char* options[] = {"optional", "conditional", "mandatory"}; return convert_enum_idx(options, 3, value, "presence_e"); } @@ -155,30 +193,30 @@ bool protocol_ie_field_s::load_info_obj(const uint32_t& id_) id = id_; crit = ies_set_paramT_::get_crit(id); value = ies_set_paramT_::get_value(id); - return true; + return value.type().value != ies_set_paramT_::value_c::types_opts::nulltype; } uint32_t ngap_protocol_ies_empty_o::idx_to_id(uint32_t idx) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "object set is empty\n"); + logmap::get("ASN1::NGAP_NR")->error("object set is empty\n"); return 0; } bool ngap_protocol_ies_empty_o::is_id_valid(const uint32_t& id) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "object set is empty\n"); + logmap::get("ASN1::NGAP_NR")->error("object set is empty\n"); return false; } crit_e ngap_protocol_ies_empty_o::get_crit(const uint32_t& id) { - return crit_e(); + return {}; } ngap_protocol_ies_empty_o::value_c ngap_protocol_ies_empty_o::get_value(const uint32_t& id) { - return ngap_protocol_ies_empty_o::value_c(); + return {}; } presence_e ngap_protocol_ies_empty_o::get_presence(const uint32_t& id) { - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -200,7 +238,7 @@ SRSASN_CODE ngap_protocol_ies_empty_o::value_c::unpack(cbit_ref& bref) std::string ngap_protocol_ies_empty_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {}; + static const char* options[] = {}; return convert_enum_idx(options, 0, value, "ngap_protocol_ies_empty_o::value_c::types"); } @@ -242,7 +280,7 @@ bool protocol_ext_field_s::load_info_obj(const uint32_t& id_) id = id_; crit = ext_set_paramT_::get_crit(id); ext_value = ext_set_paramT_::get_ext(id); - return true; + return ext_value.type().value != ext_set_paramT_::ext_c::types_opts::nulltype; } // ProtocolIE-SingleContainer{NGAP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE{{NGAP-PROTOCOL-IES}} @@ -283,30 +321,30 @@ bool protocol_ie_single_container_s::load_info_obj(const uint32 id = id_; crit = ies_set_paramT_::get_crit(id); value = ies_set_paramT_::get_value(id); - return true; + return value.type().value != ies_set_paramT_::value_c::types_opts::nulltype; } uint32_t ngap_protocol_ext_empty_o::idx_to_id(uint32_t idx) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "object set is empty\n"); + logmap::get("ASN1::NGAP_NR")->error("object set is empty\n"); return 0; } bool ngap_protocol_ext_empty_o::is_id_valid(const uint32_t& id) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "object set is empty\n"); + logmap::get("ASN1::NGAP_NR")->error("object set is empty\n"); return false; } crit_e ngap_protocol_ext_empty_o::get_crit(const uint32_t& id) { - return crit_e(); + return {}; } ngap_protocol_ext_empty_o::ext_c ngap_protocol_ext_empty_o::get_ext(const uint32_t& id) { - return ngap_protocol_ext_empty_o::ext_c(); + return {}; } presence_e ngap_protocol_ext_empty_o::get_presence(const uint32_t& id) { - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -328,7 +366,7 @@ SRSASN_CODE ngap_protocol_ext_empty_o::ext_c::unpack(cbit_ref& bref) std::string ngap_protocol_ext_empty_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {}; + static const char* options[] = {}; return convert_enum_idx(options, 0, value, "ngap_protocol_ext_empty_o::ext_c::types"); } @@ -453,7 +491,7 @@ SRSASN_CODE cp_transport_layer_info_c::unpack(cbit_ref& bref) std::string cp_transport_layer_info_c::types_opts::to_string() const { - static constexpr const char* options[] = {"endpointIPAddress", "choice-Extensions"}; + static const char* options[] = {"endpointIPAddress", "choice-Extensions"}; return convert_enum_idx(options, 2, value, "cp_transport_layer_info_c::types"); } @@ -555,7 +593,7 @@ void amf_tnlassoc_setup_item_s::to_json(json_writer& j) const // TNLAssociationUsage ::= ENUMERATED std::string tnlassoc_usage_opts::to_string() const { - static constexpr const char* options[] = {"ue", "non-ue", "both"}; + static const char* options[] = {"ue", "non-ue", "both"}; return convert_enum_idx(options, 3, value, "tnlassoc_usage_e"); } @@ -867,8 +905,8 @@ void plmn_support_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("pLMNIdentity", plmn_id.to_string()); j.start_array("sliceSupportList"); - for (uint32_t i1 = 0; i1 < slice_support_list.size(); ++i1) { - slice_support_list[i1].to_json(j); + for (const auto& e1 : slice_support_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -929,14 +967,14 @@ void served_guami_item_s::to_json(json_writer& j) const // AMFConfigurationUpdateIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t amf_cfg_upd_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {1, 96, 86, 80, 6, 7, 8}; - return convert_enum_idx(options, 7, idx, "id"); + static const uint32_t options[] = {1, 96, 86, 80, 6, 7, 8}; + return map_enum_number(options, 7, idx, "id"); } bool amf_cfg_upd_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {1, 96, 86, 80, 6, 7, 8}; - for (uint32_t i = 0; i < 7; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {1, 96, 86, 80, 6, 7, 8}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -960,9 +998,9 @@ crit_e amf_cfg_upd_ies_o::get_crit(const uint32_t& id) case 8: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } amf_cfg_upd_ies_o::value_c amf_cfg_upd_ies_o::get_value(const uint32_t& id) { @@ -990,7 +1028,7 @@ amf_cfg_upd_ies_o::value_c amf_cfg_upd_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::amf_tnlassoc_to_upd_list); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -1012,9 +1050,9 @@ presence_e amf_cfg_upd_ies_o::get_presence(const uint32_t& id) case 8: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -1220,8 +1258,8 @@ void amf_cfg_upd_ies_o::value_c::to_json(json_writer& j) const break; case types::served_guami_list: j.start_array("ServedGUAMIList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -1230,29 +1268,29 @@ void amf_cfg_upd_ies_o::value_c::to_json(json_writer& j) const break; case types::plmn_support_list: j.start_array("PLMNSupportList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::amf_tnlassoc_to_add_list: j.start_array("AMF-TNLAssociationToAddList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::amf_tnlassoc_to_rem_list: j.start_array("AMF-TNLAssociationToRemoveList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::amf_tnlassoc_to_upd_list: j.start_array("AMF-TNLAssociationToUpdateList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -1326,23 +1364,21 @@ SRSASN_CODE amf_cfg_upd_ies_o::value_c::unpack(cbit_ref& bref) std::string amf_cfg_upd_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"PrintableString", - "ServedGUAMIList", - "INTEGER (0..255)", - "PLMNSupportList", - "AMF-TNLAssociationToAddList", - "AMF-TNLAssociationToRemoveList", - "AMF-TNLAssociationToUpdateList"}; + static const char* options[] = {"PrintableString", + "ServedGUAMIList", + "INTEGER (0..255)", + "PLMNSupportList", + "AMF-TNLAssociationToAddList", + "AMF-TNLAssociationToRemoveList", + "AMF-TNLAssociationToUpdateList"}; return convert_enum_idx(options, 7, value, "amf_cfg_upd_ies_o::value_c::types"); } uint8_t amf_cfg_upd_ies_o::value_c::types_opts::to_number() const { - switch (value) { - case relative_amf_capacity: - return 0; - default: - invalid_enum_number(value, "amf_cfg_upd_ies_o::value_c::types"); + if (value == relative_amf_capacity) { + return 0; } + invalid_enum_number(value, "amf_cfg_upd_ies_o::value_c::types"); return 0; } @@ -1382,7 +1418,7 @@ void protocol_ie_container_item_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; amf_cfg_upd_ies_container::amf_cfg_upd_ies_container() : amf_name(1, crit_e::reject), @@ -1482,7 +1518,7 @@ SRSASN_CODE amf_cfg_upd_ies_container::unpack(cbit_ref& bref) amf_tnlassoc_to_upd_list.value = c.value.amf_tnlassoc_to_upd_list(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -1549,99 +1585,99 @@ void amf_cfg_upd_s::to_json(json_writer& j) const // CauseMisc ::= ENUMERATED std::string cause_misc_opts::to_string() const { - static constexpr const char* options[] = {"control-processing-overload", - "not-enough-user-plane-processing-resources", - "hardware-failure", - "om-intervention", - "unknown-PLMN", - "unspecified"}; + static const char* options[] = {"control-processing-overload", + "not-enough-user-plane-processing-resources", + "hardware-failure", + "om-intervention", + "unknown-PLMN", + "unspecified"}; return convert_enum_idx(options, 6, value, "cause_misc_e"); } // CauseNas ::= ENUMERATED std::string cause_nas_opts::to_string() const { - static constexpr const char* options[] = {"normal-release", "authentication-failure", "deregister", "unspecified"}; + static const char* options[] = {"normal-release", "authentication-failure", "deregister", "unspecified"}; return convert_enum_idx(options, 4, value, "cause_nas_e"); } // CauseProtocol ::= ENUMERATED std::string cause_protocol_opts::to_string() const { - static constexpr const char* options[] = {"transfer-syntax-error", - "abstract-syntax-error-reject", - "abstract-syntax-error-ignore-and-notify", - "message-not-compatible-with-receiver-state", - "semantic-error", - "abstract-syntax-error-falsely-constructed-message", - "unspecified"}; + static const char* options[] = {"transfer-syntax-error", + "abstract-syntax-error-reject", + "abstract-syntax-error-ignore-and-notify", + "message-not-compatible-with-receiver-state", + "semantic-error", + "abstract-syntax-error-falsely-constructed-message", + "unspecified"}; return convert_enum_idx(options, 7, value, "cause_protocol_e"); } // CauseRadioNetwork ::= ENUMERATED std::string cause_radio_network_opts::to_string() const { - static constexpr const char* options[] = {"unspecified", - "txnrelocoverall-expiry", - "successful-handover", - "release-due-to-ngran-generated-reason", - "release-due-to-5gc-generated-reason", - "handover-cancelled", - "partial-handover", - "ho-failure-in-target-5GC-ngran-node-or-target-system", - "ho-target-not-allowed", - "tngrelocoverall-expiry", - "tngrelocprep-expiry", - "cell-not-available", - "unknown-targetID", - "no-radio-resources-available-in-target-cell", - "unknown-local-UE-NGAP-ID", - "inconsistent-remote-UE-NGAP-ID", - "handover-desirable-for-radio-reason", - "time-critical-handover", - "resource-optimisation-handover", - "reduce-load-in-serving-cell", - "user-inactivity", - "radio-connection-with-ue-lost", - "radio-resources-not-available", - "invalid-qos-combination", - "failure-in-radio-interface-procedure", - "interaction-with-other-procedure", - "unknown-PDU-session-ID", - "unkown-qos-flow-ID", - "multiple-PDU-session-ID-instances", - "multiple-qos-flow-ID-instances", - "encryption-and-or-integrity-protection-algorithms-not-supported", - "ng-intra-system-handover-triggered", - "ng-inter-system-handover-triggered", - "xn-handover-triggered", - "not-supported-5QI-value", - "ue-context-transfer", - "ims-voice-eps-fallback-or-rat-fallback-triggered", - "up-integrity-protection-not-possible", - "up-confidentiality-protection-not-possible", - "slice-not-supported", - "ue-in-rrc-inactive-state-not-reachable", - "redirection", - "resources-not-available-for-the-slice", - "ue-max-integrity-protected-data-rate-reason", - "release-due-to-cn-detected-mobility", - "n26-interface-not-available", - "release-due-to-pre-emption"}; + static const char* options[] = {"unspecified", + "txnrelocoverall-expiry", + "successful-handover", + "release-due-to-ngran-generated-reason", + "release-due-to-5gc-generated-reason", + "handover-cancelled", + "partial-handover", + "ho-failure-in-target-5GC-ngran-node-or-target-system", + "ho-target-not-allowed", + "tngrelocoverall-expiry", + "tngrelocprep-expiry", + "cell-not-available", + "unknown-targetID", + "no-radio-resources-available-in-target-cell", + "unknown-local-UE-NGAP-ID", + "inconsistent-remote-UE-NGAP-ID", + "handover-desirable-for-radio-reason", + "time-critical-handover", + "resource-optimisation-handover", + "reduce-load-in-serving-cell", + "user-inactivity", + "radio-connection-with-ue-lost", + "radio-resources-not-available", + "invalid-qos-combination", + "failure-in-radio-interface-procedure", + "interaction-with-other-procedure", + "unknown-PDU-session-ID", + "unkown-qos-flow-ID", + "multiple-PDU-session-ID-instances", + "multiple-qos-flow-ID-instances", + "encryption-and-or-integrity-protection-algorithms-not-supported", + "ng-intra-system-handover-triggered", + "ng-inter-system-handover-triggered", + "xn-handover-triggered", + "not-supported-5QI-value", + "ue-context-transfer", + "ims-voice-eps-fallback-or-rat-fallback-triggered", + "up-integrity-protection-not-possible", + "up-confidentiality-protection-not-possible", + "slice-not-supported", + "ue-in-rrc-inactive-state-not-reachable", + "redirection", + "resources-not-available-for-the-slice", + "ue-max-integrity-protected-data-rate-reason", + "release-due-to-cn-detected-mobility", + "n26-interface-not-available", + "release-due-to-pre-emption"}; return convert_enum_idx(options, 47, value, "cause_radio_network_e"); } // CauseTransport ::= ENUMERATED std::string cause_transport_opts::to_string() const { - static constexpr const char* options[] = {"transport-resource-unavailable", "unspecified"}; + static const char* options[] = {"transport-resource-unavailable", "unspecified"}; return convert_enum_idx(options, 2, value, "cause_transport_e"); } // TypeOfError ::= ENUMERATED std::string type_of_error_opts::to_string() const { - static constexpr const char* options[] = {"not-understood", "missing"}; + static const char* options[] = {"not-understood", "missing"}; return convert_enum_idx(options, 2, value, "type_of_error_e"); } @@ -1830,14 +1866,13 @@ SRSASN_CODE cause_c::unpack(cbit_ref& bref) std::string cause_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "radioNetwork", "transport", "nas", "protocol", "misc", "choice-Extensions"}; + static const char* options[] = {"radioNetwork", "transport", "nas", "protocol", "misc", "choice-Extensions"}; return convert_enum_idx(options, 6, value, "cause_c::types"); } uint8_t cause_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx(options, 1, value, "cause_c::types"); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "cause_c::types"); } // CriticalityDiagnostics-IE-Item ::= SEQUENCE @@ -1926,7 +1961,7 @@ void tnlassoc_item_s::to_json(json_writer& j) const // TriggeringMessage ::= ENUMERATED std::string trigger_msg_opts::to_string() const { - static constexpr const char* options[] = {"initiating-message", "successful-outcome", "unsuccessfull-outcome"}; + static const char* options[] = {"initiating-message", "successful-outcome", "unsuccessfull-outcome"}; return convert_enum_idx(options, 3, value, "trigger_msg_e"); } @@ -1999,8 +2034,8 @@ void crit_diagnostics_s::to_json(json_writer& j) const } if (ies_crit_diagnostics_present) { j.start_array("iEsCriticalityDiagnostics"); - for (uint32_t i1 = 0; i1 < ies_crit_diagnostics.size(); ++i1) { - ies_crit_diagnostics[i1].to_json(j); + for (const auto& e1 : ies_crit_diagnostics) { + e1.to_json(j); } j.end_array(); } @@ -2014,14 +2049,14 @@ void crit_diagnostics_s::to_json(json_writer& j) const // AMFConfigurationUpdateAcknowledgeIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t amf_cfg_upd_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {5, 4, 19}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {5, 4, 19}; + return map_enum_number(options, 3, idx, "id"); } bool amf_cfg_upd_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {5, 4, 19}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {5, 4, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -2037,9 +2072,9 @@ crit_e amf_cfg_upd_ack_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } amf_cfg_upd_ack_ies_o::value_c amf_cfg_upd_ack_ies_o::get_value(const uint32_t& id) { @@ -2055,7 +2090,7 @@ amf_cfg_upd_ack_ies_o::value_c amf_cfg_upd_ack_ies_o::get_value(const uint32_t& ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -2069,9 +2104,9 @@ presence_e amf_cfg_upd_ack_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -2190,15 +2225,15 @@ void amf_cfg_upd_ack_ies_o::value_c::to_json(json_writer& j) const switch (type_) { case types::amf_tnlassoc_setup_list: j.start_array("AMF-TNLAssociationSetupList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::amf_tnlassoc_failed_to_setup_list: j.start_array("TNLAssociationList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -2252,12 +2287,11 @@ SRSASN_CODE amf_cfg_upd_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string amf_cfg_upd_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "AMF-TNLAssociationSetupList", "TNLAssociationList", "CriticalityDiagnostics"}; + static const char* options[] = {"AMF-TNLAssociationSetupList", "TNLAssociationList", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "amf_cfg_upd_ack_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; amf_cfg_upd_ack_ies_container::amf_cfg_upd_ack_ies_container() : amf_tnlassoc_setup_list(5, crit_e::ignore), @@ -2313,7 +2347,7 @@ SRSASN_CODE amf_cfg_upd_ack_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -2364,26 +2398,26 @@ void amf_cfg_upd_ack_s::to_json(json_writer& j) const // TimeToWait ::= ENUMERATED std::string time_to_wait_opts::to_string() const { - static constexpr const char* options[] = {"v1s", "v2s", "v5s", "v10s", "v20s", "v60s"}; + static const char* options[] = {"v1s", "v2s", "v5s", "v10s", "v20s", "v60s"}; return convert_enum_idx(options, 6, value, "time_to_wait_e"); } uint8_t time_to_wait_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 5, 10, 20, 60}; - return convert_enum_idx(options, 6, value, "time_to_wait_e"); + static const uint8_t options[] = {1, 2, 5, 10, 20, 60}; + return map_enum_number(options, 6, value, "time_to_wait_e"); } // AMFConfigurationUpdateFailureIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t amf_cfg_upd_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {15, 107, 19}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {15, 107, 19}; + return map_enum_number(options, 3, idx, "id"); } bool amf_cfg_upd_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {15, 107, 19}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {15, 107, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -2399,9 +2433,9 @@ crit_e amf_cfg_upd_fail_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } amf_cfg_upd_fail_ies_o::value_c amf_cfg_upd_fail_ies_o::get_value(const uint32_t& id) { @@ -2417,7 +2451,7 @@ amf_cfg_upd_fail_ies_o::value_c amf_cfg_upd_fail_ies_o::get_value(const uint32_t ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -2431,9 +2465,9 @@ presence_e amf_cfg_upd_fail_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -2604,11 +2638,11 @@ SRSASN_CODE amf_cfg_upd_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string amf_cfg_upd_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; + static const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "amf_cfg_upd_fail_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; amf_cfg_upd_fail_ies_container::amf_cfg_upd_fail_ies_container() : cause(15, crit_e::ignore), @@ -2663,12 +2697,13 @@ SRSASN_CODE amf_cfg_upd_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -2833,7 +2868,7 @@ SRSASN_CODE gnb_id_c::unpack(cbit_ref& bref) std::string gnb_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"gNB-ID", "choice-Extensions"}; + static const char* options[] = {"gNB-ID", "choice-Extensions"}; return convert_enum_idx(options, 2, value, "gnb_id_c::types"); } @@ -2958,13 +2993,13 @@ SRSASN_CODE n3_iwf_id_c::unpack(cbit_ref& bref) std::string n3_iwf_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"n3IWF-ID", "choice-Extensions"}; + static const char* options[] = {"n3IWF-ID", "choice-Extensions"}; return convert_enum_idx(options, 2, value, "n3_iwf_id_c::types"); } uint8_t n3_iwf_id_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {3}; - return convert_enum_idx(options, 1, value, "n3_iwf_id_c::types"); + static const uint8_t options[] = {3}; + return map_enum_number(options, 1, value, "n3_iwf_id_c::types"); } // NgENB-ID ::= CHOICE @@ -3130,8 +3165,7 @@ SRSASN_CODE ng_enb_id_c::unpack(cbit_ref& bref) std::string ng_enb_id_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "macroNgENB-ID", "shortMacroNgENB-ID", "longMacroNgENB-ID", "choice-Extensions"}; + static const char* options[] = {"macroNgENB-ID", "shortMacroNgENB-ID", "longMacroNgENB-ID", "choice-Extensions"}; return convert_enum_idx(options, 4, value, "ng_enb_id_c::types"); } @@ -3421,17 +3455,15 @@ SRSASN_CODE global_ran_node_id_c::unpack(cbit_ref& bref) std::string global_ran_node_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"globalGNB-ID", "globalNgENB-ID", "globalN3IWF-ID", "choice-Extensions"}; + static const char* options[] = {"globalGNB-ID", "globalNgENB-ID", "globalN3IWF-ID", "choice-Extensions"}; return convert_enum_idx(options, 4, value, "global_ran_node_id_c::types"); } uint8_t global_ran_node_id_c::types_opts::to_number() const { - switch (value) { - case global_n3_iwf_id: - return 3; - default: - invalid_enum_number(value, "global_ran_node_id_c::types"); + if (value == global_n3_iwf_id) { + return 3; } + invalid_enum_number(value, "global_ran_node_id_c::types"); return 0; } @@ -3618,14 +3650,14 @@ SRSASN_CODE amf_paging_target_c::unpack(cbit_ref& bref) std::string amf_paging_target_c::types_opts::to_string() const { - static constexpr const char* options[] = {"globalRANNodeID", "tAI", "choice-Extensions"}; + static const char* options[] = {"globalRANNodeID", "tAI", "choice-Extensions"}; return convert_enum_idx(options, 3, value, "amf_paging_target_c::types"); } // TimerApproachForGUAMIRemoval ::= ENUMERATED std::string timer_approach_for_guami_removal_opts::to_string() const { - static constexpr const char* options[] = {"apply-timer"}; + static const char* options[] = {"apply-timer"}; return convert_enum_idx(options, 1, value, "timer_approach_for_guami_removal_e"); } @@ -3691,49 +3723,36 @@ void unavailable_guami_item_s::to_json(json_writer& j) const // AMFStatusIndicationIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t amf_status_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {120}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {120}; + return map_enum_number(options, 1, idx, "id"); } bool amf_status_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {120}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 120 == id; } crit_e amf_status_ind_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 120: - return crit_e::reject; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 120) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } amf_status_ind_ies_o::value_c amf_status_ind_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 120: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 120) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e amf_status_ind_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 120: - return presence_e::mandatory; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 120) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -3741,8 +3760,8 @@ void amf_status_ind_ies_o::value_c::to_json(json_writer& j) const { j.start_obj(); j.start_array("UnavailableGUAMIList"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -3762,11 +3781,11 @@ SRSASN_CODE amf_status_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string amf_status_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"UnavailableGUAMIList"}; + static const char* options[] = {"UnavailableGUAMIList"}; return convert_enum_idx(options, 1, value, "amf_status_ind_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; amf_status_ind_ies_container::amf_status_ind_ies_container() : unavailable_guami_list(120, crit_e::reject) {} SRSASN_CODE amf_status_ind_ies_container::pack(bit_ref& bref) const @@ -3788,20 +3807,19 @@ SRSASN_CODE amf_status_ind_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 120: - nof_mandatory_ies--; - unavailable_guami_list.id = c.id; - unavailable_guami_list.crit = c.crit; - unavailable_guami_list.value = c.value.unavailable_guami_list(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 120) { + nof_mandatory_ies--; + unavailable_guami_list.id = c.id; + unavailable_guami_list.crit = c.crit; + unavailable_guami_list.value = c.value.unavailable_guami_list(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -3840,7 +3858,7 @@ void amf_status_ind_s::to_json(json_writer& j) const // DataForwardingAccepted ::= ENUMERATED std::string data_forwarding_accepted_opts::to_string() const { - static constexpr const char* options[] = {"data-forwarding-accepted"}; + static const char* options[] = {"data-forwarding-accepted"}; return convert_enum_idx(options, 1, value, "data_forwarding_accepted_e"); } @@ -4052,7 +4070,7 @@ SRSASN_CODE up_transport_layer_info_c::unpack(cbit_ref& bref) std::string up_transport_layer_info_c::types_opts::to_string() const { - static constexpr const char* options[] = {"gTPTunnel", "choice-Extensions"}; + static const char* options[] = {"gTPTunnel", "choice-Extensions"}; return convert_enum_idx(options, 2, value, "up_transport_layer_info_c::types"); } @@ -4097,8 +4115,8 @@ void add_dluptnl_info_for_ho_item_s::to_json(json_writer& j) const j.write_fieldname("additionalDL-NGU-UP-TNLInformation"); add_dl_ngu_up_tnl_info.to_json(j); j.start_array("additionalQosFlowSetupResponseList"); - for (uint32_t i1 = 0; i1 < add_qos_flow_setup_resp_list.size(); ++i1) { - add_qos_flow_setup_resp_list[i1].to_json(j); + for (const auto& e1 : add_qos_flow_setup_resp_list) { + e1.to_json(j); } j.end_array(); if (add_dl_forwarding_uptnl_info_present) { @@ -4115,14 +4133,14 @@ void add_dluptnl_info_for_ho_item_s::to_json(json_writer& j) const // Pre-emptionCapability ::= ENUMERATED std::string pre_emption_cap_opts::to_string() const { - static constexpr const char* options[] = {"shall-not-trigger-pre-emption", "may-trigger-pre-emption"}; + static const char* options[] = {"shall-not-trigger-pre-emption", "may-trigger-pre-emption"}; return convert_enum_idx(options, 2, value, "pre_emption_cap_e"); } // Pre-emptionVulnerability ::= ENUMERATED std::string pre_emption_vulnerability_opts::to_string() const { - static constexpr const char* options[] = {"not-pre-emptable", "pre-emptable"}; + static const char* options[] = {"not-pre-emptable", "pre-emptable"}; return convert_enum_idx(options, 2, value, "pre_emption_vulnerability_e"); } @@ -4427,7 +4445,7 @@ SRSASN_CODE ngran_cgi_c::unpack(cbit_ref& bref) std::string ngran_cgi_c::types_opts::to_string() const { - static constexpr const char* options[] = {"nR-CGI", "eUTRA-CGI", "choice-Extensions"}; + static const char* options[] = {"nR-CGI", "eUTRA-CGI", "choice-Extensions"}; return convert_enum_idx(options, 3, value, "ngran_cgi_c::types"); } @@ -4594,22 +4612,22 @@ void area_of_interest_s::to_json(json_writer& j) const j.start_obj(); if (area_of_interest_tai_list_present) { j.start_array("areaOfInterestTAIList"); - for (uint32_t i1 = 0; i1 < area_of_interest_tai_list.size(); ++i1) { - area_of_interest_tai_list[i1].to_json(j); + for (const auto& e1 : area_of_interest_tai_list) { + e1.to_json(j); } j.end_array(); } if (area_of_interest_cell_list_present) { j.start_array("areaOfInterestCellList"); - for (uint32_t i1 = 0; i1 < area_of_interest_cell_list.size(); ++i1) { - area_of_interest_cell_list[i1].to_json(j); + for (const auto& e1 : area_of_interest_cell_list) { + e1.to_json(j); } j.end_array(); } if (area_of_interest_ran_node_list_present) { j.start_array("areaOfInterestRANNodeList"); - for (uint32_t i1 = 0; i1 < area_of_interest_ran_node_list.size(); ++i1) { - area_of_interest_ran_node_list[i1].to_json(j); + for (const auto& e1 : area_of_interest_ran_node_list) { + e1.to_json(j); } j.end_array(); } @@ -4711,7 +4729,7 @@ void recommended_cell_item_s::to_json(json_writer& j) const // NextPagingAreaScope ::= ENUMERATED std::string next_paging_area_scope_opts::to_string() const { - static constexpr const char* options[] = {"same", "changed"}; + static const char* options[] = {"same", "changed"}; return convert_enum_idx(options, 2, value, "next_paging_area_scope_e"); } @@ -4744,8 +4762,8 @@ void recommended_cells_for_paging_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("recommendedCellList"); - for (uint32_t i1 = 0; i1 < recommended_cell_list.size(); ++i1) { - recommended_cell_list[i1].to_json(j); + for (const auto& e1 : recommended_cell_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -4948,7 +4966,7 @@ void associated_qos_flow_item_s::to_json(json_writer& j) const std::string associated_qos_flow_item_s::qos_flow_map_ind_opts::to_string() const { - static constexpr const char* options[] = {"ul", "dl"}; + static const char* options[] = {"ul", "dl"}; return convert_enum_idx(options, 2, value, "associated_qos_flow_item_s::qos_flow_map_ind_e_"); } @@ -5224,8 +5242,8 @@ void emergency_area_id_cancelled_eutra_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("emergencyAreaID", emergency_area_id.to_string()); j.start_array("cancelledCellsInEAI-EUTRA"); - for (uint32_t i1 = 0; i1 < cancelled_cells_in_eai_eutra.size(); ++i1) { - cancelled_cells_in_eai_eutra[i1].to_json(j); + for (const auto& e1 : cancelled_cells_in_eai_eutra) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -5267,8 +5285,8 @@ void emergency_area_id_cancelled_nr_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("emergencyAreaID", emergency_area_id.to_string()); j.start_array("cancelledCellsInEAI-NR"); - for (uint32_t i1 = 0; i1 < cancelled_cells_in_eai_nr.size(); ++i1) { - cancelled_cells_in_eai_nr[i1].to_json(j); + for (const auto& e1 : cancelled_cells_in_eai_nr) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -5311,8 +5329,8 @@ void tai_cancelled_eutra_item_s::to_json(json_writer& j) const j.write_fieldname("tAI"); tai.to_json(j); j.start_array("cancelledCellsInTAI-EUTRA"); - for (uint32_t i1 = 0; i1 < cancelled_cells_in_tai_eutra.size(); ++i1) { - cancelled_cells_in_tai_eutra[i1].to_json(j); + for (const auto& e1 : cancelled_cells_in_tai_eutra) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -5355,8 +5373,8 @@ void tai_cancelled_nr_item_s::to_json(json_writer& j) const j.write_fieldname("tAI"); tai.to_json(j); j.start_array("cancelledCellsInTAI-NR"); - for (uint32_t i1 = 0; i1 < cancelled_cells_in_tai_nr.size(); ++i1) { - cancelled_cells_in_tai_nr[i1].to_json(j); + for (const auto& e1 : cancelled_cells_in_tai_nr) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -5501,43 +5519,43 @@ void broadcast_cancelled_area_list_c::to_json(json_writer& j) const switch (type_) { case types::cell_id_cancelled_eutra: j.start_array("cellIDCancelledEUTRA"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::tai_cancelled_eutra: j.start_array("tAICancelledEUTRA"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::emergency_area_id_cancelled_eutra: j.start_array("emergencyAreaIDCancelledEUTRA"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::cell_id_cancelled_nr: j.start_array("cellIDCancelledNR"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::tai_cancelled_nr: j.start_array("tAICancelledNR"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::emergency_area_id_cancelled_nr: j.start_array("emergencyAreaIDCancelledNR"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -5617,13 +5635,13 @@ SRSASN_CODE broadcast_cancelled_area_list_c::unpack(cbit_ref& bref) std::string broadcast_cancelled_area_list_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellIDCancelledEUTRA", - "tAICancelledEUTRA", - "emergencyAreaIDCancelledEUTRA", - "cellIDCancelledNR", - "tAICancelledNR", - "emergencyAreaIDCancelledNR", - "choice-Extensions"}; + static const char* options[] = {"cellIDCancelledEUTRA", + "tAICancelledEUTRA", + "emergencyAreaIDCancelledEUTRA", + "cellIDCancelledNR", + "tAICancelledNR", + "emergencyAreaIDCancelledNR", + "choice-Extensions"}; return convert_enum_idx(options, 7, value, "broadcast_cancelled_area_list_c::types"); } @@ -5881,8 +5899,8 @@ void emergency_area_id_broadcast_eutra_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("emergencyAreaID", emergency_area_id.to_string()); j.start_array("completedCellsInEAI-EUTRA"); - for (uint32_t i1 = 0; i1 < completed_cells_in_eai_eutra.size(); ++i1) { - completed_cells_in_eai_eutra[i1].to_json(j); + for (const auto& e1 : completed_cells_in_eai_eutra) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -5924,8 +5942,8 @@ void emergency_area_id_broadcast_nr_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("emergencyAreaID", emergency_area_id.to_string()); j.start_array("completedCellsInEAI-NR"); - for (uint32_t i1 = 0; i1 < completed_cells_in_eai_nr.size(); ++i1) { - completed_cells_in_eai_nr[i1].to_json(j); + for (const auto& e1 : completed_cells_in_eai_nr) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -5968,8 +5986,8 @@ void tai_broadcast_eutra_item_s::to_json(json_writer& j) const j.write_fieldname("tAI"); tai.to_json(j); j.start_array("completedCellsInTAI-EUTRA"); - for (uint32_t i1 = 0; i1 < completed_cells_in_tai_eutra.size(); ++i1) { - completed_cells_in_tai_eutra[i1].to_json(j); + for (const auto& e1 : completed_cells_in_tai_eutra) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -6012,8 +6030,8 @@ void tai_broadcast_nr_item_s::to_json(json_writer& j) const j.write_fieldname("tAI"); tai.to_json(j); j.start_array("completedCellsInTAI-NR"); - for (uint32_t i1 = 0; i1 < completed_cells_in_tai_nr.size(); ++i1) { - completed_cells_in_tai_nr[i1].to_json(j); + for (const auto& e1 : completed_cells_in_tai_nr) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -6158,43 +6176,43 @@ void broadcast_completed_area_list_c::to_json(json_writer& j) const switch (type_) { case types::cell_id_broadcast_eutra: j.start_array("cellIDBroadcastEUTRA"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::tai_broadcast_eutra: j.start_array("tAIBroadcastEUTRA"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::emergency_area_id_broadcast_eutra: j.start_array("emergencyAreaIDBroadcastEUTRA"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::cell_id_broadcast_nr: j.start_array("cellIDBroadcastNR"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::tai_broadcast_nr: j.start_array("tAIBroadcastNR"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::emergency_area_id_broadcast_nr: j.start_array("emergencyAreaIDBroadcastNR"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -6274,13 +6292,13 @@ SRSASN_CODE broadcast_completed_area_list_c::unpack(cbit_ref& bref) std::string broadcast_completed_area_list_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellIDBroadcastEUTRA", - "tAIBroadcastEUTRA", - "emergencyAreaIDBroadcastEUTRA", - "cellIDBroadcastNR", - "tAIBroadcastNR", - "emergencyAreaIDBroadcastNR", - "choice-Extensions"}; + static const char* options[] = {"cellIDBroadcastEUTRA", + "tAIBroadcastEUTRA", + "emergencyAreaIDBroadcastEUTRA", + "cellIDBroadcastNR", + "tAIBroadcastNR", + "emergencyAreaIDBroadcastNR", + "choice-Extensions"}; return convert_enum_idx(options, 7, value, "broadcast_completed_area_list_c::types"); } @@ -6316,8 +6334,8 @@ void broadcast_plmn_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("pLMNIdentity", plmn_id.to_string()); j.start_array("tAISliceSupportList"); - for (uint32_t i1 = 0; i1 < tai_slice_support_list.size(); ++i1) { - tai_slice_support_list[i1].to_json(j); + for (const auto& e1 : tai_slice_support_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -6491,15 +6509,15 @@ void cell_id_list_for_restart_c::to_json(json_writer& j) const switch (type_) { case types::eutra_cgi_listfor_restart: j.start_array("eUTRA-CGIListforRestart"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::nr_cgi_listfor_restart: j.start_array("nR-CGIListforRestart"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -6555,21 +6573,21 @@ SRSASN_CODE cell_id_list_for_restart_c::unpack(cbit_ref& bref) std::string cell_id_list_for_restart_c::types_opts::to_string() const { - static constexpr const char* options[] = {"eUTRA-CGIListforRestart", "nR-CGIListforRestart", "choice-Extensions"}; + static const char* options[] = {"eUTRA-CGIListforRestart", "nR-CGIListforRestart", "choice-Extensions"}; return convert_enum_idx(options, 3, value, "cell_id_list_for_restart_c::types"); } // CellTrafficTraceIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t cell_traffic_trace_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 44, 43, 109}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {10, 85, 44, 43, 109}; + return map_enum_number(options, 5, idx, "id"); } bool cell_traffic_trace_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 44, 43, 109}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 44, 43, 109}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -6589,9 +6607,9 @@ crit_e cell_traffic_trace_ies_o::get_crit(const uint32_t& id) case 109: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } cell_traffic_trace_ies_o::value_c cell_traffic_trace_ies_o::get_value(const uint32_t& id) { @@ -6613,7 +6631,7 @@ cell_traffic_trace_ies_o::value_c cell_traffic_trace_ies_o::get_value(const uint ret.set(value_c::types::trace_collection_entity_ip_address); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -6631,9 +6649,9 @@ presence_e cell_traffic_trace_ies_o::get_presence(const uint32_t& id) case 109: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -6862,12 +6880,12 @@ SRSASN_CODE cell_traffic_trace_ies_o::value_c::unpack(cbit_ref& bref) std::string cell_traffic_trace_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING", "NGRAN-CGI", "BIT STRING"}; return convert_enum_idx(options, 5, value, "cell_traffic_trace_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; cell_traffic_trace_ies_container::cell_traffic_trace_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -6932,12 +6950,13 @@ SRSASN_CODE cell_traffic_trace_ies_container::unpack(cbit_ref& bref) trace_collection_entity_ip_address.value = c.value.trace_collection_entity_ip_address(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -6984,7 +7003,7 @@ void cell_traffic_trace_s::to_json(json_writer& j) const // CellSize ::= ENUMERATED std::string cell_size_opts::to_string() const { - static constexpr const char* options[] = {"verysmall", "small", "medium", "large"}; + static const char* options[] = {"verysmall", "small", "medium", "large"}; return convert_enum_idx(options, 4, value, "cell_size_e"); } @@ -7075,20 +7094,20 @@ void expected_ue_moving_trajectory_item_s::to_json(json_writer& j) const // SourceOfUEActivityBehaviourInformation ::= ENUMERATED std::string source_of_ue_activity_behaviour_info_opts::to_string() const { - static constexpr const char* options[] = {"subscription-information", "statistics"}; + static const char* options[] = {"subscription-information", "statistics"}; return convert_enum_idx(options, 2, value, "source_of_ue_activity_behaviour_info_e"); } // ExpectedHOInterval ::= ENUMERATED std::string expected_ho_interv_opts::to_string() const { - static constexpr const char* options[] = {"sec15", "sec30", "sec60", "sec90", "sec120", "sec180", "long-time"}; + static const char* options[] = {"sec15", "sec30", "sec60", "sec90", "sec120", "sec180", "long-time"}; return convert_enum_idx(options, 7, value, "expected_ho_interv_e"); } uint8_t expected_ho_interv_opts::to_number() const { - static constexpr uint8_t options[] = {15, 30, 60, 90, 120, 180}; - return convert_enum_idx(options, 6, value, "expected_ho_interv_e"); + static const uint8_t options[] = {15, 30, 60, 90, 120, 180}; + return map_enum_number(options, 6, value, "expected_ho_interv_e"); } // ExpectedUEActivityBehaviour ::= SEQUENCE @@ -7160,7 +7179,7 @@ void expected_ue_activity_behaviour_s::to_json(json_writer& j) const // ExpectedUEMobility ::= ENUMERATED std::string expected_ue_mob_opts::to_string() const { - static constexpr const char* options[] = {"stationary", "mobile"}; + static const char* options[] = {"stationary", "mobile"}; return convert_enum_idx(options, 2, value, "expected_ue_mob_e"); } @@ -7271,8 +7290,8 @@ void expected_ue_behaviour_s::to_json(json_writer& j) const } if (expected_ue_moving_trajectory_present) { j.start_array("expectedUEMovingTrajectory"); - for (uint32_t i1 = 0; i1 < expected_ue_moving_trajectory.size(); ++i1) { - expected_ue_moving_trajectory[i1].to_json(j); + for (const auto& e1 : expected_ue_moving_trajectory) { + e1.to_json(j); } j.end_array(); } @@ -7286,20 +7305,20 @@ void expected_ue_behaviour_s::to_json(json_writer& j) const // MICOModeIndication ::= ENUMERATED std::string mico_mode_ind_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "mico_mode_ind_e"); } // PagingDRX ::= ENUMERATED std::string paging_drx_opts::to_string() const { - static constexpr const char* options[] = {"v32", "v64", "v128", "v256"}; + static const char* options[] = {"v32", "v64", "v128", "v256"}; return convert_enum_idx(options, 4, value, "paging_drx_e"); } uint16_t paging_drx_opts::to_number() const { - static constexpr uint16_t options[] = {32, 64, 128, 256}; - return convert_enum_idx(options, 4, value, "paging_drx_e"); + static const uint16_t options[] = {32, 64, 128, 256}; + return map_enum_number(options, 4, value, "paging_drx_e"); } // UEIdentityIndexValue ::= CHOICE @@ -7423,13 +7442,13 @@ SRSASN_CODE ue_id_idx_value_c::unpack(cbit_ref& bref) std::string ue_id_idx_value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"indexLength10", "choice-Extensions"}; + static const char* options[] = {"indexLength10", "choice-Extensions"}; return convert_enum_idx(options, 2, value, "ue_id_idx_value_c::types"); } uint8_t ue_id_idx_value_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {10}; - return convert_enum_idx(options, 1, value, "ue_id_idx_value_c::types"); + static const uint8_t options[] = {10}; + return map_enum_number(options, 1, value, "ue_id_idx_value_c::types"); } // CoreNetworkAssistanceInformation ::= SEQUENCE @@ -7498,8 +7517,8 @@ void core_network_assist_info_s::to_json(json_writer& j) const j.write_str("mICOModeIndication", "true"); } j.start_array("tAIListForInactive"); - for (uint32_t i1 = 0; i1 < tai_list_for_inactive.size(); ++i1) { - tai_list_for_inactive[i1].to_json(j); + for (const auto& e1 : tai_list_for_inactive) { + e1.to_json(j); } j.end_array(); if (expected_ue_behaviour_present) { @@ -7731,13 +7750,13 @@ SRSASN_CODE drb_status_dl_c::unpack(cbit_ref& bref) std::string drb_status_dl_c::types_opts::to_string() const { - static constexpr const char* options[] = {"dRBStatusDL12", "dRBStatusDL18", "choice-Extensions"}; + static const char* options[] = {"dRBStatusDL12", "dRBStatusDL18", "choice-Extensions"}; return convert_enum_idx(options, 3, value, "drb_status_dl_c::types"); } uint8_t drb_status_dl_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {12, 18}; - return convert_enum_idx(options, 2, value, "drb_status_dl_c::types"); + static const uint8_t options[] = {12, 18}; + return map_enum_number(options, 2, value, "drb_status_dl_c::types"); } // DRBStatusUL12 ::= SEQUENCE @@ -7980,13 +7999,13 @@ SRSASN_CODE drb_status_ul_c::unpack(cbit_ref& bref) std::string drb_status_ul_c::types_opts::to_string() const { - static constexpr const char* options[] = {"dRBStatusUL12", "dRBStatusUL18", "choice-Extensions"}; + static const char* options[] = {"dRBStatusUL12", "dRBStatusUL18", "choice-Extensions"}; return convert_enum_idx(options, 3, value, "drb_status_ul_c::types"); } uint8_t drb_status_ul_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {12, 18}; - return convert_enum_idx(options, 2, value, "drb_status_ul_c::types"); + static const uint8_t options[] = {12, 18}; + return map_enum_number(options, 2, value, "drb_status_ul_c::types"); } // DRBsSubjectToStatusTransferItem ::= SEQUENCE @@ -8065,8 +8084,8 @@ void drbs_to_qos_flows_map_item_s::to_json(json_writer& j) const j.start_obj(); j.write_int("dRB-ID", drb_id); j.start_array("associatedQosFlowList"); - for (uint32_t i1 = 0; i1 < associated_qos_flow_list.size(); ++i1) { - associated_qos_flow_list[i1].to_json(j); + for (const auto& e1 : associated_qos_flow_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -8139,14 +8158,14 @@ void data_forwarding_resp_drb_item_s::to_json(json_writer& j) const // DeactivateTraceIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t deactiv_trace_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 44}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 85, 44}; + return map_enum_number(options, 3, idx, "id"); } bool deactiv_trace_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 44}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 44}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -8162,9 +8181,9 @@ crit_e deactiv_trace_ies_o::get_crit(const uint32_t& id) case 44: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } deactiv_trace_ies_o::value_c deactiv_trace_ies_o::get_value(const uint32_t& id) { @@ -8180,7 +8199,7 @@ deactiv_trace_ies_o::value_c deactiv_trace_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::ngran_trace_id); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -8194,9 +8213,9 @@ presence_e deactiv_trace_ies_o::get_presence(const uint32_t& id) case 44: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -8360,11 +8379,11 @@ SRSASN_CODE deactiv_trace_ies_o::value_c::unpack(cbit_ref& bref) std::string deactiv_trace_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING"}; + static const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING"}; return convert_enum_idx(options, 3, value, "deactiv_trace_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; deactiv_trace_ies_container::deactiv_trace_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -8413,12 +8432,13 @@ SRSASN_CODE deactiv_trace_ies_container::unpack(cbit_ref& bref) ngran_trace_id.value = c.value.ngran_trace_id(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -8490,8 +8510,8 @@ void forbidden_area_info_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("pLMNIdentity", plmn_id.to_string()); j.start_array("forbiddenTACs"); - for (uint32_t i1 = 0; i1 < forbidden_tacs.size(); ++i1) { - j.write_str(forbidden_tacs[i1].to_string()); + for (const auto& e1 : forbidden_tacs) { + j.write_str(e1.to_string()); } j.end_array(); if (ie_exts_present) { @@ -8587,15 +8607,15 @@ void service_area_info_item_s::to_json(json_writer& j) const j.write_str("pLMNIdentity", plmn_id.to_string()); if (allowed_tacs_present) { j.start_array("allowedTACs"); - for (uint32_t i1 = 0; i1 < allowed_tacs.size(); ++i1) { - j.write_str(allowed_tacs[i1].to_string()); + for (const auto& e1 : allowed_tacs) { + j.write_str(e1.to_string()); } j.end_array(); } if (not_allowed_tacs_present) { j.start_array("notAllowedTACs"); - for (uint32_t i1 = 0; i1 < not_allowed_tacs.size(); ++i1) { - j.write_str(not_allowed_tacs[i1].to_string()); + for (const auto& e1 : not_allowed_tacs) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -8609,49 +8629,36 @@ void service_area_info_item_s::to_json(json_writer& j) const // MobilityRestrictionList-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t mob_restrict_list_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {150}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {150}; + return map_enum_number(options, 1, idx, "id"); } bool mob_restrict_list_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {150}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 150 == id; } crit_e mob_restrict_list_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 150: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 150) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } mob_restrict_list_ext_ies_o::ext_c mob_restrict_list_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 150: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 150) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e mob_restrict_list_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 150: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 150) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -8676,11 +8683,11 @@ SRSASN_CODE mob_restrict_list_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string mob_restrict_list_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"OCTET STRING"}; + static const char* options[] = {"OCTET STRING"}; return convert_enum_idx(options, 1, value, "mob_restrict_list_ext_ies_o::ext_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; mob_restrict_list_ext_ies_container::mob_restrict_list_ext_ies_container() : last_eutran_plmn_id(150, crit_e::ignore) {} SRSASN_CODE mob_restrict_list_ext_ies_container::pack(bit_ref& bref) const @@ -8703,16 +8710,14 @@ SRSASN_CODE mob_restrict_list_ext_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 150: - last_eutran_plmn_id_present = true; - last_eutran_plmn_id.id = c.id; - last_eutran_plmn_id.crit = c.crit; - last_eutran_plmn_id.ext = c.ext_value.last_eutran_plmn_id(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 150) { + last_eutran_plmn_id_present = true; + last_eutran_plmn_id.id = c.id; + last_eutran_plmn_id.crit = c.crit; + last_eutran_plmn_id.ext = c.ext_value.last_eutran_plmn_id(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -8791,29 +8796,29 @@ void mob_restrict_list_s::to_json(json_writer& j) const j.write_str("servingPLMN", serving_plmn.to_string()); if (equivalent_plmns_present) { j.start_array("equivalentPLMNs"); - for (uint32_t i1 = 0; i1 < equivalent_plmns.size(); ++i1) { - j.write_str(equivalent_plmns[i1].to_string()); + for (const auto& e1 : equivalent_plmns) { + j.write_str(e1.to_string()); } j.end_array(); } if (rat_restricts_present) { j.start_array("rATRestrictions"); - for (uint32_t i1 = 0; i1 < rat_restricts.size(); ++i1) { - rat_restricts[i1].to_json(j); + for (const auto& e1 : rat_restricts) { + e1.to_json(j); } j.end_array(); } if (forbidden_area_info_present) { j.start_array("forbiddenAreaInformation"); - for (uint32_t i1 = 0; i1 < forbidden_area_info.size(); ++i1) { - forbidden_area_info[i1].to_json(j); + for (const auto& e1 : forbidden_area_info) { + e1.to_json(j); } j.end_array(); } if (service_area_info_present) { j.start_array("serviceAreaInformation"); - for (uint32_t i1 = 0; i1 < service_area_info.size(); ++i1) { - service_area_info[i1].to_json(j); + for (const auto& e1 : service_area_info) { + e1.to_json(j); } j.end_array(); } @@ -8868,14 +8873,14 @@ void ue_aggregate_maximum_bit_rate_s::to_json(json_writer& j) const // DownlinkNASTransport-IEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t dl_nas_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 48, 83, 38, 36, 31, 110, 0}; - return convert_enum_idx(options, 9, idx, "id"); + static const uint32_t options[] = {10, 85, 48, 83, 38, 36, 31, 110, 0}; + return map_enum_number(options, 9, idx, "id"); } bool dl_nas_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 48, 83, 38, 36, 31, 110, 0}; - for (uint32_t i = 0; i < 9; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 48, 83, 38, 36, 31, 110, 0}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -8903,9 +8908,9 @@ crit_e dl_nas_transport_ies_o::get_crit(const uint32_t& id) case 0: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } dl_nas_transport_ies_o::value_c dl_nas_transport_ies_o::get_value(const uint32_t& id) { @@ -8939,7 +8944,7 @@ dl_nas_transport_ies_o::value_c dl_nas_transport_ies_o::get_value(const uint32_t ret.set(value_c::types::allowed_nssai); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -8965,9 +8970,9 @@ presence_e dl_nas_transport_ies_o::get_presence(const uint32_t& id) case 0: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -9229,8 +9234,8 @@ void dl_nas_transport_ies_o::value_c::to_json(json_writer& j) const break; case types::allowed_nssai: j.start_array("AllowedNSSAI"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -9316,19 +9321,19 @@ SRSASN_CODE dl_nas_transport_ies_o::value_c::unpack(cbit_ref& bref) std::string dl_nas_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PrintableString", - "INTEGER (1..256)", - "OCTET STRING", - "MobilityRestrictionList", - "INTEGER (1..256,...)", - "UEAggregateMaximumBitRate", - "AllowedNSSAI"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PrintableString", + "INTEGER (1..256)", + "OCTET STRING", + "MobilityRestrictionList", + "INTEGER (1..256,...)", + "UEAggregateMaximumBitRate", + "AllowedNSSAI"}; return convert_enum_idx(options, 9, value, "dl_nas_transport_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; dl_nas_transport_ies_container::dl_nas_transport_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -9443,12 +9448,13 @@ SRSASN_CODE dl_nas_transport_ies_container::unpack(cbit_ref& bref) allowed_nssai.value = c.value.allowed_nssai(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -9515,14 +9521,14 @@ void dl_nas_transport_s::to_json(json_writer& j) const // DownlinkNonUEAssociatedNRPPaTransportIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t dl_non_ueassociated_nrp_pa_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {89, 46}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {89, 46}; + return map_enum_number(options, 2, idx, "id"); } bool dl_non_ueassociated_nrp_pa_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {89, 46}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {89, 46}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -9536,9 +9542,9 @@ crit_e dl_non_ueassociated_nrp_pa_transport_ies_o::get_crit(const uint32_t& id) case 46: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } dl_non_ueassociated_nrp_pa_transport_ies_o::value_c dl_non_ueassociated_nrp_pa_transport_ies_o::get_value(const uint32_t& id) @@ -9552,7 +9558,7 @@ dl_non_ueassociated_nrp_pa_transport_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::nrp_pa_pdu); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -9564,9 +9570,9 @@ presence_e dl_non_ueassociated_nrp_pa_transport_ies_o::get_presence(const uint32 case 46: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -9709,11 +9715,11 @@ SRSASN_CODE dl_non_ueassociated_nrp_pa_transport_ies_o::value_c::unpack(cbit_ref std::string dl_non_ueassociated_nrp_pa_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"OCTET STRING", "OCTET STRING"}; + static const char* options[] = {"OCTET STRING", "OCTET STRING"}; return convert_enum_idx(options, 2, value, "dl_non_ueassociated_nrp_pa_transport_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; dl_non_ueassociated_nrp_pa_transport_ies_container::dl_non_ueassociated_nrp_pa_transport_ies_container() : routing_id(89, crit_e::reject), @@ -9754,12 +9760,13 @@ SRSASN_CODE dl_non_ueassociated_nrp_pa_transport_ies_container::unpack(cbit_ref& nrp_pa_pdu.value = c.value.nrp_pa_pdu(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -9844,8 +9851,8 @@ void xn_ext_tla_item_s::to_json(json_writer& j) const } if (gtp_tlas_present) { j.start_array("gTP-TLAs"); - for (uint32_t i1 = 0; i1 < gtp_tlas.size(); ++i1) { - j.write_str(gtp_tlas[i1].to_string()); + for (const auto& e1 : gtp_tlas) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -9893,14 +9900,14 @@ void xn_tnl_cfg_info_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("xnTransportLayerAddresses"); - for (uint32_t i1 = 0; i1 < xn_transport_layer_addresses.size(); ++i1) { - j.write_str(xn_transport_layer_addresses[i1].to_string()); + for (const auto& e1 : xn_transport_layer_addresses) { + j.write_str(e1.to_string()); } j.end_array(); if (xn_extended_transport_layer_addresses_present) { j.start_array("xnExtendedTransportLayerAddresses"); - for (uint32_t i1 = 0; i1 < xn_extended_transport_layer_addresses.size(); ++i1) { - xn_extended_transport_layer_addresses[i1].to_json(j); + for (const auto& e1 : xn_extended_transport_layer_addresses) { + e1.to_json(j); } j.end_array(); } @@ -9959,7 +9966,7 @@ void son_info_reply_s::to_json(json_writer& j) const // SONInformationRequest ::= ENUMERATED std::string son_info_request_opts::to_string() const { - static constexpr const char* options[] = {"xn-TNL-configuration-info"}; + static const char* options[] = {"xn-TNL-configuration-info"}; return convert_enum_idx(options, 1, value, "son_info_request_e"); } @@ -10102,7 +10109,7 @@ SRSASN_CODE son_info_c::unpack(cbit_ref& bref) std::string son_info_c::types_opts::to_string() const { - static constexpr const char* options[] = {"sONInformationRequest", "sONInformationReply", "choice-Extensions"}; + static const char* options[] = {"sONInformationRequest", "sONInformationReply", "choice-Extensions"}; return convert_enum_idx(options, 3, value, "son_info_c::types"); } @@ -10248,14 +10255,14 @@ void son_cfg_transfer_s::to_json(json_writer& j) const // DownlinkRANConfigurationTransferIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t dl_ran_cfg_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {98, 157}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {98, 157}; + return map_enum_number(options, 2, idx, "id"); } bool dl_ran_cfg_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {98, 157}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {98, 157}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -10269,9 +10276,9 @@ crit_e dl_ran_cfg_transfer_ies_o::get_crit(const uint32_t& id) case 157: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } dl_ran_cfg_transfer_ies_o::value_c dl_ran_cfg_transfer_ies_o::get_value(const uint32_t& id) { @@ -10284,7 +10291,7 @@ dl_ran_cfg_transfer_ies_o::value_c dl_ran_cfg_transfer_ies_o::get_value(const ui ret.set(value_c::types::endc_son_cfg_transfer_dl); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -10296,9 +10303,9 @@ presence_e dl_ran_cfg_transfer_ies_o::get_presence(const uint32_t& id) case 157: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -10441,11 +10448,11 @@ SRSASN_CODE dl_ran_cfg_transfer_ies_o::value_c::unpack(cbit_ref& bref) std::string dl_ran_cfg_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"SONConfigurationTransfer", "OCTET STRING"}; + static const char* options[] = {"SONConfigurationTransfer", "OCTET STRING"}; return convert_enum_idx(options, 2, value, "dl_ran_cfg_transfer_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; dl_ran_cfg_transfer_ies_container::dl_ran_cfg_transfer_ies_container() : son_cfg_transfer_dl(98, crit_e::ignore), @@ -10490,7 +10497,7 @@ SRSASN_CODE dl_ran_cfg_transfer_ies_container::unpack(cbit_ref& bref) endc_son_cfg_transfer_dl.value = c.value.endc_son_cfg_transfer_dl(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -10563,8 +10570,8 @@ void ran_status_transfer_transparent_container_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("dRBsSubjectToStatusTransferList"); - for (uint32_t i1 = 0; i1 < drbs_subject_to_status_transfer_list.size(); ++i1) { - drbs_subject_to_status_transfer_list[i1].to_json(j); + for (const auto& e1 : drbs_subject_to_status_transfer_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -10577,14 +10584,14 @@ void ran_status_transfer_transparent_container_s::to_json(json_writer& j) const // DownlinkRANStatusTransferIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t dl_ran_status_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 84}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 85, 84}; + return map_enum_number(options, 3, idx, "id"); } bool dl_ran_status_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 84}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 84}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -10600,9 +10607,9 @@ crit_e dl_ran_status_transfer_ies_o::get_crit(const uint32_t& id) case 84: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } dl_ran_status_transfer_ies_o::value_c dl_ran_status_transfer_ies_o::get_value(const uint32_t& id) { @@ -10618,7 +10625,7 @@ dl_ran_status_transfer_ies_o::value_c dl_ran_status_transfer_ies_o::get_value(co ret.set(value_c::types::ran_status_transfer_transparent_container); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -10632,9 +10639,9 @@ presence_e dl_ran_status_transfer_ies_o::get_presence(const uint32_t& id) case 84: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -10802,12 +10809,12 @@ SRSASN_CODE dl_ran_status_transfer_ies_o::value_c::unpack(cbit_ref& bref) std::string dl_ran_status_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "RANStatusTransfer-TransparentContainer"}; return convert_enum_idx(options, 3, value, "dl_ran_status_transfer_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; dl_ran_status_transfer_ies_container::dl_ran_status_transfer_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -10856,12 +10863,13 @@ SRSASN_CODE dl_ran_status_transfer_ies_container::unpack(cbit_ref& bref) ran_status_transfer_transparent_container.value = c.value.ran_status_transfer_transparent_container(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -10904,14 +10912,14 @@ void dl_ran_status_transfer_s::to_json(json_writer& j) const // DownlinkUEAssociatedNRPPaTransportIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t dl_ueassociated_nrp_pa_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 89, 46}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 89, 46}; + return map_enum_number(options, 4, idx, "id"); } bool dl_ueassociated_nrp_pa_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 89, 46}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 89, 46}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -10929,9 +10937,9 @@ crit_e dl_ueassociated_nrp_pa_transport_ies_o::get_crit(const uint32_t& id) case 46: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } dl_ueassociated_nrp_pa_transport_ies_o::value_c dl_ueassociated_nrp_pa_transport_ies_o::get_value(const uint32_t& id) { @@ -10950,7 +10958,7 @@ dl_ueassociated_nrp_pa_transport_ies_o::value_c dl_ueassociated_nrp_pa_transport ret.set(value_c::types::nrp_pa_pdu); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -10966,9 +10974,9 @@ presence_e dl_ueassociated_nrp_pa_transport_ies_o::get_presence(const uint32_t& case 46: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -11164,12 +11172,12 @@ SRSASN_CODE dl_ueassociated_nrp_pa_transport_ies_o::value_c::unpack(cbit_ref& br std::string dl_ueassociated_nrp_pa_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING", "OCTET STRING"}; return convert_enum_idx(options, 4, value, "dl_ueassociated_nrp_pa_transport_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; dl_ueassociated_nrp_pa_transport_ies_container::dl_ueassociated_nrp_pa_transport_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -11226,12 +11234,13 @@ SRSASN_CODE dl_ueassociated_nrp_pa_transport_ies_container::unpack(cbit_ref& bre nrp_pa_pdu.value = c.value.nrp_pa_pdu(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -11276,7 +11285,7 @@ void dl_ueassociated_nrp_pa_transport_s::to_json(json_writer& j) const // DelayCritical ::= ENUMERATED std::string delay_crit_opts::to_string() const { - static constexpr const char* options[] = {"delay-critical", "non-delay-critical"}; + static const char* options[] = {"delay-critical", "non-delay-critical"}; return convert_enum_idx(options, 2, value, "delay_crit_e"); } @@ -11409,7 +11418,7 @@ void dynamic5_qi_descriptor_s::to_json(json_writer& j) const // DLForwarding ::= ENUMERATED std::string dl_forwarding_opts::to_string() const { - static constexpr const char* options[] = {"dl-forwarding-proposed"}; + static const char* options[] = {"dl-forwarding-proposed"}; return convert_enum_idx(options, 1, value, "dl_forwarding_e"); } @@ -11502,20 +11511,20 @@ void eps_tai_s::to_json(json_writer& j) const // EmergencyFallbackRequestIndicator ::= ENUMERATED std::string emergency_fallback_request_ind_opts::to_string() const { - static constexpr const char* options[] = {"emergency-fallback-requested"}; + static const char* options[] = {"emergency-fallback-requested"}; return convert_enum_idx(options, 1, value, "emergency_fallback_request_ind_e"); } // EmergencyServiceTargetCN ::= ENUMERATED std::string emergency_service_target_cn_opts::to_string() const { - static constexpr const char* options[] = {"fiveGC", "epc"}; + static const char* options[] = {"fiveGC", "epc"}; return convert_enum_idx(options, 2, value, "emergency_service_target_cn_e"); } uint8_t emergency_service_target_cn_opts::to_number() const { - static constexpr uint8_t options[] = {5}; - return convert_enum_idx(options, 1, value, "emergency_service_target_cn_e"); + static const uint8_t options[] = {5}; + return map_enum_number(options, 1, value, "emergency_service_target_cn_e"); } // EmergencyFallbackIndicator ::= SEQUENCE @@ -11568,14 +11577,14 @@ void emergency_fallback_ind_s::to_json(json_writer& j) const // ErrorIndicationIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t error_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 15, 19}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 15, 19}; + return map_enum_number(options, 4, idx, "id"); } bool error_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 15, 19}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 15, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -11593,9 +11602,9 @@ crit_e error_ind_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } error_ind_ies_o::value_c error_ind_ies_o::get_value(const uint32_t& id) { @@ -11614,7 +11623,7 @@ error_ind_ies_o::value_c error_ind_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -11630,9 +11639,9 @@ presence_e error_ind_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -11829,12 +11838,12 @@ SRSASN_CODE error_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string error_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "Cause", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "error_ind_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; error_ind_ies_container::error_ind_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -11901,7 +11910,7 @@ SRSASN_CODE error_ind_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -11998,7 +12007,7 @@ void five_g_s_tmsi_s::to_json(json_writer& j) const // NotificationControl ::= ENUMERATED std::string notif_ctrl_opts::to_string() const { - static constexpr const char* options[] = {"notification-requested"}; + static const char* options[] = {"notification-requested"}; return convert_enum_idx(options, 1, value, "notif_ctrl_e"); } @@ -12083,14 +12092,14 @@ void gbr_qos_info_s::to_json(json_writer& j) const // HandoverCancelIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ho_cancel_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 15}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 85, 15}; + return map_enum_number(options, 3, idx, "id"); } bool ho_cancel_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 15}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 15}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -12106,9 +12115,9 @@ crit_e ho_cancel_ies_o::get_crit(const uint32_t& id) case 15: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_cancel_ies_o::value_c ho_cancel_ies_o::get_value(const uint32_t& id) { @@ -12124,7 +12133,7 @@ ho_cancel_ies_o::value_c ho_cancel_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::cause); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -12138,9 +12147,9 @@ presence_e ho_cancel_ies_o::get_presence(const uint32_t& id) case 15: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -12305,11 +12314,11 @@ SRSASN_CODE ho_cancel_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_cancel_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "Cause"}; + static const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "Cause"}; return convert_enum_idx(options, 3, value, "ho_cancel_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ho_cancel_ies_container::ho_cancel_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -12358,12 +12367,13 @@ SRSASN_CODE ho_cancel_ies_container::unpack(cbit_ref& bref) cause.value = c.value.cause(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -12406,14 +12416,14 @@ void ho_cancel_s::to_json(json_writer& j) const // HandoverCancelAcknowledgeIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ho_cancel_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 19}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 85, 19}; + return map_enum_number(options, 3, idx, "id"); } bool ho_cancel_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 19}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -12429,9 +12439,9 @@ crit_e ho_cancel_ack_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_cancel_ack_ies_o::value_c ho_cancel_ack_ies_o::get_value(const uint32_t& id) { @@ -12447,7 +12457,7 @@ ho_cancel_ack_ies_o::value_c ho_cancel_ack_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -12461,9 +12471,9 @@ presence_e ho_cancel_ack_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -12628,12 +12638,11 @@ SRSASN_CODE ho_cancel_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_cancel_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "ho_cancel_ack_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ho_cancel_ack_ies_container::ho_cancel_ack_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -12685,12 +12694,13 @@ SRSASN_CODE ho_cancel_ack_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -12765,8 +12775,8 @@ void qos_flow_per_tnl_info_s::to_json(json_writer& j) const j.write_fieldname("uPTransportLayerInformation"); uptransport_layer_info.to_json(j); j.start_array("associatedQosFlowList"); - for (uint32_t i1 = 0; i1 < associated_qos_flow_list.size(); ++i1) { - associated_qos_flow_list[i1].to_json(j); + for (const auto& e1 : associated_qos_flow_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -12852,49 +12862,36 @@ void qos_flow_to_be_forwarded_item_s::to_json(json_writer& j) const // HandoverCommandTransfer-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t ho_cmd_transfer_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {152}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {152}; + return map_enum_number(options, 1, idx, "id"); } bool ho_cmd_transfer_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {152}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 152 == id; } crit_e ho_cmd_transfer_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 152: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 152) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } ho_cmd_transfer_ext_ies_o::ext_c ho_cmd_transfer_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 152: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 152) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e ho_cmd_transfer_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 152: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 152) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -12902,8 +12899,8 @@ void ho_cmd_transfer_ext_ies_o::ext_c::to_json(json_writer& j) const { j.start_obj(); j.start_array("QosFlowPerTNLInformationList"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -12923,11 +12920,11 @@ SRSASN_CODE ho_cmd_transfer_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string ho_cmd_transfer_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"QosFlowPerTNLInformationList"}; + static const char* options[] = {"QosFlowPerTNLInformationList"}; return convert_enum_idx(options, 1, value, "ho_cmd_transfer_ext_ies_o::ext_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; ho_cmd_transfer_ext_ies_container::ho_cmd_transfer_ext_ies_container() : add_dl_forwarding_uptnl_info(152, crit_e::ignore) @@ -12953,16 +12950,14 @@ SRSASN_CODE ho_cmd_transfer_ext_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 152: - add_dl_forwarding_uptnl_info_present = true; - add_dl_forwarding_uptnl_info.id = c.id; - add_dl_forwarding_uptnl_info.crit = c.crit; - add_dl_forwarding_uptnl_info.ext = c.ext_value.add_dl_forwarding_uptnl_info(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 152) { + add_dl_forwarding_uptnl_info_present = true; + add_dl_forwarding_uptnl_info.id = c.id; + add_dl_forwarding_uptnl_info.crit = c.crit; + add_dl_forwarding_uptnl_info.ext = c.ext_value.add_dl_forwarding_uptnl_info(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -13034,15 +13029,15 @@ void ho_cmd_transfer_s::to_json(json_writer& j) const } if (qos_flow_to_be_forwarded_list_present) { j.start_array("qosFlowToBeForwardedList"); - for (uint32_t i1 = 0; i1 < qos_flow_to_be_forwarded_list.size(); ++i1) { - qos_flow_to_be_forwarded_list[i1].to_json(j); + for (const auto& e1 : qos_flow_to_be_forwarded_list) { + e1.to_json(j); } j.end_array(); } if (data_forwarding_resp_drb_list_present) { j.start_array("dataForwardingResponseDRBList"); - for (uint32_t i1 = 0; i1 < data_forwarding_resp_drb_list.size(); ++i1) { - data_forwarding_resp_drb_list[i1].to_json(j); + for (const auto& e1 : data_forwarding_resp_drb_list) { + e1.to_json(j); } j.end_array(); } @@ -13171,21 +13166,21 @@ void pdu_session_res_to_release_item_ho_cmd_s::to_json(json_writer& j) const // HandoverType ::= ENUMERATED std::string handov_type_opts::to_string() const { - static constexpr const char* options[] = {"intra5gs", "fivegs-to-eps", "eps-to-5gs"}; + static const char* options[] = {"intra5gs", "fivegs-to-eps", "eps-to-5gs"}; return convert_enum_idx(options, 3, value, "handov_type_e"); } // HandoverCommandIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ho_cmd_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 29, 39, 59, 78, 106, 19}; - return convert_enum_idx(options, 8, idx, "id"); + static const uint32_t options[] = {10, 85, 29, 39, 59, 78, 106, 19}; + return map_enum_number(options, 8, idx, "id"); } bool ho_cmd_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 29, 39, 59, 78, 106, 19}; - for (uint32_t i = 0; i < 8; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 29, 39, 59, 78, 106, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -13211,9 +13206,9 @@ crit_e ho_cmd_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_cmd_ies_o::value_c ho_cmd_ies_o::get_value(const uint32_t& id) { @@ -13244,7 +13239,7 @@ ho_cmd_ies_o::value_c ho_cmd_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -13268,9 +13263,9 @@ presence_e ho_cmd_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -13499,15 +13494,15 @@ void ho_cmd_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_ho_list: j.start_array("PDUSessionResourceHandoverList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::pdu_session_res_to_release_list_ho_cmd: j.start_array("PDUSessionResourceToReleaseListHOCmd"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -13594,18 +13589,18 @@ SRSASN_CODE ho_cmd_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_cmd_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "HandoverType", - "OCTET STRING", - "PDUSessionResourceHandoverList", - "PDUSessionResourceToReleaseListHOCmd", - "OCTET STRING", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "HandoverType", + "OCTET STRING", + "PDUSessionResourceHandoverList", + "PDUSessionResourceToReleaseListHOCmd", + "OCTET STRING", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 8, value, "ho_cmd_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ho_cmd_ies_container::ho_cmd_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -13703,12 +13698,13 @@ SRSASN_CODE ho_cmd_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -13767,14 +13763,14 @@ void ho_cmd_s::to_json(json_writer& j) const // HandoverFailureIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ho_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 15, 19}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 15, 19}; + return map_enum_number(options, 3, idx, "id"); } bool ho_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 15, 19}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 15, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -13790,9 +13786,9 @@ crit_e ho_fail_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_fail_ies_o::value_c ho_fail_ies_o::get_value(const uint32_t& id) { @@ -13808,7 +13804,7 @@ ho_fail_ies_o::value_c ho_fail_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -13822,9 +13818,9 @@ presence_e ho_fail_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -13994,16 +13990,16 @@ SRSASN_CODE ho_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", "Cause", "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", "Cause", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "ho_fail_ies_o::value_c::types"); } uint8_t ho_fail_ies_o::value_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {0}; - return convert_enum_idx(options, 1, value, "ho_fail_ies_o::value_c::types"); + static const uint8_t options[] = {0}; + return map_enum_number(options, 1, value, "ho_fail_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ho_fail_ies_container::ho_fail_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -14055,12 +14051,13 @@ SRSASN_CODE ho_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -14411,32 +14408,30 @@ SRSASN_CODE user_location_info_c::unpack(cbit_ref& bref) std::string user_location_info_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "userLocationInformationEUTRA", "userLocationInformationNR", "userLocationInformationN3IWF", "choice-Extensions"}; return convert_enum_idx(options, 4, value, "user_location_info_c::types"); } uint8_t user_location_info_c::types_opts::to_number() const { - switch (value) { - case user_location_info_n3_iwf: - return 3; - default: - invalid_enum_number(value, "user_location_info_c::types"); + if (value == user_location_info_n3_iwf) { + return 3; } + invalid_enum_number(value, "user_location_info_c::types"); return 0; } // HandoverNotifyIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ho_notify_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 121}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 85, 121}; + return map_enum_number(options, 3, idx, "id"); } bool ho_notify_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 121}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 121}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -14452,9 +14447,9 @@ crit_e ho_notify_ies_o::get_crit(const uint32_t& id) case 121: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_notify_ies_o::value_c ho_notify_ies_o::get_value(const uint32_t& id) { @@ -14470,7 +14465,7 @@ ho_notify_ies_o::value_c ho_notify_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::user_location_info); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -14484,9 +14479,9 @@ presence_e ho_notify_ies_o::get_presence(const uint32_t& id) case 121: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -14651,12 +14646,11 @@ SRSASN_CODE ho_notify_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_notify_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "UserLocationInformation"}; + static const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "UserLocationInformation"}; return convert_enum_idx(options, 3, value, "ho_notify_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ho_notify_ies_container::ho_notify_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -14705,12 +14699,13 @@ SRSASN_CODE ho_notify_ies_container::unpack(cbit_ref& bref) user_location_info.value = c.value.user_location_info(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -14753,14 +14748,14 @@ void ho_notify_s::to_json(json_writer& j) const // HandoverPreparationFailureIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ho_prep_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 15, 19}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 15, 19}; + return map_enum_number(options, 4, idx, "id"); } bool ho_prep_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 15, 19}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 15, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -14778,9 +14773,9 @@ crit_e ho_prep_fail_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_prep_fail_ies_o::value_c ho_prep_fail_ies_o::get_value(const uint32_t& id) { @@ -14799,7 +14794,7 @@ ho_prep_fail_ies_o::value_c ho_prep_fail_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -14815,9 +14810,9 @@ presence_e ho_prep_fail_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -15014,12 +15009,12 @@ SRSASN_CODE ho_prep_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_prep_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "Cause", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "ho_prep_fail_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ho_prep_fail_ies_container::ho_prep_fail_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -15079,12 +15074,13 @@ SRSASN_CODE ho_prep_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -15200,7 +15196,7 @@ void non_dynamic5_qi_descriptor_s::to_json(json_writer& j) const // AdditionalQosFlowInformation ::= ENUMERATED std::string add_qos_flow_info_opts::to_string() const { - static constexpr const char* options[] = {"more-likely"}; + static const char* options[] = {"more-likely"}; return convert_enum_idx(options, 1, value, "add_qos_flow_info_e"); } @@ -15348,27 +15344,27 @@ SRSASN_CODE qos_characteristics_c::unpack(cbit_ref& bref) std::string qos_characteristics_c::types_opts::to_string() const { - static constexpr const char* options[] = {"nonDynamic5QI", "dynamic5QI", "choice-Extensions"}; + static const char* options[] = {"nonDynamic5QI", "dynamic5QI", "choice-Extensions"}; return convert_enum_idx(options, 3, value, "qos_characteristics_c::types"); } // ReflectiveQosAttribute ::= ENUMERATED std::string reflective_qos_attribute_opts::to_string() const { - static constexpr const char* options[] = {"subject-to"}; + static const char* options[] = {"subject-to"}; return convert_enum_idx(options, 1, value, "reflective_qos_attribute_e"); } // MaximumIntegrityProtectedDataRate ::= ENUMERATED std::string maximum_integrity_protected_data_rate_opts::to_string() const { - static constexpr const char* options[] = {"bitrate64kbs", "maximum-UE-rate"}; + static const char* options[] = {"bitrate64kbs", "maximum-UE-rate"}; return convert_enum_idx(options, 2, value, "maximum_integrity_protected_data_rate_e"); } uint8_t maximum_integrity_protected_data_rate_opts::to_number() const { - static constexpr uint8_t options[] = {64}; - return convert_enum_idx(options, 1, value, "maximum_integrity_protected_data_rate_e"); + static const uint8_t options[] = {64}; + return map_enum_number(options, 1, value, "maximum_integrity_protected_data_rate_e"); } // QosFlowLevelQosParameters ::= SEQUENCE @@ -15449,14 +15445,14 @@ void qos_flow_level_qos_params_s::to_json(json_writer& j) const // ConfidentialityProtectionIndication ::= ENUMERATED std::string confidentiality_protection_ind_opts::to_string() const { - static constexpr const char* options[] = {"required", "preferred", "not-needed"}; + static const char* options[] = {"required", "preferred", "not-needed"}; return convert_enum_idx(options, 3, value, "confidentiality_protection_ind_e"); } // IntegrityProtectionIndication ::= ENUMERATED std::string integrity_protection_ind_opts::to_string() const { - static constexpr const char* options[] = {"required", "preferred", "not-needed"}; + static const char* options[] = {"required", "preferred", "not-needed"}; return convert_enum_idx(options, 3, value, "integrity_protection_ind_e"); } @@ -15514,49 +15510,36 @@ void qos_flow_setup_request_item_s::to_json(json_writer& j) const // SecurityIndication-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t security_ind_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {151}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {151}; + return map_enum_number(options, 1, idx, "id"); } bool security_ind_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {151}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 151 == id; } crit_e security_ind_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 151: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 151) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } security_ind_ext_ies_o::ext_c security_ind_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 151: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 151) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e security_ind_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 151: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 151) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -15581,7 +15564,7 @@ SRSASN_CODE security_ind_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string security_ind_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"MaximumIntegrityProtectedDataRate"}; + static const char* options[] = {"MaximumIntegrityProtectedDataRate"}; return convert_enum_idx(options, 1, value, "security_ind_ext_ies_o::ext_c::types"); } @@ -15625,7 +15608,7 @@ void up_transport_layer_info_item_s::to_json(json_writer& j) const // DataForwardingNotPossible ::= ENUMERATED std::string data_forwarding_not_possible_opts::to_string() const { - static constexpr const char* options[] = {"data-forwarding-not-possible"}; + static const char* options[] = {"data-forwarding-not-possible"}; return convert_enum_idx(options, 1, value, "data_forwarding_not_possible_e"); } @@ -15675,11 +15658,11 @@ void pdu_session_aggregate_maximum_bit_rate_s::to_json(json_writer& j) const // PDUSessionType ::= ENUMERATED std::string pdu_session_type_opts::to_string() const { - static constexpr const char* options[] = {"ipv4", "ipv6", "ipv4v6", "ethernet", "unstructured"}; + static const char* options[] = {"ipv4", "ipv6", "ipv4v6", "ethernet", "unstructured"}; return convert_enum_idx(options, 5, value, "pdu_session_type_e"); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; security_ind_ext_ies_container::security_ind_ext_ies_container() : maximum_integrity_protected_data_rate_dl(151, crit_e::ignore) @@ -15705,16 +15688,14 @@ SRSASN_CODE security_ind_ext_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 151: - maximum_integrity_protected_data_rate_dl_present = true; - maximum_integrity_protected_data_rate_dl.id = c.id; - maximum_integrity_protected_data_rate_dl.crit = c.crit; - maximum_integrity_protected_data_rate_dl.ext = c.ext_value.maximum_integrity_protected_data_rate_dl(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 151) { + maximum_integrity_protected_data_rate_dl_present = true; + maximum_integrity_protected_data_rate_dl.id = c.id; + maximum_integrity_protected_data_rate_dl.crit = c.crit; + maximum_integrity_protected_data_rate_dl.ext = c.ext_value.maximum_integrity_protected_data_rate_dl(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -15783,14 +15764,14 @@ void security_ind_s::to_json(json_writer& j) const // PDUSessionResourceSetupRequestTransferIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pdu_session_res_setup_request_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {130, 139, 126, 127, 134, 138, 129, 136}; - return convert_enum_idx(options, 8, idx, "id"); + static const uint32_t options[] = {130, 139, 126, 127, 134, 138, 129, 136}; + return map_enum_number(options, 8, idx, "id"); } bool pdu_session_res_setup_request_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {130, 139, 126, 127, 134, 138, 129, 136}; - for (uint32_t i = 0; i < 8; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {130, 139, 126, 127, 134, 138, 129, 136}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -15816,9 +15797,9 @@ crit_e pdu_session_res_setup_request_transfer_ies_o::get_crit(const uint32_t& id case 136: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_setup_request_transfer_ies_o::value_c pdu_session_res_setup_request_transfer_ies_o::get_value(const uint32_t& id) @@ -15850,7 +15831,7 @@ pdu_session_res_setup_request_transfer_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::qos_flow_setup_request_list); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -15874,9 +15855,9 @@ presence_e pdu_session_res_setup_request_transfer_ies_o::get_presence(const uint case 136: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -16108,8 +16089,8 @@ void pdu_session_res_setup_request_transfer_ies_o::value_c::to_json(json_writer& break; case types::add_ul_ngu_up_tnl_info: j.start_array("UPTransportLayerInformationList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -16128,8 +16109,8 @@ void pdu_session_res_setup_request_transfer_ies_o::value_c::to_json(json_writer& break; case types::qos_flow_setup_request_list: j.start_array("QosFlowSetupRequestList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -16209,28 +16190,26 @@ SRSASN_CODE pdu_session_res_setup_request_transfer_ies_o::value_c::unpack(cbit_r std::string pdu_session_res_setup_request_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"PDUSessionAggregateMaximumBitRate", - "UPTransportLayerInformation", - "UPTransportLayerInformationList", - "DataForwardingNotPossible", - "PDUSessionType", - "SecurityIndication", - "INTEGER (1..256,...)", - "QosFlowSetupRequestList"}; + static const char* options[] = {"PDUSessionAggregateMaximumBitRate", + "UPTransportLayerInformation", + "UPTransportLayerInformationList", + "DataForwardingNotPossible", + "PDUSessionType", + "SecurityIndication", + "INTEGER (1..256,...)", + "QosFlowSetupRequestList"}; return convert_enum_idx(options, 8, value, "pdu_session_res_setup_request_transfer_ies_o::value_c::types"); } uint8_t pdu_session_res_setup_request_transfer_ies_o::value_c::types_opts::to_number() const { - switch (value) { - case network_instance: - return 1; - default: - invalid_enum_number(value, "pdu_session_res_setup_request_transfer_ies_o::value_c::types"); + if (value == network_instance) { + return 1; } + invalid_enum_number(value, "pdu_session_res_setup_request_transfer_ies_o::value_c::types"); return 0; } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pdu_session_res_setup_request_transfer_ies_container::pdu_session_res_setup_request_transfer_ies_container() : pdu_session_aggregate_maximum_bit_rate(130, crit_e::reject), @@ -16334,12 +16313,13 @@ SRSASN_CODE pdu_session_res_setup_request_transfer_ies_container::unpack(cbit_re qos_flow_setup_request_list.value = c.value.qos_flow_setup_request_list(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -16402,12 +16382,12 @@ void pdu_session_res_setup_request_transfer_s::to_json(json_writer& j) const // EventType ::= ENUMERATED std::string event_type_opts::to_string() const { - static constexpr const char* options[] = {"direct", - "change-of-serve-cell", - "ue-presence-in-area-of-interest", - "stop-change-of-serve-cell", - "stop-ue-presence-in-area-of-interest", - "cancel-location-reporting-for-the-ue"}; + static const char* options[] = {"direct", + "change-of-serve-cell", + "ue-presence-in-area-of-interest", + "stop-change-of-serve-cell", + "stop-ue-presence-in-area-of-interest", + "cancel-location-reporting-for-the-ue"}; return convert_enum_idx(options, 6, value, "event_type_e"); } @@ -16457,19 +16437,19 @@ void pdu_session_res_setup_item_ho_req_s::to_json(json_writer& j) const // ReportArea ::= ENUMERATED std::string report_area_opts::to_string() const { - static constexpr const char* options[] = {"cell"}; + static const char* options[] = {"cell"}; return convert_enum_idx(options, 1, value, "report_area_e"); } // TraceDepth ::= ENUMERATED std::string trace_depth_opts::to_string() const { - static constexpr const char* options[] = {"minimum", - "medium", - "maximum", - "minimumWithoutVendorSpecificExtension", - "mediumWithoutVendorSpecificExtension", - "maximumWithoutVendorSpecificExtension"}; + static const char* options[] = {"minimum", + "medium", + "maximum", + "minimumWithoutVendorSpecificExtension", + "mediumWithoutVendorSpecificExtension", + "maximumWithoutVendorSpecificExtension"}; return convert_enum_idx(options, 6, value, "trace_depth_e"); } @@ -16523,8 +16503,8 @@ void location_report_request_type_s::to_json(json_writer& j) const j.write_str("reportArea", "cell"); if (area_of_interest_list_present) { j.start_array("areaOfInterestList"); - for (uint32_t i1 = 0; i1 < area_of_interest_list.size(); ++i1) { - area_of_interest_list[i1].to_json(j); + for (const auto& e1 : area_of_interest_list) { + e1.to_json(j); } j.end_array(); } @@ -16541,14 +16521,14 @@ void location_report_request_type_s::to_json(json_writer& j) const // NewSecurityContextInd ::= ENUMERATED std::string new_security_context_ind_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "new_security_context_ind_e"); } // RRCInactiveTransitionReportRequest ::= ENUMERATED std::string rrc_inactive_transition_report_request_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "subsequent-state-transition-report", "single-rrc-connected-state-report", "cancel-report"}; return convert_enum_idx(options, 3, value, "rrc_inactive_transition_report_request_e"); } @@ -16556,7 +16536,7 @@ std::string rrc_inactive_transition_report_request_opts::to_string() const // RedirectionVoiceFallback ::= ENUMERATED std::string redirection_voice_fallback_opts::to_string() const { - static constexpr const char* options[] = {"possible", "not-possible"}; + static const char* options[] = {"possible", "not-possible"}; return convert_enum_idx(options, 2, value, "redirection_voice_fallback_e"); } @@ -16692,16 +16672,14 @@ void ue_security_cap_s::to_json(json_writer& j) const // HandoverRequestIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ho_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = { - 10, 29, 15, 110, 18, 119, 93, 41, 37, 73, 0, 108, 34, 101, 36, 33, 91, 28, 146}; - return convert_enum_idx(options, 19, idx, "id"); + static const uint32_t options[] = {10, 29, 15, 110, 18, 119, 93, 41, 37, 73, 0, 108, 34, 101, 36, 33, 91, 28, 146}; + return map_enum_number(options, 19, idx, "id"); } bool ho_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = { - 10, 29, 15, 110, 18, 119, 93, 41, 37, 73, 0, 108, 34, 101, 36, 33, 91, 28, 146}; - for (uint32_t i = 0; i < 19; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 29, 15, 110, 18, 119, 93, 41, 37, 73, 0, 108, 34, 101, 36, 33, 91, 28, 146}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -16749,9 +16727,9 @@ crit_e ho_request_ies_o::get_crit(const uint32_t& id) case 146: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_request_ies_o::value_c ho_request_ies_o::get_value(const uint32_t& id) { @@ -16815,7 +16793,7 @@ ho_request_ies_o::value_c ho_request_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::redirection_voice_fallback); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -16861,9 +16839,9 @@ presence_e ho_request_ies_o::get_presence(const uint32_t& id) case 146: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -17347,15 +17325,15 @@ void ho_request_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_setup_list_ho_req: j.start_array("PDUSessionResourceSetupListHOReq"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::allowed_nssai: j.start_array("AllowedNSSAI"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -17529,25 +17507,25 @@ SRSASN_CODE ho_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "HandoverType", - "Cause", - "UEAggregateMaximumBitRate", - "CoreNetworkAssistanceInformation", - "UESecurityCapabilities", - "SecurityContext", - "NewSecurityContextInd", - "OCTET STRING", - "PDUSessionResourceSetupListHOReq", - "AllowedNSSAI", - "TraceActivation", - "BIT STRING", - "OCTET STRING", - "MobilityRestrictionList", - "LocationReportingRequestType", - "RRCInactiveTransitionReportRequest", - "GUAMI", - "RedirectionVoiceFallback"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "HandoverType", + "Cause", + "UEAggregateMaximumBitRate", + "CoreNetworkAssistanceInformation", + "UESecurityCapabilities", + "SecurityContext", + "NewSecurityContextInd", + "OCTET STRING", + "PDUSessionResourceSetupListHOReq", + "AllowedNSSAI", + "TraceActivation", + "BIT STRING", + "OCTET STRING", + "MobilityRestrictionList", + "LocationReportingRequestType", + "RRCInactiveTransitionReportRequest", + "GUAMI", + "RedirectionVoiceFallback"}; return convert_enum_idx(options, 19, value, "ho_request_ies_o::value_c::types"); } uint8_t ho_request_ies_o::value_c::types_opts::to_number() const @@ -17563,7 +17541,7 @@ uint8_t ho_request_ies_o::value_c::types_opts::to_number() const return 0; } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ho_request_ies_container::ho_request_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -17767,12 +17745,13 @@ SRSASN_CODE ho_request_ies_container::unpack(cbit_ref& bref) redirection_voice_fallback.value = c.value.redirection_voice_fallback(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -17865,14 +17844,14 @@ void ho_request_s::to_json(json_writer& j) const // ConfidentialityProtectionResult ::= ENUMERATED std::string confidentiality_protection_result_opts::to_string() const { - static constexpr const char* options[] = {"performed", "not-performed"}; + static const char* options[] = {"performed", "not-performed"}; return convert_enum_idx(options, 2, value, "confidentiality_protection_result_e"); } // IntegrityProtectionResult ::= ENUMERATED std::string integrity_protection_result_opts::to_string() const { - static constexpr const char* options[] = {"performed", "not-performed"}; + static const char* options[] = {"performed", "not-performed"}; return convert_enum_idx(options, 2, value, "integrity_protection_result_e"); } @@ -17919,49 +17898,36 @@ void qos_flow_with_cause_item_s::to_json(json_writer& j) const // HandoverRequestAcknowledgeTransfer-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t ho_request_ack_transfer_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {153}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {153}; + return map_enum_number(options, 1, idx, "id"); } bool ho_request_ack_transfer_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {153}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 153 == id; } crit_e ho_request_ack_transfer_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 153: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 153) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } ho_request_ack_transfer_ext_ies_o::ext_c ho_request_ack_transfer_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 153: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 153) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e ho_request_ack_transfer_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 153: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 153) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -17969,8 +17935,8 @@ void ho_request_ack_transfer_ext_ies_o::ext_c::to_json(json_writer& j) const { j.start_obj(); j.start_array("AdditionalDLUPTNLInformationForHOList"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -17990,7 +17956,7 @@ SRSASN_CODE ho_request_ack_transfer_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string ho_request_ack_transfer_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"AdditionalDLUPTNLInformationForHOList"}; + static const char* options[] = {"AdditionalDLUPTNLInformationForHOList"}; return convert_enum_idx(options, 1, value, "ho_request_ack_transfer_ext_ies_o::ext_c::types"); } @@ -18033,7 +17999,7 @@ void security_result_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; ho_request_ack_transfer_ext_ies_container::ho_request_ack_transfer_ext_ies_container() : add_dluptnl_info_for_ho_list(153, crit_e::ignore) @@ -18059,16 +18025,14 @@ SRSASN_CODE ho_request_ack_transfer_ext_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 153: - add_dluptnl_info_for_ho_list_present = true; - add_dluptnl_info_for_ho_list.id = c.id; - add_dluptnl_info_for_ho_list.crit = c.crit; - add_dluptnl_info_for_ho_list.ext = c.ext_value.add_dluptnl_info_for_ho_list(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 153) { + add_dluptnl_info_for_ho_list_present = true; + add_dluptnl_info_for_ho_list.id = c.id; + add_dluptnl_info_for_ho_list.crit = c.crit; + add_dluptnl_info_for_ho_list.ext = c.ext_value.add_dluptnl_info_for_ho_list(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -18157,21 +18121,21 @@ void ho_request_ack_transfer_s::to_json(json_writer& j) const security_result.to_json(j); } j.start_array("qosFlowSetupResponseList"); - for (uint32_t i1 = 0; i1 < qos_flow_setup_resp_list.size(); ++i1) { - qos_flow_setup_resp_list[i1].to_json(j); + for (const auto& e1 : qos_flow_setup_resp_list) { + e1.to_json(j); } j.end_array(); if (qos_flow_failed_to_setup_list_present) { j.start_array("qosFlowFailedToSetupList"); - for (uint32_t i1 = 0; i1 < qos_flow_failed_to_setup_list.size(); ++i1) { - qos_flow_failed_to_setup_list[i1].to_json(j); + for (const auto& e1 : qos_flow_failed_to_setup_list) { + e1.to_json(j); } j.end_array(); } if (data_forwarding_resp_drb_list_present) { j.start_array("dataForwardingResponseDRBList"); - for (uint32_t i1 = 0; i1 < data_forwarding_resp_drb_list.size(); ++i1) { - data_forwarding_resp_drb_list[i1].to_json(j); + for (const auto& e1 : data_forwarding_resp_drb_list) { + e1.to_json(j); } j.end_array(); } @@ -18312,14 +18276,14 @@ void pdu_session_res_failed_to_setup_item_ho_ack_s::to_json(json_writer& j) cons // HandoverRequestAcknowledgeIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ho_request_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 53, 56, 106, 19}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {10, 85, 53, 56, 106, 19}; + return map_enum_number(options, 6, idx, "id"); } bool ho_request_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 53, 56, 106, 19}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 53, 56, 106, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -18341,9 +18305,9 @@ crit_e ho_request_ack_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_request_ack_ies_o::value_c ho_request_ack_ies_o::get_value(const uint32_t& id) { @@ -18368,7 +18332,7 @@ ho_request_ack_ies_o::value_c ho_request_ack_ies_o::get_value(const uint32_t& id ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -18388,9 +18352,9 @@ presence_e ho_request_ack_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -18575,15 +18539,15 @@ void ho_request_ack_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_admitted_list: j.start_array("PDUSessionResourceAdmittedList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::pdu_session_res_failed_to_setup_list_ho_ack: j.start_array("PDUSessionResourceFailedToSetupListHOAck"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -18658,16 +18622,16 @@ SRSASN_CODE ho_request_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_request_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PDUSessionResourceAdmittedList", - "PDUSessionResourceFailedToSetupListHOAck", - "OCTET STRING", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PDUSessionResourceAdmittedList", + "PDUSessionResourceFailedToSetupListHOAck", + "OCTET STRING", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 6, value, "ho_request_ack_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ho_request_ack_ies_container::ho_request_ack_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -18746,12 +18710,13 @@ SRSASN_CODE ho_request_ack_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -18804,7 +18769,7 @@ void ho_request_ack_s::to_json(json_writer& j) const // DirectForwardingPathAvailability ::= ENUMERATED std::string direct_forwarding_path_availability_opts::to_string() const { - static constexpr const char* options[] = {"direct-path-available"}; + static const char* options[] = {"direct-path-available"}; return convert_enum_idx(options, 1, value, "direct_forwarding_path_availability_e"); } @@ -19076,21 +19041,21 @@ SRSASN_CODE target_id_c::unpack(cbit_ref& bref) std::string target_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"targetRANNodeID", "targeteNB-ID", "choice-Extensions"}; + static const char* options[] = {"targetRANNodeID", "targeteNB-ID", "choice-Extensions"}; return convert_enum_idx(options, 3, value, "target_id_c::types"); } // HandoverRequiredIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ho_required_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 29, 15, 105, 22, 61, 101}; - return convert_enum_idx(options, 8, idx, "id"); + static const uint32_t options[] = {10, 85, 29, 15, 105, 22, 61, 101}; + return map_enum_number(options, 8, idx, "id"); } bool ho_required_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 29, 15, 105, 22, 61, 101}; - for (uint32_t i = 0; i < 8; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 29, 15, 105, 22, 61, 101}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -19116,9 +19081,9 @@ crit_e ho_required_ies_o::get_crit(const uint32_t& id) case 101: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_required_ies_o::value_c ho_required_ies_o::get_value(const uint32_t& id) { @@ -19149,7 +19114,7 @@ ho_required_ies_o::value_c ho_required_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::source_to_target_transparent_container); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -19173,9 +19138,9 @@ presence_e ho_required_ies_o::get_presence(const uint32_t& id) case 101: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -19408,8 +19373,8 @@ void ho_required_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_list_ho_rqd: j.start_array("PDUSessionResourceListHORqd"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -19492,18 +19457,18 @@ SRSASN_CODE ho_required_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_required_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "HandoverType", - "Cause", - "TargetID", - "DirectForwardingPathAvailability", - "PDUSessionResourceListHORqd", - "OCTET STRING"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "HandoverType", + "Cause", + "TargetID", + "DirectForwardingPathAvailability", + "PDUSessionResourceListHORqd", + "OCTET STRING"}; return convert_enum_idx(options, 8, value, "ho_required_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ho_required_ies_container::ho_required_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -19595,12 +19560,13 @@ SRSASN_CODE ho_required_ies_container::unpack(cbit_ref& bref) source_to_target_transparent_container.value = c.value.source_to_target_transparent_container(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -19718,8 +19684,8 @@ void recommended_ran_nodes_for_paging_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("recommendedRANNodeList"); - for (uint32_t i1 = 0; i1 < recommended_ran_node_list.size(); ++i1) { - recommended_ran_node_list[i1].to_json(j); + for (const auto& e1 : recommended_ran_node_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -19861,14 +19827,14 @@ void pdu_session_res_failed_to_setup_item_cxt_fail_s::to_json(json_writer& j) co // InitialContextSetupFailureIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t init_context_setup_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 132, 15, 19}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {10, 85, 132, 15, 19}; + return map_enum_number(options, 5, idx, "id"); } bool init_context_setup_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 132, 15, 19}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 132, 15, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -19888,9 +19854,9 @@ crit_e init_context_setup_fail_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } init_context_setup_fail_ies_o::value_c init_context_setup_fail_ies_o::get_value(const uint32_t& id) { @@ -19912,7 +19878,7 @@ init_context_setup_fail_ies_o::value_c init_context_setup_fail_ies_o::get_value( ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -19930,9 +19896,9 @@ presence_e init_context_setup_fail_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -20096,8 +20062,8 @@ void init_context_setup_fail_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_failed_to_setup_list_cxt_fail: j.start_array("PDUSessionResourceFailedToSetupListCxtFail"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -20167,15 +20133,15 @@ SRSASN_CODE init_context_setup_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string init_context_setup_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PDUSessionResourceFailedToSetupListCxtFail", - "Cause", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PDUSessionResourceFailedToSetupListCxtFail", + "Cause", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 5, value, "init_context_setup_fail_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; init_context_setup_fail_ies_container::init_context_setup_fail_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -20246,12 +20212,13 @@ SRSASN_CODE init_context_setup_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -20411,16 +20378,16 @@ void ue_radio_cap_for_paging_s::to_json(json_writer& j) const // InitialContextSetupRequestIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t init_context_setup_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 48, 110, 18, 28, 71, 0, 119, 94, - 108, 36, 117, 31, 34, 38, 24, 91, 118, 146}; - return convert_enum_idx(options, 20, idx, "id"); + static const uint32_t options[] = {10, 85, 48, 110, 18, 28, 71, 0, 119, 94, + 108, 36, 117, 31, 34, 38, 24, 91, 118, 146}; + return map_enum_number(options, 20, idx, "id"); } bool init_context_setup_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 48, 110, 18, 28, 71, 0, 119, 94, - 108, 36, 117, 31, 34, 38, 24, 91, 118, 146}; - for (uint32_t i = 0; i < 20; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 48, 110, 18, 28, 71, 0, 119, 94, + 108, 36, 117, 31, 34, 38, 24, 91, 118, 146}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -20470,9 +20437,9 @@ crit_e init_context_setup_request_ies_o::get_crit(const uint32_t& id) case 146: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } init_context_setup_request_ies_o::value_c init_context_setup_request_ies_o::get_value(const uint32_t& id) { @@ -20539,7 +20506,7 @@ init_context_setup_request_ies_o::value_c init_context_setup_request_ies_o::get_ ret.set(value_c::types::redirection_voice_fallback); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -20587,9 +20554,9 @@ presence_e init_context_setup_request_ies_o::get_presence(const uint32_t& id) case 146: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -21087,15 +21054,15 @@ void init_context_setup_request_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_setup_list_cxt_req: j.start_array("PDUSessionResourceSetupListCxtReq"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::allowed_nssai: j.start_array("AllowedNSSAI"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -21288,30 +21255,30 @@ SRSASN_CODE init_context_setup_request_ies_o::value_c::unpack(cbit_ref& bref) std::string init_context_setup_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PrintableString", - "UEAggregateMaximumBitRate", - "CoreNetworkAssistanceInformation", - "GUAMI", - "PDUSessionResourceSetupListCxtReq", - "AllowedNSSAI", - "UESecurityCapabilities", - "BIT STRING", - "TraceActivation", - "MobilityRestrictionList", - "OCTET STRING", - "INTEGER (1..256,...)", - "BIT STRING", - "OCTET STRING", - "EmergencyFallbackIndicator", - "RRCInactiveTransitionReportRequest", - "UERadioCapabilityForPaging", - "RedirectionVoiceFallback"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PrintableString", + "UEAggregateMaximumBitRate", + "CoreNetworkAssistanceInformation", + "GUAMI", + "PDUSessionResourceSetupListCxtReq", + "AllowedNSSAI", + "UESecurityCapabilities", + "BIT STRING", + "TraceActivation", + "MobilityRestrictionList", + "OCTET STRING", + "INTEGER (1..256,...)", + "BIT STRING", + "OCTET STRING", + "EmergencyFallbackIndicator", + "RRCInactiveTransitionReportRequest", + "UERadioCapabilityForPaging", + "RedirectionVoiceFallback"}; return convert_enum_idx(options, 20, value, "init_context_setup_request_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; init_context_setup_request_ies_container::init_context_setup_request_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -21538,12 +21505,13 @@ SRSASN_CODE init_context_setup_request_ies_container::unpack(cbit_ref& bref) redirection_voice_fallback.value = c.value.redirection_voice_fallback(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -21701,8 +21669,8 @@ void pdu_session_res_setup_resp_transfer_s::to_json(json_writer& j) const dlqos_flow_per_tnl_info.to_json(j); if (add_dl_qos_flow_per_tnl_info_present) { j.start_array("additionalDLQosFlowPerTNLInformation"); - for (uint32_t i1 = 0; i1 < add_dl_qos_flow_per_tnl_info.size(); ++i1) { - add_dl_qos_flow_per_tnl_info[i1].to_json(j); + for (const auto& e1 : add_dl_qos_flow_per_tnl_info) { + e1.to_json(j); } j.end_array(); } @@ -21712,8 +21680,8 @@ void pdu_session_res_setup_resp_transfer_s::to_json(json_writer& j) const } if (qos_flow_failed_to_setup_list_present) { j.start_array("qosFlowFailedToSetupList"); - for (uint32_t i1 = 0; i1 < qos_flow_failed_to_setup_list.size(); ++i1) { - qos_flow_failed_to_setup_list[i1].to_json(j); + for (const auto& e1 : qos_flow_failed_to_setup_list) { + e1.to_json(j); } j.end_array(); } @@ -21805,14 +21773,14 @@ void pdu_session_res_setup_item_cxt_res_s::to_json(json_writer& j) const // InitialContextSetupResponseIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t init_context_setup_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 72, 55, 19}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {10, 85, 72, 55, 19}; + return map_enum_number(options, 5, idx, "id"); } bool init_context_setup_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 72, 55, 19}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 72, 55, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -21832,9 +21800,9 @@ crit_e init_context_setup_resp_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } init_context_setup_resp_ies_o::value_c init_context_setup_resp_ies_o::get_value(const uint32_t& id) { @@ -21856,7 +21824,7 @@ init_context_setup_resp_ies_o::value_c init_context_setup_resp_ies_o::get_value( ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -21874,9 +21842,9 @@ presence_e init_context_setup_resp_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -22041,15 +22009,15 @@ void init_context_setup_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_setup_list_cxt_res: j.start_array("PDUSessionResourceSetupListCxtRes"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::pdu_session_res_failed_to_setup_list_cxt_res: j.start_array("PDUSessionResourceFailedToSetupListCxtRes"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -22115,15 +22083,15 @@ SRSASN_CODE init_context_setup_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string init_context_setup_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PDUSessionResourceSetupListCxtRes", - "PDUSessionResourceFailedToSetupListCxtRes", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PDUSessionResourceSetupListCxtRes", + "PDUSessionResourceFailedToSetupListCxtRes", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 5, value, "init_context_setup_resp_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; init_context_setup_resp_ies_container::init_context_setup_resp_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -22197,12 +22165,13 @@ SRSASN_CODE init_context_setup_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -22255,38 +22224,38 @@ void init_context_setup_resp_s::to_json(json_writer& j) const // RRCEstablishmentCause ::= ENUMERATED std::string rrcestablishment_cause_opts::to_string() const { - static constexpr const char* options[] = {"emergency", - "highPriorityAccess", - "mt-Access", - "mo-Signalling", - "mo-Data", - "mo-VoiceCall", - "mo-VideoCall", - "mo-SMS", - "mps-PriorityAccess", - "mcs-PriorityAccess", - "notAvailable"}; + static const char* options[] = {"emergency", + "highPriorityAccess", + "mt-Access", + "mo-Signalling", + "mo-Data", + "mo-VoiceCall", + "mo-VideoCall", + "mo-SMS", + "mps-PriorityAccess", + "mcs-PriorityAccess", + "notAvailable"}; return convert_enum_idx(options, 11, value, "rrcestablishment_cause_e"); } // UEContextRequest ::= ENUMERATED std::string ue_context_request_opts::to_string() const { - static constexpr const char* options[] = {"requested"}; + static const char* options[] = {"requested"}; return convert_enum_idx(options, 1, value, "ue_context_request_e"); } // InitialUEMessage-IEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t init_ue_msg_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {85, 38, 121, 90, 26, 3, 112, 0}; - return convert_enum_idx(options, 8, idx, "id"); + static const uint32_t options[] = {85, 38, 121, 90, 26, 3, 112, 0}; + return map_enum_number(options, 8, idx, "id"); } bool init_ue_msg_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {85, 38, 121, 90, 26, 3, 112, 0}; - for (uint32_t i = 0; i < 8; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {85, 38, 121, 90, 26, 3, 112, 0}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -22312,9 +22281,9 @@ crit_e init_ue_msg_ies_o::get_crit(const uint32_t& id) case 0: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } init_ue_msg_ies_o::value_c init_ue_msg_ies_o::get_value(const uint32_t& id) { @@ -22345,7 +22314,7 @@ init_ue_msg_ies_o::value_c init_ue_msg_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::allowed_nssai); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -22369,9 +22338,9 @@ presence_e init_ue_msg_ies_o::get_presence(const uint32_t& id) case 0: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -22611,8 +22580,8 @@ void init_ue_msg_ies_o::value_c::to_json(json_writer& j) const break; case types::allowed_nssai: j.start_array("AllowedNSSAI"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -22692,23 +22661,23 @@ SRSASN_CODE init_ue_msg_ies_o::value_c::unpack(cbit_ref& bref) std::string init_ue_msg_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "OCTET STRING", - "UserLocationInformation", - "RRCEstablishmentCause", - "FiveG-S-TMSI", - "BIT STRING", - "UEContextRequest", - "AllowedNSSAI"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "OCTET STRING", + "UserLocationInformation", + "RRCEstablishmentCause", + "FiveG-S-TMSI", + "BIT STRING", + "UEContextRequest", + "AllowedNSSAI"}; return convert_enum_idx(options, 8, value, "init_ue_msg_ies_o::value_c::types"); } uint8_t init_ue_msg_ies_o::value_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {0}; - return convert_enum_idx(options, 1, value, "init_ue_msg_ies_o::value_c::types"); + static const uint8_t options[] = {0}; + return map_enum_number(options, 1, value, "init_ue_msg_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; init_ue_msg_ies_container::init_ue_msg_ies_container() : ran_ue_ngap_id(85, crit_e::reject), @@ -22809,12 +22778,13 @@ SRSASN_CODE init_ue_msg_ies_container::unpack(cbit_ref& bref) allowed_nssai.value = c.value.allowed_nssai(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -22960,8 +22930,8 @@ void qo_sflows_usage_report_item_s::to_json(json_writer& j) const j.write_int("qosFlowIdentifier", qos_flow_id); j.write_str("rATType", rat_type.to_string()); j.start_array("qoSFlowsTimedReportList"); - for (uint32_t i1 = 0; i1 < qo_sflows_timed_report_list.size(); ++i1) { - qo_sflows_timed_report_list[i1].to_json(j); + for (const auto& e1 : qo_sflows_timed_report_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -22973,7 +22943,7 @@ void qo_sflows_usage_report_item_s::to_json(json_writer& j) const std::string qo_sflows_usage_report_item_s::rat_type_opts::to_string() const { - static constexpr const char* options[] = {"nr", "eutra"}; + static const char* options[] = {"nr", "eutra"}; return convert_enum_idx(options, 2, value, "qo_sflows_usage_report_item_s::rat_type_e_"); } @@ -23009,8 +22979,8 @@ void pdu_session_usage_report_s::to_json(json_writer& j) const j.start_obj(); j.write_str("rATType", rat_type.to_string()); j.start_array("pDUSessionTimedReportList"); - for (uint32_t i1 = 0; i1 < pdu_session_timed_report_list.size(); ++i1) { - pdu_session_timed_report_list[i1].to_json(j); + for (const auto& e1 : pdu_session_timed_report_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -23022,14 +22992,14 @@ void pdu_session_usage_report_s::to_json(json_writer& j) const std::string pdu_session_usage_report_s::rat_type_opts::to_string() const { - static constexpr const char* options[] = {"nr", "eutra"}; + static const char* options[] = {"nr", "eutra"}; return convert_enum_idx(options, 2, value, "pdu_session_usage_report_s::rat_type_e_"); } // NotificationCause ::= ENUMERATED std::string notif_cause_opts::to_string() const { - static constexpr const char* options[] = {"fulfilled", "not-fulfilled"}; + static const char* options[] = {"fulfilled", "not-fulfilled"}; return convert_enum_idx(options, 2, value, "notif_cause_e"); } @@ -23140,8 +23110,8 @@ void secondary_ratusage_info_s::to_json(json_writer& j) const } if (qos_flows_usage_report_list_present) { j.start_array("qosFlowsUsageReportList"); - for (uint32_t i1 = 0; i1 < qos_flows_usage_report_list.size(); ++i1) { - qos_flows_usage_report_list[i1].to_json(j); + for (const auto& e1 : qos_flows_usage_report_list) { + e1.to_json(j); } j.end_array(); } @@ -23237,50 +23207,37 @@ void up_transport_layer_info_pair_item_s::to_json(json_writer& j) const // PDUSessionResourceReleaseResponseTransfer-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t pdu_session_res_release_resp_transfer_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {144}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {144}; + return map_enum_number(options, 1, idx, "id"); } bool pdu_session_res_release_resp_transfer_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {144}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 144 == id; } crit_e pdu_session_res_release_resp_transfer_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 144: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 144) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } pdu_session_res_release_resp_transfer_ext_ies_o::ext_c pdu_session_res_release_resp_transfer_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 144: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 144) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e pdu_session_res_release_resp_transfer_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 144: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 144) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -23306,7 +23263,7 @@ SRSASN_CODE pdu_session_res_release_resp_transfer_ext_ies_o::ext_c::unpack(cbit_ std::string pdu_session_res_release_resp_transfer_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"SecondaryRATUsageInformation"}; + static const char* options[] = {"SecondaryRATUsageInformation"}; return convert_enum_idx(options, 1, value, "pdu_session_res_release_resp_transfer_ext_ies_o::ext_c::types"); } @@ -23460,31 +23417,31 @@ void qos_flow_notify_item_s::to_json(json_writer& j) const // DL-NGU-TNLInformationReused ::= ENUMERATED std::string dl_ngu_tnl_info_reused_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "dl_ngu_tnl_info_reused_e"); } // OverloadAction ::= ENUMERATED std::string overload_action_opts::to_string() const { - static constexpr const char* options[] = {"reject-non-emergency-mo-dt", - "reject-rrc-cr-signalling", - "permit-emergency-sessions-and-mobile-terminated-services-only", - "permit-high-priority-sessions-and-mobile-terminated-services-only"}; + static const char* options[] = {"reject-non-emergency-mo-dt", + "reject-rrc-cr-signalling", + "permit-emergency-sessions-and-mobile-terminated-services-only", + "permit-high-priority-sessions-and-mobile-terminated-services-only"}; return convert_enum_idx(options, 4, value, "overload_action_e"); } // PDUSessionResourceModifyIndicationTransfer-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t pdu_session_res_modify_ind_transfer_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {144, 156}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {144, 156}; + return map_enum_number(options, 2, idx, "id"); } bool pdu_session_res_modify_ind_transfer_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {144, 156}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {144, 156}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -23498,9 +23455,9 @@ crit_e pdu_session_res_modify_ind_transfer_ext_ies_o::get_crit(const uint32_t& i case 156: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_modify_ind_transfer_ext_ies_o::ext_c pdu_session_res_modify_ind_transfer_ext_ies_o::get_ext(const uint32_t& id) @@ -23514,7 +23471,7 @@ pdu_session_res_modify_ind_transfer_ext_ies_o::get_ext(const uint32_t& id) ret.set(ext_c::types::security_result); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -23526,9 +23483,9 @@ presence_e pdu_session_res_modify_ind_transfer_ext_ies_o::get_presence(const uin case 156: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -23673,21 +23630,21 @@ SRSASN_CODE pdu_session_res_modify_ind_transfer_ext_ies_o::ext_c::unpack(cbit_re std::string pdu_session_res_modify_ind_transfer_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"SecondaryRATUsageInformation", "SecurityResult"}; + static const char* options[] = {"SecondaryRATUsageInformation", "SecurityResult"}; return convert_enum_idx(options, 2, value, "pdu_session_res_modify_ind_transfer_ext_ies_o::ext_c::types"); } // PDUSessionResourceModifyRequestTransferIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pdu_session_res_modify_request_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {130, 140, 129, 135, 137, 126}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {130, 140, 129, 135, 137, 126}; + return map_enum_number(options, 6, idx, "id"); } bool pdu_session_res_modify_request_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {130, 140, 129, 135, 137, 126}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {130, 140, 129, 135, 137, 126}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -23709,9 +23666,9 @@ crit_e pdu_session_res_modify_request_transfer_ies_o::get_crit(const uint32_t& i case 126: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_modify_request_transfer_ies_o::value_c pdu_session_res_modify_request_transfer_ies_o::get_value(const uint32_t& id) @@ -23737,7 +23694,7 @@ pdu_session_res_modify_request_transfer_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::add_ul_ngu_up_tnl_info); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -23757,9 +23714,9 @@ presence_e pdu_session_res_modify_request_transfer_ies_o::get_presence(const uin case 126: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -23953,8 +23910,8 @@ void pdu_session_res_modify_request_transfer_ies_o::value_c::to_json(json_writer break; case types::ul_ngu_up_tnl_modify_list: j.start_array("UL-NGU-UP-TNLModifyList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -23963,22 +23920,22 @@ void pdu_session_res_modify_request_transfer_ies_o::value_c::to_json(json_writer break; case types::qos_flow_add_or_modify_request_list: j.start_array("QosFlowAddOrModifyRequestList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::qos_flow_to_release_list: j.start_array("QosFlowListWithCause"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::add_ul_ngu_up_tnl_info: j.start_array("UPTransportLayerInformationList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -24046,72 +24003,57 @@ SRSASN_CODE pdu_session_res_modify_request_transfer_ies_o::value_c::unpack(cbit_ std::string pdu_session_res_modify_request_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"PDUSessionAggregateMaximumBitRate", - "UL-NGU-UP-TNLModifyList", - "INTEGER (1..256,...)", - "QosFlowAddOrModifyRequestList", - "QosFlowListWithCause", - "UPTransportLayerInformationList"}; + static const char* options[] = {"PDUSessionAggregateMaximumBitRate", + "UL-NGU-UP-TNLModifyList", + "INTEGER (1..256,...)", + "QosFlowAddOrModifyRequestList", + "QosFlowListWithCause", + "UPTransportLayerInformationList"}; return convert_enum_idx(options, 6, value, "pdu_session_res_modify_request_transfer_ies_o::value_c::types"); } uint8_t pdu_session_res_modify_request_transfer_ies_o::value_c::types_opts::to_number() const { - switch (value) { - case network_instance: - return 1; - default: - invalid_enum_number(value, "pdu_session_res_modify_request_transfer_ies_o::value_c::types"); + if (value == network_instance) { + return 1; } + invalid_enum_number(value, "pdu_session_res_modify_request_transfer_ies_o::value_c::types"); return 0; } // PDUSessionResourceModifyResponseTransfer-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t pdu_session_res_modify_resp_transfer_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {154}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {154}; + return map_enum_number(options, 1, idx, "id"); } bool pdu_session_res_modify_resp_transfer_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {154}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 154 == id; } crit_e pdu_session_res_modify_resp_transfer_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 154: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 154) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } pdu_session_res_modify_resp_transfer_ext_ies_o::ext_c pdu_session_res_modify_resp_transfer_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 154: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 154) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e pdu_session_res_modify_resp_transfer_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 154: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 154) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -24119,8 +24061,8 @@ void pdu_session_res_modify_resp_transfer_ext_ies_o::ext_c::to_json(json_writer& { j.start_obj(); j.start_array("UPTransportLayerInformationPairList"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -24140,57 +24082,44 @@ SRSASN_CODE pdu_session_res_modify_resp_transfer_ext_ies_o::ext_c::unpack(cbit_r std::string pdu_session_res_modify_resp_transfer_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"UPTransportLayerInformationPairList"}; + static const char* options[] = {"UPTransportLayerInformationPairList"}; return convert_enum_idx(options, 1, value, "pdu_session_res_modify_resp_transfer_ext_ies_o::ext_c::types"); } // PDUSessionResourceNotifyReleasedTransfer-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t pdu_session_res_notify_released_transfer_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {144}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {144}; + return map_enum_number(options, 1, idx, "id"); } bool pdu_session_res_notify_released_transfer_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {144}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 144 == id; } crit_e pdu_session_res_notify_released_transfer_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 144: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 144) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } pdu_session_res_notify_released_transfer_ext_ies_o::ext_c pdu_session_res_notify_released_transfer_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 144: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 144) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e pdu_session_res_notify_released_transfer_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 144: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 144) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -24216,56 +24145,43 @@ SRSASN_CODE pdu_session_res_notify_released_transfer_ext_ies_o::ext_c::unpack(cb std::string pdu_session_res_notify_released_transfer_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"SecondaryRATUsageInformation"}; + static const char* options[] = {"SecondaryRATUsageInformation"}; return convert_enum_idx(options, 1, value, "pdu_session_res_notify_released_transfer_ext_ies_o::ext_c::types"); } // PDUSessionResourceNotifyTransfer-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t pdu_session_res_notify_transfer_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {144}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {144}; + return map_enum_number(options, 1, idx, "id"); } bool pdu_session_res_notify_transfer_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {144}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 144 == id; } crit_e pdu_session_res_notify_transfer_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 144: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 144) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } pdu_session_res_notify_transfer_ext_ies_o::ext_c pdu_session_res_notify_transfer_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 144: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 144) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e pdu_session_res_notify_transfer_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 144: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 144) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -24291,11 +24207,11 @@ SRSASN_CODE pdu_session_res_notify_transfer_ext_ies_o::ext_c::unpack(cbit_ref& b std::string pdu_session_res_notify_transfer_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"SecondaryRATUsageInformation"}; + static const char* options[] = {"SecondaryRATUsageInformation"}; return convert_enum_idx(options, 1, value, "pdu_session_res_notify_transfer_ext_ies_o::ext_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; pdu_session_res_release_resp_transfer_ext_ies_container::pdu_session_res_release_resp_transfer_ext_ies_container() : secondary_ratusage_info(144, crit_e::ignore) @@ -24321,16 +24237,14 @@ SRSASN_CODE pdu_session_res_release_resp_transfer_ext_ies_container::unpack(cbit for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 144: - secondary_ratusage_info_present = true; - secondary_ratusage_info.id = c.id; - secondary_ratusage_info.crit = c.crit; - secondary_ratusage_info.ext = c.ext_value.secondary_ratusage_info(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 144) { + secondary_ratusage_info_present = true; + secondary_ratusage_info.id = c.id; + secondary_ratusage_info.crit = c.crit; + secondary_ratusage_info.ext = c.ext_value.secondary_ratusage_info(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -24382,50 +24296,37 @@ void pdu_session_res_release_resp_transfer_s::to_json(json_writer& j) const // PathSwitchRequestAcknowledgeTransfer-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t path_switch_request_ack_transfer_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {154}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {154}; + return map_enum_number(options, 1, idx, "id"); } bool path_switch_request_ack_transfer_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {154}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 154 == id; } crit_e path_switch_request_ack_transfer_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 154: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 154) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } path_switch_request_ack_transfer_ext_ies_o::ext_c path_switch_request_ack_transfer_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 154: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 154) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e path_switch_request_ack_transfer_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 154: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 154) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -24433,8 +24334,8 @@ void path_switch_request_ack_transfer_ext_ies_o::ext_c::to_json(json_writer& j) { j.start_obj(); j.start_array("UPTransportLayerInformationPairList"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -24454,56 +24355,43 @@ SRSASN_CODE path_switch_request_ack_transfer_ext_ies_o::ext_c::unpack(cbit_ref& std::string path_switch_request_ack_transfer_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"UPTransportLayerInformationPairList"}; + static const char* options[] = {"UPTransportLayerInformationPairList"}; return convert_enum_idx(options, 1, value, "path_switch_request_ack_transfer_ext_ies_o::ext_c::types"); } // PathSwitchRequestTransfer-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t path_switch_request_transfer_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {155}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {155}; + return map_enum_number(options, 1, idx, "id"); } bool path_switch_request_transfer_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {155}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 155 == id; } crit_e path_switch_request_transfer_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 155: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 155) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } path_switch_request_transfer_ext_ies_o::ext_c path_switch_request_transfer_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 155: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 155) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e path_switch_request_transfer_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 155: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 155) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -24511,8 +24399,8 @@ void path_switch_request_transfer_ext_ies_o::ext_c::to_json(json_writer& j) cons { j.start_obj(); j.start_array("QosFlowPerTNLInformationList"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -24532,7 +24420,7 @@ SRSASN_CODE path_switch_request_transfer_ext_ies_o::ext_c::unpack(cbit_ref& bref std::string path_switch_request_transfer_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"QosFlowPerTNLInformationList"}; + static const char* options[] = {"QosFlowPerTNLInformationList"}; return convert_enum_idx(options, 1, value, "path_switch_request_transfer_ext_ies_o::ext_c::types"); } @@ -24731,57 +24619,44 @@ SRSASN_CODE overload_resp_c::unpack(cbit_ref& bref) std::string overload_resp_c::types_opts::to_string() const { - static constexpr const char* options[] = {"overloadAction", "choice-Extensions"}; + static const char* options[] = {"overloadAction", "choice-Extensions"}; return convert_enum_idx(options, 2, value, "overload_resp_c::types"); } // PDUSessionResourceItemCxtRelCpl-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t pdu_session_res_item_cxt_rel_cpl_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {145}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {145}; + return map_enum_number(options, 1, idx, "id"); } bool pdu_session_res_item_cxt_rel_cpl_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {145}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 145 == id; } crit_e pdu_session_res_item_cxt_rel_cpl_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 145: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 145) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } pdu_session_res_item_cxt_rel_cpl_ext_ies_o::ext_c pdu_session_res_item_cxt_rel_cpl_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 145: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 145) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e pdu_session_res_item_cxt_rel_cpl_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 145: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 145) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -24806,7 +24681,7 @@ SRSASN_CODE pdu_session_res_item_cxt_rel_cpl_ext_ies_o::ext_c::unpack(cbit_ref& std::string pdu_session_res_item_cxt_rel_cpl_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"OCTET STRING"}; + static const char* options[] = {"OCTET STRING"}; return convert_enum_idx(options, 1, value, "pdu_session_res_item_cxt_rel_cpl_ext_ies_o::ext_c::types"); } @@ -24857,23 +24732,23 @@ void pdu_session_res_modify_confirm_transfer_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("qosFlowModifyConfirmList"); - for (uint32_t i1 = 0; i1 < qos_flow_modify_confirm_list.size(); ++i1) { - qos_flow_modify_confirm_list[i1].to_json(j); + for (const auto& e1 : qos_flow_modify_confirm_list) { + e1.to_json(j); } j.end_array(); j.write_fieldname("uLNGU-UP-TNLInformation"); ulngu_up_tnl_info.to_json(j); if (add_ng_uuptnl_info_present) { j.start_array("additionalNG-UUPTNLInformation"); - for (uint32_t i1 = 0; i1 < add_ng_uuptnl_info.size(); ++i1) { - add_ng_uuptnl_info[i1].to_json(j); + for (const auto& e1 : add_ng_uuptnl_info) { + e1.to_json(j); } j.end_array(); } if (qos_flow_failed_to_modify_list_present) { j.start_array("qosFlowFailedToModifyList"); - for (uint32_t i1 = 0; i1 < qos_flow_failed_to_modify_list.size(); ++i1) { - qos_flow_failed_to_modify_list[i1].to_json(j); + for (const auto& e1 : qos_flow_failed_to_modify_list) { + e1.to_json(j); } j.end_array(); } @@ -24884,7 +24759,7 @@ void pdu_session_res_modify_confirm_transfer_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; pdu_session_res_modify_ind_transfer_ext_ies_container::pdu_session_res_modify_ind_transfer_ext_ies_container() : secondary_ratusage_info(144, crit_e::ignore), @@ -24929,7 +24804,7 @@ SRSASN_CODE pdu_session_res_modify_ind_transfer_ext_ies_container::unpack(cbit_r security_result.ext = c.ext_value.security_result(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -24990,8 +24865,8 @@ void pdu_session_res_modify_ind_transfer_s::to_json(json_writer& j) const dlqos_flow_per_tnl_info.to_json(j); if (add_dl_qos_flow_per_tnl_info_present) { j.start_array("additionalDLQosFlowPerTNLInformation"); - for (uint32_t i1 = 0; i1 < add_dl_qos_flow_per_tnl_info.size(); ++i1) { - add_dl_qos_flow_per_tnl_info[i1].to_json(j); + for (const auto& e1 : add_dl_qos_flow_per_tnl_info) { + e1.to_json(j); } j.end_array(); } @@ -25042,50 +24917,37 @@ void pdu_session_res_modify_ind_unsuccessful_transfer_s::to_json(json_writer& j) // PDUSessionResourceModifyItemModReq-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-EXTENSION uint32_t pdu_session_res_modify_item_mod_req_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {148}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {148}; + return map_enum_number(options, 1, idx, "id"); } bool pdu_session_res_modify_item_mod_req_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {148}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 148 == id; } crit_e pdu_session_res_modify_item_mod_req_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 148: - return crit_e::reject; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 148) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } pdu_session_res_modify_item_mod_req_ext_ies_o::ext_c pdu_session_res_modify_item_mod_req_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 148: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 148) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e pdu_session_res_modify_item_mod_req_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 148: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 148) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -25111,11 +24973,11 @@ SRSASN_CODE pdu_session_res_modify_item_mod_req_ext_ies_o::ext_c::unpack(cbit_re std::string pdu_session_res_modify_item_mod_req_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"S-NSSAI"}; + static const char* options[] = {"S-NSSAI"}; return convert_enum_idx(options, 1, value, "pdu_session_res_modify_item_mod_req_ext_ies_o::ext_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pdu_session_res_modify_request_transfer_ies_container::pdu_session_res_modify_request_transfer_ies_container() : pdu_session_aggregate_maximum_bit_rate(130, crit_e::reject), @@ -25204,7 +25066,7 @@ SRSASN_CODE pdu_session_res_modify_request_transfer_ies_container::unpack(cbit_r add_ul_ngu_up_tnl_info.value = c.value.add_ul_ngu_up_tnl_info(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -25264,7 +25126,7 @@ void pdu_session_res_modify_request_transfer_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; pdu_session_res_modify_resp_transfer_ext_ies_container::pdu_session_res_modify_resp_transfer_ext_ies_container() : add_ngu_up_tnl_info(154, crit_e::ignore) @@ -25290,16 +25152,14 @@ SRSASN_CODE pdu_session_res_modify_resp_transfer_ext_ies_container::unpack(cbit_ for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 154: - add_ngu_up_tnl_info_present = true; - add_ngu_up_tnl_info.id = c.id; - add_ngu_up_tnl_info.crit = c.crit; - add_ngu_up_tnl_info.ext = c.ext_value.add_ngu_up_tnl_info(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 154) { + add_ngu_up_tnl_info_present = true; + add_ngu_up_tnl_info.id = c.id; + add_ngu_up_tnl_info.crit = c.crit; + add_ngu_up_tnl_info.ext = c.ext_value.add_ngu_up_tnl_info(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -25391,22 +25251,22 @@ void pdu_session_res_modify_resp_transfer_s::to_json(json_writer& j) const } if (qos_flow_add_or_modify_resp_list_present) { j.start_array("qosFlowAddOrModifyResponseList"); - for (uint32_t i1 = 0; i1 < qos_flow_add_or_modify_resp_list.size(); ++i1) { - qos_flow_add_or_modify_resp_list[i1].to_json(j); + for (const auto& e1 : qos_flow_add_or_modify_resp_list) { + e1.to_json(j); } j.end_array(); } if (add_dl_qos_flow_per_tnl_info_present) { j.start_array("additionalDLQosFlowPerTNLInformation"); - for (uint32_t i1 = 0; i1 < add_dl_qos_flow_per_tnl_info.size(); ++i1) { - add_dl_qos_flow_per_tnl_info[i1].to_json(j); + for (const auto& e1 : add_dl_qos_flow_per_tnl_info) { + e1.to_json(j); } j.end_array(); } if (qos_flow_failed_to_add_or_modify_list_present) { j.start_array("qosFlowFailedToAddOrModifyList"); - for (uint32_t i1 = 0; i1 < qos_flow_failed_to_add_or_modify_list.size(); ++i1) { - qos_flow_failed_to_add_or_modify_list[i1].to_json(j); + for (const auto& e1 : qos_flow_failed_to_add_or_modify_list) { + e1.to_json(j); } j.end_array(); } @@ -25466,7 +25326,7 @@ void pdu_session_res_modify_unsuccessful_transfer_s::to_json(json_writer& j) con j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; pdu_session_res_notify_released_transfer_ext_ies_container:: pdu_session_res_notify_released_transfer_ext_ies_container() : @@ -25493,16 +25353,14 @@ SRSASN_CODE pdu_session_res_notify_released_transfer_ext_ies_container::unpack(c for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 144: - secondary_ratusage_info_present = true; - secondary_ratusage_info.id = c.id; - secondary_ratusage_info.crit = c.crit; - secondary_ratusage_info.ext = c.ext_value.secondary_ratusage_info(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 144) { + secondary_ratusage_info_present = true; + secondary_ratusage_info.id = c.id; + secondary_ratusage_info.crit = c.crit; + secondary_ratusage_info.ext = c.ext_value.secondary_ratusage_info(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -25555,7 +25413,7 @@ void pdu_session_res_notify_released_transfer_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; pdu_session_res_notify_transfer_ext_ies_container::pdu_session_res_notify_transfer_ext_ies_container() : secondary_ratusage_info(144, crit_e::ignore) @@ -25581,16 +25439,14 @@ SRSASN_CODE pdu_session_res_notify_transfer_ext_ies_container::unpack(cbit_ref& for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 144: - secondary_ratusage_info_present = true; - secondary_ratusage_info.id = c.id; - secondary_ratusage_info.crit = c.crit; - secondary_ratusage_info.ext = c.ext_value.secondary_ratusage_info(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 144) { + secondary_ratusage_info_present = true; + secondary_ratusage_info.id = c.id; + secondary_ratusage_info.crit = c.crit; + secondary_ratusage_info.ext = c.ext_value.secondary_ratusage_info(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -25650,15 +25506,15 @@ void pdu_session_res_notify_transfer_s::to_json(json_writer& j) const j.start_obj(); if (qos_flow_notify_list_present) { j.start_array("qosFlowNotifyList"); - for (uint32_t i1 = 0; i1 < qos_flow_notify_list.size(); ++i1) { - qos_flow_notify_list[i1].to_json(j); + for (const auto& e1 : qos_flow_notify_list) { + e1.to_json(j); } j.end_array(); } if (qos_flow_released_list_present) { j.start_array("qosFlowReleasedList"); - for (uint32_t i1 = 0; i1 < qos_flow_released_list.size(); ++i1) { - qos_flow_released_list[i1].to_json(j); + for (const auto& e1 : qos_flow_released_list) { + e1.to_json(j); } j.end_array(); } @@ -25706,7 +25562,7 @@ void pdu_session_res_release_cmd_transfer_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; path_switch_request_ack_transfer_ext_ies_container::path_switch_request_ack_transfer_ext_ies_container() : add_ngu_up_tnl_info(154, crit_e::ignore) @@ -25732,16 +25588,14 @@ SRSASN_CODE path_switch_request_ack_transfer_ext_ies_container::unpack(cbit_ref& for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 154: - add_ngu_up_tnl_info_present = true; - add_ngu_up_tnl_info.id = c.id; - add_ngu_up_tnl_info.crit = c.crit; - add_ngu_up_tnl_info.ext = c.ext_value.add_ngu_up_tnl_info(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 154) { + add_ngu_up_tnl_info_present = true; + add_ngu_up_tnl_info.id = c.id; + add_ngu_up_tnl_info.crit = c.crit; + add_ngu_up_tnl_info.ext = c.ext_value.add_ngu_up_tnl_info(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -25851,7 +25705,7 @@ void path_switch_request_setup_failed_transfer_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; path_switch_request_transfer_ext_ies_container::path_switch_request_transfer_ext_ies_container() : add_dl_qos_flow_per_tnl_info(155, crit_e::ignore) @@ -25877,16 +25731,14 @@ SRSASN_CODE path_switch_request_transfer_ext_ies_container::unpack(cbit_ref& bre for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 155: - add_dl_qos_flow_per_tnl_info_present = true; - add_dl_qos_flow_per_tnl_info.id = c.id; - add_dl_qos_flow_per_tnl_info.crit = c.crit; - add_dl_qos_flow_per_tnl_info.ext = c.ext_value.add_dl_qos_flow_per_tnl_info(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 155) { + add_dl_qos_flow_per_tnl_info_present = true; + add_dl_qos_flow_per_tnl_info.id = c.id; + add_dl_qos_flow_per_tnl_info.crit = c.crit; + add_dl_qos_flow_per_tnl_info.ext = c.ext_value.add_dl_qos_flow_per_tnl_info(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -25958,8 +25810,8 @@ void path_switch_request_transfer_s::to_json(json_writer& j) const user_plane_security_info.to_json(j); } j.start_array("qosFlowAcceptedList"); - for (uint32_t i1 = 0; i1 < qos_flow_accepted_list.size(); ++i1) { - qos_flow_accepted_list[i1].to_json(j); + for (const auto& e1 : qos_flow_accepted_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -26097,7 +25949,7 @@ SRSASN_CODE private_ie_id_c::unpack(cbit_ref& bref) std::string private_ie_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"local", "global"}; + static const char* options[] = {"local", "global"}; return convert_enum_idx(options, 2, value, "private_ie_id_c::types"); } @@ -26204,7 +26056,7 @@ void ue_associated_lc_ng_conn_item_s::to_json(json_writer& j) const // UEPresence ::= ENUMERATED std::string ue_presence_opts::to_string() const { - static constexpr const char* options[] = {"in", "out", "unknown"}; + static const char* options[] = {"in", "out", "unknown"}; return convert_enum_idx(options, 3, value, "ue_presence_e"); } @@ -26253,8 +26105,8 @@ void overload_start_nssai_item_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("sliceOverloadList"); - for (uint32_t i1 = 0; i1 < slice_overload_list.size(); ++i1) { - slice_overload_list[i1].to_json(j); + for (const auto& e1 : slice_overload_list) { + e1.to_json(j); } j.end_array(); if (slice_overload_resp_present) { @@ -26428,7 +26280,7 @@ void pdu_session_res_failed_to_setup_item_su_res_s::to_json(json_writer& j) cons j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; pdu_session_res_item_cxt_rel_cpl_ext_ies_container::pdu_session_res_item_cxt_rel_cpl_ext_ies_container() : pdu_session_res_release_resp_transfer(145, crit_e::ignore) @@ -26454,16 +26306,14 @@ SRSASN_CODE pdu_session_res_item_cxt_rel_cpl_ext_ies_container::unpack(cbit_ref& for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 145: - pdu_session_res_release_resp_transfer_present = true; - pdu_session_res_release_resp_transfer.id = c.id; - pdu_session_res_release_resp_transfer.crit = c.crit; - pdu_session_res_release_resp_transfer.ext = c.ext_value.pdu_session_res_release_resp_transfer(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 145) { + pdu_session_res_release_resp_transfer_present = true; + pdu_session_res_release_resp_transfer.id = c.id; + pdu_session_res_release_resp_transfer.crit = c.crit; + pdu_session_res_release_resp_transfer.ext = c.ext_value.pdu_session_res_release_resp_transfer(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -26629,7 +26479,7 @@ void pdu_session_res_modify_item_mod_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::ngap_nr::protocol_ext_field_s; pdu_session_res_modify_item_mod_req_ext_ies_container::pdu_session_res_modify_item_mod_req_ext_ies_container() : s_nssai(148, crit_e::reject) @@ -26655,16 +26505,14 @@ SRSASN_CODE pdu_session_res_modify_item_mod_req_ext_ies_container::unpack(cbit_r for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 148: - s_nssai_present = true; - s_nssai.id = c.id; - s_nssai.crit = c.crit; - s_nssai.ext = c.ext_value.s_nssai(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 148) { + s_nssai_present = true; + s_nssai.id = c.id; + s_nssai.crit = c.crit; + s_nssai.ext = c.ext_value.s_nssai(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -27216,7 +27064,7 @@ void pdu_session_res_to_release_item_rel_cmd_s::to_json(json_writer& j) const // ResetAll ::= ENUMERATED std::string reset_all_opts::to_string() const { - static constexpr const char* options[] = {"reset-all"}; + static const char* options[] = {"reset-all"}; return convert_enum_idx(options, 1, value, "reset_all_e"); } @@ -27252,8 +27100,8 @@ void supported_ta_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("tAC", tac.to_string()); j.start_array("broadcastPLMNList"); - for (uint32_t i1 = 0; i1 < broadcast_plmn_list.size(); ++i1) { - broadcast_plmn_list[i1].to_json(j); + for (const auto& e1 : broadcast_plmn_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -27381,28 +27229,28 @@ void ue_presence_in_area_of_interest_item_s::to_json(json_writer& j) const // CancelAllWarningMessages ::= ENUMERATED std::string cancel_all_warning_msgs_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "cancel_all_warning_msgs_e"); } // ConcurrentWarningMessageInd ::= ENUMERATED std::string concurrent_warning_msg_ind_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "concurrent_warning_msg_ind_e"); } // HandoverFlag ::= ENUMERATED std::string ho_flag_opts::to_string() const { - static constexpr const char* options[] = {"handover-preparation"}; + static const char* options[] = {"handover-preparation"}; return convert_enum_idx(options, 1, value, "ho_flag_e"); } // IMSVoiceSupportIndicator ::= ENUMERATED std::string ims_voice_support_ind_opts::to_string() const { - static constexpr const char* options[] = {"supported", "not-supported"}; + static const char* options[] = {"supported", "not-supported"}; return convert_enum_idx(options, 2, value, "ims_voice_support_ind_e"); } @@ -27492,15 +27340,15 @@ void pws_failed_cell_id_list_c::to_json(json_writer& j) const switch (type_) { case types::eutra_cgi_pws_failed_list: j.start_array("eUTRA-CGI-PWSFailedList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::nr_cgi_pws_failed_list: j.start_array("nR-CGI-PWSFailedList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -27556,33 +27404,33 @@ SRSASN_CODE pws_failed_cell_id_list_c::unpack(cbit_ref& bref) std::string pws_failed_cell_id_list_c::types_opts::to_string() const { - static constexpr const char* options[] = {"eUTRA-CGI-PWSFailedList", "nR-CGI-PWSFailedList", "choice-Extensions"}; + static const char* options[] = {"eUTRA-CGI-PWSFailedList", "nR-CGI-PWSFailedList", "choice-Extensions"}; return convert_enum_idx(options, 3, value, "pws_failed_cell_id_list_c::types"); } // PagingOrigin ::= ENUMERATED std::string paging_origin_opts::to_string() const { - static constexpr const char* options[] = {"non-3gpp"}; + static const char* options[] = {"non-3gpp"}; return convert_enum_idx(options, 1, value, "paging_origin_e"); } int8_t paging_origin_opts::to_number() const { - static constexpr int8_t options[] = {-3}; - return convert_enum_idx(options, 1, value, "paging_origin_e"); + static const int8_t options[] = {-3}; + return map_enum_number(options, 1, value, "paging_origin_e"); } // PagingPriority ::= ENUMERATED std::string paging_prio_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "priolevel1", "priolevel2", "priolevel3", "priolevel4", "priolevel5", "priolevel6", "priolevel7", "priolevel8"}; return convert_enum_idx(options, 8, value, "paging_prio_e"); } uint8_t paging_prio_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8}; - return convert_enum_idx(options, 8, value, "paging_prio_e"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8}; + return map_enum_number(options, 8, value, "paging_prio_e"); } // PrivateIE-Field{NGAP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE{{NGAP-PRIVATE-IES}} @@ -27617,7 +27465,7 @@ void private_ie_field_s::to_json(json_writer& j) const // RRCState ::= ENUMERATED std::string rrc_state_opts::to_string() const { - static constexpr const char* options[] = {"inactive", "connected"}; + static const char* options[] = {"inactive", "connected"}; return convert_enum_idx(options, 2, value, "rrc_state_e"); } @@ -27706,8 +27554,8 @@ void reset_type_c::to_json(json_writer& j) const break; case types::part_of_ng_interface: j.start_array("partOfNG-Interface"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -27763,7 +27611,7 @@ SRSASN_CODE reset_type_c::unpack(cbit_ref& bref) std::string reset_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"nG-Interface", "partOfNG-Interface", "choice-Extensions"}; + static const char* options[] = {"nG-Interface", "partOfNG-Interface", "choice-Extensions"}; return convert_enum_idx(options, 3, value, "reset_type_c::types"); } @@ -27906,7 +27754,7 @@ SRSASN_CODE ue_ngap_ids_c::unpack(cbit_ref& bref) std::string ue_ngap_ids_c::types_opts::to_string() const { - static constexpr const char* options[] = {"uE-NGAP-ID-pair", "aMF-UE-NGAP-ID", "choice-Extensions"}; + static const char* options[] = {"uE-NGAP-ID-pair", "aMF-UE-NGAP-ID", "choice-Extensions"}; return convert_enum_idx(options, 3, value, "ue_ngap_ids_c::types"); } @@ -28032,19 +27880,19 @@ SRSASN_CODE ue_paging_id_c::unpack(cbit_ref& bref) std::string ue_paging_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"fiveG-S-TMSI", "choice-Extensions"}; + static const char* options[] = {"fiveG-S-TMSI", "choice-Extensions"}; return convert_enum_idx(options, 2, value, "ue_paging_id_c::types"); } uint8_t ue_paging_id_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {5}; - return convert_enum_idx(options, 1, value, "ue_paging_id_c::types"); + static const uint8_t options[] = {5}; + return map_enum_number(options, 1, value, "ue_paging_id_c::types"); } // UERetentionInformation ::= ENUMERATED std::string ue_retention_info_opts::to_string() const { - static constexpr const char* options[] = {"ues-retained"}; + static const char* options[] = {"ues-retained"}; return convert_enum_idx(options, 1, value, "ue_retention_info_e"); } @@ -28158,29 +28006,29 @@ void warning_area_list_c::to_json(json_writer& j) const switch (type_) { case types::eutra_cgi_list_for_warning: j.start_array("eUTRA-CGIListForWarning"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::nr_cgi_list_for_warning: j.start_array("nR-CGIListForWarning"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::tai_list_for_warning: j.start_array("tAIListForWarning"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::emergency_area_id_list: j.start_array("emergencyAreaIDList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -28248,25 +28096,25 @@ SRSASN_CODE warning_area_list_c::unpack(cbit_ref& bref) std::string warning_area_list_c::types_opts::to_string() const { - static constexpr const char* options[] = {"eUTRA-CGIListForWarning", - "nR-CGIListForWarning", - "tAIListForWarning", - "emergencyAreaIDList", - "choice-Extensions"}; + static const char* options[] = {"eUTRA-CGIListForWarning", + "nR-CGIListForWarning", + "tAIListForWarning", + "emergencyAreaIDList", + "choice-Extensions"}; return convert_enum_idx(options, 5, value, "warning_area_list_c::types"); } // LocationReportIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t location_report_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 121, 116, 33, 149}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {10, 85, 121, 116, 33, 149}; + return map_enum_number(options, 6, idx, "id"); } bool location_report_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 121, 116, 33, 149}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 121, 116, 33, 149}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -28288,9 +28136,9 @@ crit_e location_report_ies_o::get_crit(const uint32_t& id) case 149: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } location_report_ies_o::value_c location_report_ies_o::get_value(const uint32_t& id) { @@ -28315,7 +28163,7 @@ location_report_ies_o::value_c location_report_ies_o::get_value(const uint32_t& ret.set(value_c::types::ps_cell_info); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -28335,9 +28183,9 @@ presence_e location_report_ies_o::get_presence(const uint32_t& id) case 149: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -28525,8 +28373,8 @@ void location_report_ies_o::value_c::to_json(json_writer& j) const break; case types::ue_presence_in_area_of_interest_list: j.start_array("UEPresenceInAreaOfInterestList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -28602,26 +28450,26 @@ SRSASN_CODE location_report_ies_o::value_c::unpack(cbit_ref& bref) std::string location_report_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "UserLocationInformation", - "UEPresenceInAreaOfInterestList", - "LocationReportingRequestType", - "NGRAN-CGI"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "UserLocationInformation", + "UEPresenceInAreaOfInterestList", + "LocationReportingRequestType", + "NGRAN-CGI"}; return convert_enum_idx(options, 6, value, "location_report_ies_o::value_c::types"); } // LocationReportingControlIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t location_report_ctrl_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 33}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 85, 33}; + return map_enum_number(options, 3, idx, "id"); } bool location_report_ctrl_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 33}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 33}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -28637,9 +28485,9 @@ crit_e location_report_ctrl_ies_o::get_crit(const uint32_t& id) case 33: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } location_report_ctrl_ies_o::value_c location_report_ctrl_ies_o::get_value(const uint32_t& id) { @@ -28655,7 +28503,7 @@ location_report_ctrl_ies_o::value_c location_report_ctrl_ies_o::get_value(const ret.set(value_c::types::location_report_request_type); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -28669,9 +28517,9 @@ presence_e location_report_ctrl_ies_o::get_presence(const uint32_t& id) case 33: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -28837,7 +28685,7 @@ SRSASN_CODE location_report_ctrl_ies_o::value_c::unpack(cbit_ref& bref) std::string location_report_ctrl_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "LocationReportingRequestType"}; return convert_enum_idx(options, 3, value, "location_report_ctrl_ies_o::value_c::types"); } @@ -28845,14 +28693,14 @@ std::string location_report_ctrl_ies_o::value_c::types_opts::to_string() const // LocationReportingFailureIndicationIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t location_report_fail_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 15}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 85, 15}; + return map_enum_number(options, 3, idx, "id"); } bool location_report_fail_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 15}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 15}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -28868,9 +28716,9 @@ crit_e location_report_fail_ind_ies_o::get_crit(const uint32_t& id) case 15: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } location_report_fail_ind_ies_o::value_c location_report_fail_ind_ies_o::get_value(const uint32_t& id) { @@ -28886,7 +28734,7 @@ location_report_fail_ind_ies_o::value_c location_report_fail_ind_ies_o::get_valu ret.set(value_c::types::cause); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -28900,9 +28748,9 @@ presence_e location_report_fail_ind_ies_o::get_presence(const uint32_t& id) case 15: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -29068,21 +28916,21 @@ SRSASN_CODE location_report_fail_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string location_report_fail_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "Cause"}; + static const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "Cause"}; return convert_enum_idx(options, 3, value, "location_report_fail_ind_ies_o::value_c::types"); } // NASNonDeliveryIndication-IEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t nas_non_delivery_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 38, 15}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 38, 15}; + return map_enum_number(options, 4, idx, "id"); } bool nas_non_delivery_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 38, 15}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 38, 15}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -29100,9 +28948,9 @@ crit_e nas_non_delivery_ind_ies_o::get_crit(const uint32_t& id) case 15: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } nas_non_delivery_ind_ies_o::value_c nas_non_delivery_ind_ies_o::get_value(const uint32_t& id) { @@ -29121,7 +28969,7 @@ nas_non_delivery_ind_ies_o::value_c nas_non_delivery_ind_ies_o::get_value(const ret.set(value_c::types::cause); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -29137,9 +28985,9 @@ presence_e nas_non_delivery_ind_ies_o::get_presence(const uint32_t& id) case 15: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -29336,22 +29184,21 @@ SRSASN_CODE nas_non_delivery_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string nas_non_delivery_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING", "Cause"}; + static const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING", "Cause"}; return convert_enum_idx(options, 4, value, "nas_non_delivery_ind_ies_o::value_c::types"); } // NGResetAcknowledgeIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ng_reset_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {111, 19}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {111, 19}; + return map_enum_number(options, 2, idx, "id"); } bool ng_reset_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {111, 19}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {111, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -29365,9 +29212,9 @@ crit_e ng_reset_ack_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ng_reset_ack_ies_o::value_c ng_reset_ack_ies_o::get_value(const uint32_t& id) { @@ -29380,7 +29227,7 @@ ng_reset_ack_ies_o::value_c ng_reset_ack_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -29392,9 +29239,9 @@ presence_e ng_reset_ack_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -29491,8 +29338,8 @@ void ng_reset_ack_ies_o::value_c::to_json(json_writer& j) const switch (type_) { case types::ue_associated_lc_ng_conn_list: j.start_array("UE-associatedLogicalNG-connectionList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -29540,21 +29387,21 @@ SRSASN_CODE ng_reset_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string ng_reset_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"UE-associatedLogicalNG-connectionList", "CriticalityDiagnostics"}; + static const char* options[] = {"UE-associatedLogicalNG-connectionList", "CriticalityDiagnostics"}; return convert_enum_idx(options, 2, value, "ng_reset_ack_ies_o::value_c::types"); } // NGResetIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ng_reset_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {15, 88}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {15, 88}; + return map_enum_number(options, 2, idx, "id"); } bool ng_reset_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {15, 88}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {15, 88}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -29568,9 +29415,9 @@ crit_e ng_reset_ies_o::get_crit(const uint32_t& id) case 88: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ng_reset_ies_o::value_c ng_reset_ies_o::get_value(const uint32_t& id) { @@ -29583,7 +29430,7 @@ ng_reset_ies_o::value_c ng_reset_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::reset_type); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -29595,9 +29442,9 @@ presence_e ng_reset_ies_o::get_presence(const uint32_t& id) case 88: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -29740,21 +29587,21 @@ SRSASN_CODE ng_reset_ies_o::value_c::unpack(cbit_ref& bref) std::string ng_reset_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Cause", "ResetType"}; + static const char* options[] = {"Cause", "ResetType"}; return convert_enum_idx(options, 2, value, "ng_reset_ies_o::value_c::types"); } // NGSetupFailureIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ng_setup_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {15, 107, 19}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {15, 107, 19}; + return map_enum_number(options, 3, idx, "id"); } bool ng_setup_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {15, 107, 19}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {15, 107, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -29770,9 +29617,9 @@ crit_e ng_setup_fail_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ng_setup_fail_ies_o::value_c ng_setup_fail_ies_o::get_value(const uint32_t& id) { @@ -29788,7 +29635,7 @@ ng_setup_fail_ies_o::value_c ng_setup_fail_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -29802,9 +29649,9 @@ presence_e ng_setup_fail_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -29974,21 +29821,21 @@ SRSASN_CODE ng_setup_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string ng_setup_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; + static const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "ng_setup_fail_ies_o::value_c::types"); } // NGSetupRequestIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ng_setup_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {27, 82, 102, 21, 147}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {27, 82, 102, 21, 147}; + return map_enum_number(options, 5, idx, "id"); } bool ng_setup_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {27, 82, 102, 21, 147}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {27, 82, 102, 21, 147}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -30008,9 +29855,9 @@ crit_e ng_setup_request_ies_o::get_crit(const uint32_t& id) case 147: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ng_setup_request_ies_o::value_c ng_setup_request_ies_o::get_value(const uint32_t& id) { @@ -30032,7 +29879,7 @@ ng_setup_request_ies_o::value_c ng_setup_request_ies_o::get_value(const uint32_t ret.set(value_c::types::ue_retention_info); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -30050,9 +29897,9 @@ presence_e ng_setup_request_ies_o::get_presence(const uint32_t& id) case 147: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -30215,8 +30062,8 @@ void ng_setup_request_ies_o::value_c::to_json(json_writer& j) const break; case types::supported_ta_list: j.start_array("SupportedTAList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -30284,7 +30131,7 @@ SRSASN_CODE ng_setup_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ng_setup_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "GlobalRANNodeID", "PrintableString", "SupportedTAList", "PagingDRX", "UERetentionInformation"}; return convert_enum_idx(options, 5, value, "ng_setup_request_ies_o::value_c::types"); } @@ -30292,14 +30139,14 @@ std::string ng_setup_request_ies_o::value_c::types_opts::to_string() const // NGSetupResponseIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ng_setup_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {1, 96, 86, 80, 19, 147}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {1, 96, 86, 80, 19, 147}; + return map_enum_number(options, 6, idx, "id"); } bool ng_setup_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {1, 96, 86, 80, 19, 147}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {1, 96, 86, 80, 19, 147}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -30321,9 +30168,9 @@ crit_e ng_setup_resp_ies_o::get_crit(const uint32_t& id) case 147: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ng_setup_resp_ies_o::value_c ng_setup_resp_ies_o::get_value(const uint32_t& id) { @@ -30348,7 +30195,7 @@ ng_setup_resp_ies_o::value_c ng_setup_resp_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::ue_retention_info); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -30368,9 +30215,9 @@ presence_e ng_setup_resp_ies_o::get_presence(const uint32_t& id) case 147: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -30550,8 +30397,8 @@ void ng_setup_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::served_guami_list: j.start_array("ServedGUAMIList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -30560,8 +30407,8 @@ void ng_setup_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::plmn_support_list: j.start_array("PLMNSupportList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -30636,36 +30483,34 @@ SRSASN_CODE ng_setup_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string ng_setup_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"PrintableString", - "ServedGUAMIList", - "INTEGER (0..255)", - "PLMNSupportList", - "CriticalityDiagnostics", - "UERetentionInformation"}; + static const char* options[] = {"PrintableString", + "ServedGUAMIList", + "INTEGER (0..255)", + "PLMNSupportList", + "CriticalityDiagnostics", + "UERetentionInformation"}; return convert_enum_idx(options, 6, value, "ng_setup_resp_ies_o::value_c::types"); } uint8_t ng_setup_resp_ies_o::value_c::types_opts::to_number() const { - switch (value) { - case relative_amf_capacity: - return 0; - default: - invalid_enum_number(value, "ng_setup_resp_ies_o::value_c::types"); + if (value == relative_amf_capacity) { + return 0; } + invalid_enum_number(value, "ng_setup_resp_ies_o::value_c::types"); return 0; } // OverloadStartIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t overload_start_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {2, 9, 49}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {2, 9, 49}; + return map_enum_number(options, 3, idx, "id"); } bool overload_start_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {2, 9, 49}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {2, 9, 49}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -30681,9 +30526,9 @@ crit_e overload_start_ies_o::get_crit(const uint32_t& id) case 49: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } overload_start_ies_o::value_c overload_start_ies_o::get_value(const uint32_t& id) { @@ -30699,7 +30544,7 @@ overload_start_ies_o::value_c overload_start_ies_o::get_value(const uint32_t& id ret.set(value_c::types::overload_start_nssai_list); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -30713,9 +30558,9 @@ presence_e overload_start_ies_o::get_presence(const uint32_t& id) case 49: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -30837,8 +30682,8 @@ void overload_start_ies_o::value_c::to_json(json_writer& j) const break; case types::overload_start_nssai_list: j.start_array("OverloadStartNSSAIList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -30888,31 +30733,29 @@ SRSASN_CODE overload_start_ies_o::value_c::unpack(cbit_ref& bref) std::string overload_start_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"OverloadResponse", "INTEGER (1..99)", "OverloadStartNSSAIList"}; + static const char* options[] = {"OverloadResponse", "INTEGER (1..99)", "OverloadStartNSSAIList"}; return convert_enum_idx(options, 3, value, "overload_start_ies_o::value_c::types"); } uint8_t overload_start_ies_o::value_c::types_opts::to_number() const { - switch (value) { - case amf_traffic_load_reduction_ind: - return 1; - default: - invalid_enum_number(value, "overload_start_ies_o::value_c::types"); + if (value == amf_traffic_load_reduction_ind) { + return 1; } + invalid_enum_number(value, "overload_start_ies_o::value_c::types"); return 0; } // PDUSessionResourceModifyConfirmIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pdu_session_res_modify_confirm_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 62, 131, 19}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {10, 85, 62, 131, 19}; + return map_enum_number(options, 5, idx, "id"); } bool pdu_session_res_modify_confirm_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 62, 131, 19}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 62, 131, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -30932,9 +30775,9 @@ crit_e pdu_session_res_modify_confirm_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_modify_confirm_ies_o::value_c pdu_session_res_modify_confirm_ies_o::get_value(const uint32_t& id) { @@ -30956,7 +30799,7 @@ pdu_session_res_modify_confirm_ies_o::value_c pdu_session_res_modify_confirm_ies ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -30974,9 +30817,9 @@ presence_e pdu_session_res_modify_confirm_ies_o::get_presence(const uint32_t& id case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -31142,15 +30985,15 @@ void pdu_session_res_modify_confirm_ies_o::value_c::to_json(json_writer& j) cons break; case types::pdu_session_res_modify_list_mod_cfm: j.start_array("PDUSessionResourceModifyListModCfm"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::pdu_session_res_failed_to_modify_list_mod_cfm: j.start_array("PDUSessionResourceFailedToModifyListModCfm"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -31216,25 +31059,25 @@ SRSASN_CODE pdu_session_res_modify_confirm_ies_o::value_c::unpack(cbit_ref& bref std::string pdu_session_res_modify_confirm_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PDUSessionResourceModifyListModCfm", - "PDUSessionResourceFailedToModifyListModCfm", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PDUSessionResourceModifyListModCfm", + "PDUSessionResourceFailedToModifyListModCfm", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 5, value, "pdu_session_res_modify_confirm_ies_o::value_c::types"); } // PDUSessionResourceModifyIndicationIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pdu_session_res_modify_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 63}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 85, 63}; + return map_enum_number(options, 3, idx, "id"); } bool pdu_session_res_modify_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 63}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 63}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -31250,9 +31093,9 @@ crit_e pdu_session_res_modify_ind_ies_o::get_crit(const uint32_t& id) case 63: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_modify_ind_ies_o::value_c pdu_session_res_modify_ind_ies_o::get_value(const uint32_t& id) { @@ -31268,7 +31111,7 @@ pdu_session_res_modify_ind_ies_o::value_c pdu_session_res_modify_ind_ies_o::get_ ret.set(value_c::types::pdu_session_res_modify_list_mod_ind); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -31282,9 +31125,9 @@ presence_e pdu_session_res_modify_ind_ies_o::get_presence(const uint32_t& id) case 63: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -31403,8 +31246,8 @@ void pdu_session_res_modify_ind_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_modify_list_mod_ind: j.start_array("PDUSessionResourceModifyListModInd"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -31454,7 +31297,7 @@ SRSASN_CODE pdu_session_res_modify_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string pdu_session_res_modify_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "PDUSessionResourceModifyListModInd"}; return convert_enum_idx(options, 3, value, "pdu_session_res_modify_ind_ies_o::value_c::types"); } @@ -31462,14 +31305,14 @@ std::string pdu_session_res_modify_ind_ies_o::value_c::types_opts::to_string() c // PDUSessionResourceModifyRequestIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pdu_session_res_modify_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 83, 64}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 83, 64}; + return map_enum_number(options, 4, idx, "id"); } bool pdu_session_res_modify_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 83, 64}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 83, 64}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -31487,9 +31330,9 @@ crit_e pdu_session_res_modify_request_ies_o::get_crit(const uint32_t& id) case 64: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_modify_request_ies_o::value_c pdu_session_res_modify_request_ies_o::get_value(const uint32_t& id) { @@ -31508,7 +31351,7 @@ pdu_session_res_modify_request_ies_o::value_c pdu_session_res_modify_request_ies ret.set(value_c::types::pdu_session_res_modify_list_mod_req); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -31524,9 +31367,9 @@ presence_e pdu_session_res_modify_request_ies_o::get_presence(const uint32_t& id case 64: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -31667,8 +31510,8 @@ void pdu_session_res_modify_request_ies_o::value_c::to_json(json_writer& j) cons break; case types::pdu_session_res_modify_list_mod_req: j.start_array("PDUSessionResourceModifyListModReq"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -31724,24 +31567,24 @@ SRSASN_CODE pdu_session_res_modify_request_ies_o::value_c::unpack(cbit_ref& bref std::string pdu_session_res_modify_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "INTEGER (1..256)", - "PDUSessionResourceModifyListModReq"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "INTEGER (1..256)", + "PDUSessionResourceModifyListModReq"}; return convert_enum_idx(options, 4, value, "pdu_session_res_modify_request_ies_o::value_c::types"); } // PDUSessionResourceModifyResponseIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pdu_session_res_modify_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 65, 54, 121, 19}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {10, 85, 65, 54, 121, 19}; + return map_enum_number(options, 6, idx, "id"); } bool pdu_session_res_modify_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 65, 54, 121, 19}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 65, 54, 121, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -31763,9 +31606,9 @@ crit_e pdu_session_res_modify_resp_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_modify_resp_ies_o::value_c pdu_session_res_modify_resp_ies_o::get_value(const uint32_t& id) { @@ -31790,7 +31633,7 @@ pdu_session_res_modify_resp_ies_o::value_c pdu_session_res_modify_resp_ies_o::ge ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -31810,9 +31653,9 @@ presence_e pdu_session_res_modify_resp_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -31999,15 +31842,15 @@ void pdu_session_res_modify_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_modify_list_mod_res: j.start_array("PDUSessionResourceModifyListModRes"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::pdu_session_res_failed_to_modify_list_mod_res: j.start_array("PDUSessionResourceFailedToModifyListModRes"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -32083,26 +31926,26 @@ SRSASN_CODE pdu_session_res_modify_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string pdu_session_res_modify_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PDUSessionResourceModifyListModRes", - "PDUSessionResourceFailedToModifyListModRes", - "UserLocationInformation", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PDUSessionResourceModifyListModRes", + "PDUSessionResourceFailedToModifyListModRes", + "UserLocationInformation", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 6, value, "pdu_session_res_modify_resp_ies_o::value_c::types"); } // PDUSessionResourceNotifyIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pdu_session_res_notify_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 66, 67, 121}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {10, 85, 66, 67, 121}; + return map_enum_number(options, 5, idx, "id"); } bool pdu_session_res_notify_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 66, 67, 121}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 66, 67, 121}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -32122,9 +31965,9 @@ crit_e pdu_session_res_notify_ies_o::get_crit(const uint32_t& id) case 121: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_notify_ies_o::value_c pdu_session_res_notify_ies_o::get_value(const uint32_t& id) { @@ -32146,7 +31989,7 @@ pdu_session_res_notify_ies_o::value_c pdu_session_res_notify_ies_o::get_value(co ret.set(value_c::types::user_location_info); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -32164,9 +32007,9 @@ presence_e pdu_session_res_notify_ies_o::get_presence(const uint32_t& id) case 121: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -32329,15 +32172,15 @@ void pdu_session_res_notify_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_notify_list: j.start_array("PDUSessionResourceNotifyList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::pdu_session_res_released_list_not: j.start_array("PDUSessionResourceReleasedListNot"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -32403,25 +32246,25 @@ SRSASN_CODE pdu_session_res_notify_ies_o::value_c::unpack(cbit_ref& bref) std::string pdu_session_res_notify_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PDUSessionResourceNotifyList", - "PDUSessionResourceReleasedListNot", - "UserLocationInformation"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PDUSessionResourceNotifyList", + "PDUSessionResourceReleasedListNot", + "UserLocationInformation"}; return convert_enum_idx(options, 5, value, "pdu_session_res_notify_ies_o::value_c::types"); } // PDUSessionResourceReleaseCommandIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pdu_session_res_release_cmd_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 83, 38, 79}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {10, 85, 83, 38, 79}; + return map_enum_number(options, 5, idx, "id"); } bool pdu_session_res_release_cmd_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 83, 38, 79}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 83, 38, 79}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -32441,9 +32284,9 @@ crit_e pdu_session_res_release_cmd_ies_o::get_crit(const uint32_t& id) case 79: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_release_cmd_ies_o::value_c pdu_session_res_release_cmd_ies_o::get_value(const uint32_t& id) { @@ -32465,7 +32308,7 @@ pdu_session_res_release_cmd_ies_o::value_c pdu_session_res_release_cmd_ies_o::ge ret.set(value_c::types::pdu_session_res_to_release_list_rel_cmd); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -32483,9 +32326,9 @@ presence_e pdu_session_res_release_cmd_ies_o::get_presence(const uint32_t& id) case 79: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -32651,8 +32494,8 @@ void pdu_session_res_release_cmd_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_to_release_list_rel_cmd: j.start_array("PDUSessionResourceToReleaseListRelCmd"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -32714,25 +32557,25 @@ SRSASN_CODE pdu_session_res_release_cmd_ies_o::value_c::unpack(cbit_ref& bref) std::string pdu_session_res_release_cmd_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "INTEGER (1..256)", - "OCTET STRING", - "PDUSessionResourceToReleaseListRelCmd"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "INTEGER (1..256)", + "OCTET STRING", + "PDUSessionResourceToReleaseListRelCmd"}; return convert_enum_idx(options, 5, value, "pdu_session_res_release_cmd_ies_o::value_c::types"); } // PDUSessionResourceReleaseResponseIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pdu_session_res_release_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 70, 121, 19}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {10, 85, 70, 121, 19}; + return map_enum_number(options, 5, idx, "id"); } bool pdu_session_res_release_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 70, 121, 19}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 70, 121, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -32752,9 +32595,9 @@ crit_e pdu_session_res_release_resp_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_release_resp_ies_o::value_c pdu_session_res_release_resp_ies_o::get_value(const uint32_t& id) { @@ -32776,7 +32619,7 @@ pdu_session_res_release_resp_ies_o::value_c pdu_session_res_release_resp_ies_o:: ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -32794,9 +32637,9 @@ presence_e pdu_session_res_release_resp_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -32960,8 +32803,8 @@ void pdu_session_res_release_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_released_list_rel_res: j.start_array("PDUSessionResourceReleasedListRelRes"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -33031,25 +32874,25 @@ SRSASN_CODE pdu_session_res_release_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string pdu_session_res_release_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PDUSessionResourceReleasedListRelRes", - "UserLocationInformation", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PDUSessionResourceReleasedListRelRes", + "UserLocationInformation", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 5, value, "pdu_session_res_release_resp_ies_o::value_c::types"); } // PDUSessionResourceSetupRequestIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pdu_session_res_setup_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 83, 38, 74, 110}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {10, 85, 83, 38, 74, 110}; + return map_enum_number(options, 6, idx, "id"); } bool pdu_session_res_setup_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 83, 38, 74, 110}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 83, 38, 74, 110}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -33071,9 +32914,9 @@ crit_e pdu_session_res_setup_request_ies_o::get_crit(const uint32_t& id) case 110: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_setup_request_ies_o::value_c pdu_session_res_setup_request_ies_o::get_value(const uint32_t& id) { @@ -33098,7 +32941,7 @@ pdu_session_res_setup_request_ies_o::value_c pdu_session_res_setup_request_ies_o ret.set(value_c::types::ue_aggregate_maximum_bit_rate); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -33118,9 +32961,9 @@ presence_e pdu_session_res_setup_request_ies_o::get_presence(const uint32_t& id) case 110: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -33308,8 +33151,8 @@ void pdu_session_res_setup_request_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_setup_list_su_req: j.start_array("PDUSessionResourceSetupListSUReq"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -33381,26 +33224,26 @@ SRSASN_CODE pdu_session_res_setup_request_ies_o::value_c::unpack(cbit_ref& bref) std::string pdu_session_res_setup_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "INTEGER (1..256)", - "OCTET STRING", - "PDUSessionResourceSetupListSUReq", - "UEAggregateMaximumBitRate"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "INTEGER (1..256)", + "OCTET STRING", + "PDUSessionResourceSetupListSUReq", + "UEAggregateMaximumBitRate"}; return convert_enum_idx(options, 6, value, "pdu_session_res_setup_request_ies_o::value_c::types"); } // PDUSessionResourceSetupResponseIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pdu_session_res_setup_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 75, 58, 19}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {10, 85, 75, 58, 19}; + return map_enum_number(options, 5, idx, "id"); } bool pdu_session_res_setup_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 75, 58, 19}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 75, 58, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -33420,9 +33263,9 @@ crit_e pdu_session_res_setup_resp_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pdu_session_res_setup_resp_ies_o::value_c pdu_session_res_setup_resp_ies_o::get_value(const uint32_t& id) { @@ -33444,7 +33287,7 @@ pdu_session_res_setup_resp_ies_o::value_c pdu_session_res_setup_resp_ies_o::get_ ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -33462,9 +33305,9 @@ presence_e pdu_session_res_setup_resp_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -33629,15 +33472,15 @@ void pdu_session_res_setup_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_setup_list_su_res: j.start_array("PDUSessionResourceSetupListSURes"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::pdu_session_res_failed_to_setup_list_su_res: j.start_array("PDUSessionResourceFailedToSetupListSURes"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -33703,25 +33546,25 @@ SRSASN_CODE pdu_session_res_setup_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string pdu_session_res_setup_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PDUSessionResourceSetupListSURes", - "PDUSessionResourceFailedToSetupListSURes", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PDUSessionResourceSetupListSURes", + "PDUSessionResourceFailedToSetupListSURes", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 5, value, "pdu_session_res_setup_resp_ies_o::value_c::types"); } // PWSCancelRequestIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pws_cancel_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {35, 95, 122, 14}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {35, 95, 122, 14}; + return map_enum_number(options, 4, idx, "id"); } bool pws_cancel_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {35, 95, 122, 14}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {35, 95, 122, 14}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -33739,9 +33582,9 @@ crit_e pws_cancel_request_ies_o::get_crit(const uint32_t& id) case 14: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pws_cancel_request_ies_o::value_c pws_cancel_request_ies_o::get_value(const uint32_t& id) { @@ -33760,7 +33603,7 @@ pws_cancel_request_ies_o::value_c pws_cancel_request_ies_o::get_value(const uint ret.set(value_c::types::cancel_all_warning_msgs); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -33776,9 +33619,9 @@ presence_e pws_cancel_request_ies_o::get_presence(const uint32_t& id) case 14: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -33979,21 +33822,21 @@ SRSASN_CODE pws_cancel_request_ies_o::value_c::unpack(cbit_ref& bref) std::string pws_cancel_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"BIT STRING", "BIT STRING", "WarningAreaList", "CancelAllWarningMessages"}; + static const char* options[] = {"BIT STRING", "BIT STRING", "WarningAreaList", "CancelAllWarningMessages"}; return convert_enum_idx(options, 4, value, "pws_cancel_request_ies_o::value_c::types"); } // PWSCancelResponseIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pws_cancel_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {35, 95, 12, 19}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {35, 95, 12, 19}; + return map_enum_number(options, 4, idx, "id"); } bool pws_cancel_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {35, 95, 12, 19}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {35, 95, 12, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -34011,9 +33854,9 @@ crit_e pws_cancel_resp_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pws_cancel_resp_ies_o::value_c pws_cancel_resp_ies_o::get_value(const uint32_t& id) { @@ -34032,7 +33875,7 @@ pws_cancel_resp_ies_o::value_c pws_cancel_resp_ies_o::get_value(const uint32_t& ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -34048,9 +33891,9 @@ presence_e pws_cancel_resp_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -34255,22 +34098,21 @@ SRSASN_CODE pws_cancel_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string pws_cancel_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "BIT STRING", "BIT STRING", "BroadcastCancelledAreaList", "CriticalityDiagnostics"}; + static const char* options[] = {"BIT STRING", "BIT STRING", "BroadcastCancelledAreaList", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "pws_cancel_resp_ies_o::value_c::types"); } // PWSFailureIndicationIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pws_fail_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {81, 27}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {81, 27}; + return map_enum_number(options, 2, idx, "id"); } bool pws_fail_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {81, 27}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {81, 27}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -34284,9 +34126,9 @@ crit_e pws_fail_ind_ies_o::get_crit(const uint32_t& id) case 27: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pws_fail_ind_ies_o::value_c pws_fail_ind_ies_o::get_value(const uint32_t& id) { @@ -34299,7 +34141,7 @@ pws_fail_ind_ies_o::value_c pws_fail_ind_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::global_ran_node_id); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -34311,9 +34153,9 @@ presence_e pws_fail_ind_ies_o::get_presence(const uint32_t& id) case 27: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -34456,21 +34298,21 @@ SRSASN_CODE pws_fail_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string pws_fail_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"PWSFailedCellIDList", "GlobalRANNodeID"}; + static const char* options[] = {"PWSFailedCellIDList", "GlobalRANNodeID"}; return convert_enum_idx(options, 2, value, "pws_fail_ind_ies_o::value_c::types"); } // PWSRestartIndicationIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t pws_restart_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {16, 27, 104, 23}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {16, 27, 104, 23}; + return map_enum_number(options, 4, idx, "id"); } bool pws_restart_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {16, 27, 104, 23}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {16, 27, 104, 23}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -34488,9 +34330,9 @@ crit_e pws_restart_ind_ies_o::get_crit(const uint32_t& id) case 23: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pws_restart_ind_ies_o::value_c pws_restart_ind_ies_o::get_value(const uint32_t& id) { @@ -34509,7 +34351,7 @@ pws_restart_ind_ies_o::value_c pws_restart_ind_ies_o::get_value(const uint32_t& ret.set(value_c::types::emergency_area_id_list_for_restart); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -34525,9 +34367,9 @@ presence_e pws_restart_ind_ies_o::get_presence(const uint32_t& id) case 23: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -34676,15 +34518,15 @@ void pws_restart_ind_ies_o::value_c::to_json(json_writer& j) const break; case types::tai_list_for_restart: j.start_array("TAIListForRestart"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::emergency_area_id_list_for_restart: j.start_array("EmergencyAreaIDListForRestart"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -34740,7 +34582,7 @@ SRSASN_CODE pws_restart_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string pws_restart_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "CellIDListForRestart", "GlobalRANNodeID", "TAIListForRestart", "EmergencyAreaIDListForRestart"}; return convert_enum_idx(options, 4, value, "pws_restart_ind_ies_o::value_c::types"); } @@ -34748,14 +34590,14 @@ std::string pws_restart_ind_ies_o::value_c::types_opts::to_string() const // PagingIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t paging_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {115, 50, 103, 52, 118, 51, 11}; - return convert_enum_idx(options, 7, idx, "id"); + static const uint32_t options[] = {115, 50, 103, 52, 118, 51, 11}; + return map_enum_number(options, 7, idx, "id"); } bool paging_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {115, 50, 103, 52, 118, 51, 11}; - for (uint32_t i = 0; i < 7; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {115, 50, 103, 52, 118, 51, 11}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -34779,9 +34621,9 @@ crit_e paging_ies_o::get_crit(const uint32_t& id) case 11: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } paging_ies_o::value_c paging_ies_o::get_value(const uint32_t& id) { @@ -34809,7 +34651,7 @@ paging_ies_o::value_c paging_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::assist_data_for_paging); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -34831,9 +34673,9 @@ presence_e paging_ies_o::get_presence(const uint32_t& id) case 11: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -35035,8 +34877,8 @@ void paging_ies_o::value_c::to_json(json_writer& j) const break; case types::tai_list_for_paging: j.start_array("TAIListForPaging"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -35124,27 +34966,27 @@ SRSASN_CODE paging_ies_o::value_c::unpack(cbit_ref& bref) std::string paging_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"UEPagingIdentity", - "PagingDRX", - "TAIListForPaging", - "PagingPriority", - "UERadioCapabilityForPaging", - "PagingOrigin", - "AssistanceDataForPaging"}; + static const char* options[] = {"UEPagingIdentity", + "PagingDRX", + "TAIListForPaging", + "PagingPriority", + "UERadioCapabilityForPaging", + "PagingOrigin", + "AssistanceDataForPaging"}; return convert_enum_idx(options, 7, value, "paging_ies_o::value_c::types"); } // PathSwitchRequestAcknowledgeIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t path_switch_request_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 119, 93, 41, 77, 68, 0, 18, 91, 19, 146}; - return convert_enum_idx(options, 12, idx, "id"); + static const uint32_t options[] = {10, 85, 119, 93, 41, 77, 68, 0, 18, 91, 19, 146}; + return map_enum_number(options, 12, idx, "id"); } bool path_switch_request_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 119, 93, 41, 77, 68, 0, 18, 91, 19, 146}; - for (uint32_t i = 0; i < 12; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 119, 93, 41, 77, 68, 0, 18, 91, 19, 146}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -35178,9 +35020,9 @@ crit_e path_switch_request_ack_ies_o::get_crit(const uint32_t& id) case 146: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } path_switch_request_ack_ies_o::value_c path_switch_request_ack_ies_o::get_value(const uint32_t& id) { @@ -35223,7 +35065,7 @@ path_switch_request_ack_ies_o::value_c path_switch_request_ack_ies_o::get_value( ret.set(value_c::types::redirection_voice_fallback); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -35255,9 +35097,9 @@ presence_e path_switch_request_ack_ies_o::get_presence(const uint32_t& id) case 146: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -35575,22 +35417,22 @@ void path_switch_request_ack_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_switched_list: j.start_array("PDUSessionResourceSwitchedList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::pdu_session_res_released_list_ps_ack: j.start_array("PDUSessionResourceReleasedListPSAck"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::allowed_nssai: j.start_array("AllowedNSSAI"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -35708,32 +35550,32 @@ SRSASN_CODE path_switch_request_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string path_switch_request_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "UESecurityCapabilities", - "SecurityContext", - "NewSecurityContextInd", - "PDUSessionResourceSwitchedList", - "PDUSessionResourceReleasedListPSAck", - "AllowedNSSAI", - "CoreNetworkAssistanceInformation", - "RRCInactiveTransitionReportRequest", - "CriticalityDiagnostics", - "RedirectionVoiceFallback"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "UESecurityCapabilities", + "SecurityContext", + "NewSecurityContextInd", + "PDUSessionResourceSwitchedList", + "PDUSessionResourceReleasedListPSAck", + "AllowedNSSAI", + "CoreNetworkAssistanceInformation", + "RRCInactiveTransitionReportRequest", + "CriticalityDiagnostics", + "RedirectionVoiceFallback"}; return convert_enum_idx(options, 12, value, "path_switch_request_ack_ies_o::value_c::types"); } // PathSwitchRequestFailureIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t path_switch_request_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 69, 19}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 69, 19}; + return map_enum_number(options, 4, idx, "id"); } bool path_switch_request_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 69, 19}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 69, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -35751,9 +35593,9 @@ crit_e path_switch_request_fail_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } path_switch_request_fail_ies_o::value_c path_switch_request_fail_ies_o::get_value(const uint32_t& id) { @@ -35772,7 +35614,7 @@ path_switch_request_fail_ies_o::value_c path_switch_request_fail_ies_o::get_valu ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -35788,9 +35630,9 @@ presence_e path_switch_request_fail_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -35932,8 +35774,8 @@ void path_switch_request_fail_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_released_list_ps_fail: j.start_array("PDUSessionResourceReleasedListPSFail"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -35993,24 +35835,24 @@ SRSASN_CODE path_switch_request_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string path_switch_request_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PDUSessionResourceReleasedListPSFail", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PDUSessionResourceReleasedListPSFail", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "path_switch_request_fail_ies_o::value_c::types"); } // PathSwitchRequestIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t path_switch_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {85, 100, 121, 119, 76, 57}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {85, 100, 121, 119, 76, 57}; + return map_enum_number(options, 6, idx, "id"); } bool path_switch_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {85, 100, 121, 119, 76, 57}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {85, 100, 121, 119, 76, 57}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -36032,9 +35874,9 @@ crit_e path_switch_request_ies_o::get_crit(const uint32_t& id) case 57: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } path_switch_request_ies_o::value_c path_switch_request_ies_o::get_value(const uint32_t& id) { @@ -36059,7 +35901,7 @@ path_switch_request_ies_o::value_c path_switch_request_ies_o::get_value(const ui ret.set(value_c::types::pdu_session_res_failed_to_setup_list_ps_req); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -36079,9 +35921,9 @@ presence_e path_switch_request_ies_o::get_presence(const uint32_t& id) case 57: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -36276,15 +36118,15 @@ void path_switch_request_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_to_be_switched_dl_list: j.start_array("PDUSessionResourceToBeSwitchedDLList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::pdu_session_res_failed_to_setup_list_ps_req: j.start_array("PDUSessionResourceFailedToSetupListPSReq"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -36352,12 +36194,12 @@ SRSASN_CODE path_switch_request_ies_o::value_c::unpack(cbit_ref& bref) std::string path_switch_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..1099511627775)", - "UserLocationInformation", - "UESecurityCapabilities", - "PDUSessionResourceToBeSwitchedDLList", - "PDUSessionResourceFailedToSetupListPSReq"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..1099511627775)", + "UserLocationInformation", + "UESecurityCapabilities", + "PDUSessionResourceToBeSwitchedDLList", + "PDUSessionResourceFailedToSetupListPSReq"}; return convert_enum_idx(options, 6, value, "path_switch_request_ies_o::value_c::types"); } @@ -36380,56 +36222,43 @@ SRSASN_CODE ngap_private_ies_empty_o::value_c::unpack(cbit_ref& bref) std::string ngap_private_ies_empty_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {}; + static const char* options[] = {}; return convert_enum_idx(options, 0, value, "ngap_private_ies_empty_o::value_c::types"); } // RANConfigurationUpdateAcknowledgeIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ran_cfg_upd_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {19}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {19}; + return map_enum_number(options, 1, idx, "id"); } bool ran_cfg_upd_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {19}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 19 == id; } crit_e ran_cfg_upd_ack_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 19: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 19) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } ran_cfg_upd_ack_ies_o::value_c ran_cfg_upd_ack_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 19: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 19) { + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } presence_e ran_cfg_upd_ack_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 19: - return presence_e::optional; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 19) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -36455,21 +36284,21 @@ SRSASN_CODE ran_cfg_upd_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string ran_cfg_upd_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"CriticalityDiagnostics"}; + static const char* options[] = {"CriticalityDiagnostics"}; return convert_enum_idx(options, 1, value, "ran_cfg_upd_ack_ies_o::value_c::types"); } // RANConfigurationUpdateFailureIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ran_cfg_upd_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {15, 107, 19}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {15, 107, 19}; + return map_enum_number(options, 3, idx, "id"); } bool ran_cfg_upd_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {15, 107, 19}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {15, 107, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -36485,9 +36314,9 @@ crit_e ran_cfg_upd_fail_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ran_cfg_upd_fail_ies_o::value_c ran_cfg_upd_fail_ies_o::get_value(const uint32_t& id) { @@ -36503,7 +36332,7 @@ ran_cfg_upd_fail_ies_o::value_c ran_cfg_upd_fail_ies_o::get_value(const uint32_t ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -36517,9 +36346,9 @@ presence_e ran_cfg_upd_fail_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -36690,21 +36519,21 @@ SRSASN_CODE ran_cfg_upd_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string ran_cfg_upd_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; + static const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "ran_cfg_upd_fail_ies_o::value_c::types"); } // RANConfigurationUpdateIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ran_cfg_upd_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {82, 102, 21, 27}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {82, 102, 21, 27}; + return map_enum_number(options, 4, idx, "id"); } bool ran_cfg_upd_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {82, 102, 21, 27}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {82, 102, 21, 27}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -36722,9 +36551,9 @@ crit_e ran_cfg_upd_ies_o::get_crit(const uint32_t& id) case 27: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ran_cfg_upd_ies_o::value_c ran_cfg_upd_ies_o::get_value(const uint32_t& id) { @@ -36743,7 +36572,7 @@ ran_cfg_upd_ies_o::value_c ran_cfg_upd_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::global_ran_node_id); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -36759,9 +36588,9 @@ presence_e ran_cfg_upd_ies_o::get_presence(const uint32_t& id) case 27: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -36901,8 +36730,8 @@ void ran_cfg_upd_ies_o::value_c::to_json(json_writer& j) const break; case types::supported_ta_list: j.start_array("SupportedTAList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -36965,21 +36794,21 @@ SRSASN_CODE ran_cfg_upd_ies_o::value_c::unpack(cbit_ref& bref) std::string ran_cfg_upd_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"PrintableString", "SupportedTAList", "PagingDRX", "GlobalRANNodeID"}; + static const char* options[] = {"PrintableString", "SupportedTAList", "PagingDRX", "GlobalRANNodeID"}; return convert_enum_idx(options, 4, value, "ran_cfg_upd_ies_o::value_c::types"); } // RRCInactiveTransitionReportIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t rrc_inactive_transition_report_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 92, 121}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 92, 121}; + return map_enum_number(options, 4, idx, "id"); } bool rrc_inactive_transition_report_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 92, 121}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 92, 121}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -36997,9 +36826,9 @@ crit_e rrc_inactive_transition_report_ies_o::get_crit(const uint32_t& id) case 121: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } rrc_inactive_transition_report_ies_o::value_c rrc_inactive_transition_report_ies_o::get_value(const uint32_t& id) { @@ -37018,7 +36847,7 @@ rrc_inactive_transition_report_ies_o::value_c rrc_inactive_transition_report_ies ret.set(value_c::types::user_location_info); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -37034,9 +36863,9 @@ presence_e rrc_inactive_transition_report_ies_o::get_presence(const uint32_t& id case 121: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -37229,7 +37058,7 @@ SRSASN_CODE rrc_inactive_transition_report_ies_o::value_c::unpack(cbit_ref& bref std::string rrc_inactive_transition_report_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "RRCState", "UserLocationInformation"}; return convert_enum_idx(options, 4, value, "rrc_inactive_transition_report_ies_o::value_c::types"); } @@ -37237,14 +37066,14 @@ std::string rrc_inactive_transition_report_ies_o::value_c::types_opts::to_string // RerouteNASRequest-IEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t reroute_nas_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {85, 10, 42, 3, 0}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {85, 10, 42, 3, 0}; + return map_enum_number(options, 5, idx, "id"); } bool reroute_nas_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {85, 10, 42, 3, 0}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {85, 10, 42, 3, 0}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -37264,9 +37093,9 @@ crit_e reroute_nas_request_ies_o::get_crit(const uint32_t& id) case 0: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } reroute_nas_request_ies_o::value_c reroute_nas_request_ies_o::get_value(const uint32_t& id) { @@ -37288,7 +37117,7 @@ reroute_nas_request_ies_o::value_c reroute_nas_request_ies_o::get_value(const ui ret.set(value_c::types::allowed_nssai); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -37306,9 +37135,9 @@ presence_e reroute_nas_request_ies_o::get_presence(const uint32_t& id) case 0: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -37476,8 +37305,8 @@ void reroute_nas_request_ies_o::value_c::to_json(json_writer& j) const break; case types::allowed_nssai: j.start_array("AllowedNSSAI"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -37539,7 +37368,7 @@ SRSASN_CODE reroute_nas_request_ies_o::value_c::unpack(cbit_ref& bref) std::string reroute_nas_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..1099511627775)", "OCTET STRING", "BIT STRING", "AllowedNSSAI"}; return convert_enum_idx(options, 5, value, "reroute_nas_request_ies_o::value_c::types"); } @@ -37547,14 +37376,14 @@ std::string reroute_nas_request_ies_o::value_c::types_opts::to_string() const // SecondaryRATDataUsageReportIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t secondary_rat_data_usage_report_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 142, 143}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 142, 143}; + return map_enum_number(options, 4, idx, "id"); } bool secondary_rat_data_usage_report_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 142, 143}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 142, 143}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -37572,9 +37401,9 @@ crit_e secondary_rat_data_usage_report_ies_o::get_crit(const uint32_t& id) case 143: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } secondary_rat_data_usage_report_ies_o::value_c secondary_rat_data_usage_report_ies_o::get_value(const uint32_t& id) { @@ -37593,7 +37422,7 @@ secondary_rat_data_usage_report_ies_o::value_c secondary_rat_data_usage_report_i ret.set(value_c::types::ho_flag); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -37609,9 +37438,9 @@ presence_e secondary_rat_data_usage_report_ies_o::get_presence(const uint32_t& i case 143: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -37749,8 +37578,8 @@ void secondary_rat_data_usage_report_ies_o::value_c::to_json(json_writer& j) con break; case types::pdu_session_res_secondary_ratusage_list: j.start_array("PDUSessionResourceSecondaryRATUsageList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -37809,24 +37638,24 @@ SRSASN_CODE secondary_rat_data_usage_report_ies_o::value_c::unpack(cbit_ref& bre std::string secondary_rat_data_usage_report_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "PDUSessionResourceSecondaryRATUsageList", - "HandoverFlag"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "PDUSessionResourceSecondaryRATUsageList", + "HandoverFlag"}; return convert_enum_idx(options, 4, value, "secondary_rat_data_usage_report_ies_o::value_c::types"); } // TraceFailureIndicationIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t trace_fail_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 44, 15}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 44, 15}; + return map_enum_number(options, 4, idx, "id"); } bool trace_fail_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 44, 15}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 44, 15}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -37844,9 +37673,9 @@ crit_e trace_fail_ind_ies_o::get_crit(const uint32_t& id) case 15: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } trace_fail_ind_ies_o::value_c trace_fail_ind_ies_o::get_value(const uint32_t& id) { @@ -37865,7 +37694,7 @@ trace_fail_ind_ies_o::value_c trace_fail_ind_ies_o::get_value(const uint32_t& id ret.set(value_c::types::cause); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -37881,9 +37710,9 @@ presence_e trace_fail_ind_ies_o::get_presence(const uint32_t& id) case 15: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -38079,22 +37908,21 @@ SRSASN_CODE trace_fail_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string trace_fail_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING", "Cause"}; + static const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING", "Cause"}; return convert_enum_idx(options, 4, value, "trace_fail_ind_ies_o::value_c::types"); } // TraceStartIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t trace_start_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 108}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 85, 108}; + return map_enum_number(options, 3, idx, "id"); } bool trace_start_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 108}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 108}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -38110,9 +37938,9 @@ crit_e trace_start_ies_o::get_crit(const uint32_t& id) case 108: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } trace_start_ies_o::value_c trace_start_ies_o::get_value(const uint32_t& id) { @@ -38128,7 +37956,7 @@ trace_start_ies_o::value_c trace_start_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::trace_activation); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -38142,9 +37970,9 @@ presence_e trace_start_ies_o::get_presence(const uint32_t& id) case 108: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -38309,21 +38137,21 @@ SRSASN_CODE trace_start_ies_o::value_c::unpack(cbit_ref& bref) std::string trace_start_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "TraceActivation"}; + static const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "TraceActivation"}; return convert_enum_idx(options, 3, value, "trace_start_ies_o::value_c::types"); } // UEContextModificationFailureIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ue_context_mod_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 15, 19}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 15, 19}; + return map_enum_number(options, 4, idx, "id"); } bool ue_context_mod_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 15, 19}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 15, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -38341,9 +38169,9 @@ crit_e ue_context_mod_fail_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_mod_fail_ies_o::value_c ue_context_mod_fail_ies_o::get_value(const uint32_t& id) { @@ -38362,7 +38190,7 @@ ue_context_mod_fail_ies_o::value_c ue_context_mod_fail_ies_o::get_value(const ui ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -38378,9 +38206,9 @@ presence_e ue_context_mod_fail_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -38578,7 +38406,7 @@ SRSASN_CODE ue_context_mod_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_mod_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "Cause", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "ue_context_mod_fail_ies_o::value_c::types"); } @@ -38586,14 +38414,14 @@ std::string ue_context_mod_fail_ies_o::value_c::types_opts::to_string() const // UEContextModificationRequestIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ue_context_mod_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 83, 94, 31, 110, 119, 18, 24, 40, 91}; - return convert_enum_idx(options, 11, idx, "id"); + static const uint32_t options[] = {10, 85, 83, 94, 31, 110, 119, 18, 24, 40, 91}; + return map_enum_number(options, 11, idx, "id"); } bool ue_context_mod_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 83, 94, 31, 110, 119, 18, 24, 40, 91}; - for (uint32_t i = 0; i < 11; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 83, 94, 31, 110, 119, 18, 24, 40, 91}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -38625,9 +38453,9 @@ crit_e ue_context_mod_request_ies_o::get_crit(const uint32_t& id) case 91: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_mod_request_ies_o::value_c ue_context_mod_request_ies_o::get_value(const uint32_t& id) { @@ -38667,7 +38495,7 @@ ue_context_mod_request_ies_o::value_c ue_context_mod_request_ies_o::get_value(co ret.set(value_c::types::rrc_inactive_transition_report_request); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -38697,9 +38525,9 @@ presence_e ue_context_mod_request_ies_o::get_presence(const uint32_t& id) case 91: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -39102,31 +38930,31 @@ SRSASN_CODE ue_context_mod_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_mod_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "INTEGER (1..256)", - "BIT STRING", - "INTEGER (1..256,...)", - "UEAggregateMaximumBitRate", - "UESecurityCapabilities", - "CoreNetworkAssistanceInformation", - "EmergencyFallbackIndicator", - "INTEGER (0..1099511627775)", - "RRCInactiveTransitionReportRequest"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "INTEGER (1..256)", + "BIT STRING", + "INTEGER (1..256,...)", + "UEAggregateMaximumBitRate", + "UESecurityCapabilities", + "CoreNetworkAssistanceInformation", + "EmergencyFallbackIndicator", + "INTEGER (0..1099511627775)", + "RRCInactiveTransitionReportRequest"}; return convert_enum_idx(options, 11, value, "ue_context_mod_request_ies_o::value_c::types"); } // UEContextModificationResponseIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ue_context_mod_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 92, 121, 19}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {10, 85, 92, 121, 19}; + return map_enum_number(options, 5, idx, "id"); } bool ue_context_mod_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 92, 121, 19}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 92, 121, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -39146,9 +38974,9 @@ crit_e ue_context_mod_resp_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_mod_resp_ies_o::value_c ue_context_mod_resp_ies_o::get_value(const uint32_t& id) { @@ -39170,7 +38998,7 @@ ue_context_mod_resp_ies_o::value_c ue_context_mod_resp_ies_o::get_value(const ui ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -39188,9 +39016,9 @@ presence_e ue_context_mod_resp_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -39415,25 +39243,25 @@ SRSASN_CODE ue_context_mod_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_mod_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "RRCState", - "UserLocationInformation", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "RRCState", + "UserLocationInformation", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 5, value, "ue_context_mod_resp_ies_o::value_c::types"); } // UEContextReleaseCommand-IEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ue_context_release_cmd_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {114, 15}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {114, 15}; + return map_enum_number(options, 2, idx, "id"); } bool ue_context_release_cmd_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {114, 15}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {114, 15}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -39447,9 +39275,9 @@ crit_e ue_context_release_cmd_ies_o::get_crit(const uint32_t& id) case 15: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_release_cmd_ies_o::value_c ue_context_release_cmd_ies_o::get_value(const uint32_t& id) { @@ -39462,7 +39290,7 @@ ue_context_release_cmd_ies_o::value_c ue_context_release_cmd_ies_o::get_value(co ret.set(value_c::types::cause); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -39474,9 +39302,9 @@ presence_e ue_context_release_cmd_ies_o::get_presence(const uint32_t& id) case 15: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -39620,21 +39448,21 @@ SRSASN_CODE ue_context_release_cmd_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_release_cmd_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"UE-NGAP-IDs", "Cause"}; + static const char* options[] = {"UE-NGAP-IDs", "Cause"}; return convert_enum_idx(options, 2, value, "ue_context_release_cmd_ies_o::value_c::types"); } // UEContextReleaseComplete-IEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ue_context_release_complete_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 121, 32, 60, 19}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {10, 85, 121, 32, 60, 19}; + return map_enum_number(options, 6, idx, "id"); } bool ue_context_release_complete_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 121, 32, 60, 19}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 121, 32, 60, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -39656,9 +39484,9 @@ crit_e ue_context_release_complete_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_release_complete_ies_o::value_c ue_context_release_complete_ies_o::get_value(const uint32_t& id) { @@ -39683,7 +39511,7 @@ ue_context_release_complete_ies_o::value_c ue_context_release_complete_ies_o::ge ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -39703,9 +39531,9 @@ presence_e ue_context_release_complete_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -39900,8 +39728,8 @@ void ue_context_release_complete_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_list_cxt_rel_cpl: j.start_array("PDUSessionResourceListCxtRelCpl"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -39973,26 +39801,26 @@ SRSASN_CODE ue_context_release_complete_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_release_complete_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", - "INTEGER (0..4294967295)", - "UserLocationInformation", - "InfoOnRecommendedCellsAndRANNodesForPaging", - "PDUSessionResourceListCxtRelCpl", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..1099511627775)", + "INTEGER (0..4294967295)", + "UserLocationInformation", + "InfoOnRecommendedCellsAndRANNodesForPaging", + "PDUSessionResourceListCxtRelCpl", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 6, value, "ue_context_release_complete_ies_o::value_c::types"); } // UEContextReleaseRequest-IEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ue_context_release_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 133, 15}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 133, 15}; + return map_enum_number(options, 4, idx, "id"); } bool ue_context_release_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 133, 15}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 133, 15}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -40010,9 +39838,9 @@ crit_e ue_context_release_request_ies_o::get_crit(const uint32_t& id) case 15: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_release_request_ies_o::value_c ue_context_release_request_ies_o::get_value(const uint32_t& id) { @@ -40031,7 +39859,7 @@ ue_context_release_request_ies_o::value_c ue_context_release_request_ies_o::get_ ret.set(value_c::types::cause); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -40047,9 +39875,9 @@ presence_e ue_context_release_request_ies_o::get_presence(const uint32_t& id) case 15: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -40190,8 +40018,8 @@ void ue_context_release_request_ies_o::value_c::to_json(json_writer& j) const break; case types::pdu_session_res_list_cxt_rel_req: j.start_array("PDUSessionResourceListCxtRelReq"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -40251,7 +40079,7 @@ SRSASN_CODE ue_context_release_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_release_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "PDUSessionResourceListCxtRelReq", "Cause"}; return convert_enum_idx(options, 4, value, "ue_context_release_request_ies_o::value_c::types"); } @@ -40259,14 +40087,14 @@ std::string ue_context_release_request_ies_o::value_c::types_opts::to_string() c // UERadioCapabilityCheckRequestIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ue_radio_cap_check_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 117}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 85, 117}; + return map_enum_number(options, 3, idx, "id"); } bool ue_radio_cap_check_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 117}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 117}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -40282,9 +40110,9 @@ crit_e ue_radio_cap_check_request_ies_o::get_crit(const uint32_t& id) case 117: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_radio_cap_check_request_ies_o::value_c ue_radio_cap_check_request_ies_o::get_value(const uint32_t& id) { @@ -40300,7 +40128,7 @@ ue_radio_cap_check_request_ies_o::value_c ue_radio_cap_check_request_ies_o::get_ ret.set(value_c::types::ue_radio_cap); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -40314,9 +40142,9 @@ presence_e ue_radio_cap_check_request_ies_o::get_presence(const uint32_t& id) case 117: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -40481,21 +40309,21 @@ SRSASN_CODE ue_radio_cap_check_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_radio_cap_check_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING"}; + static const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING"}; return convert_enum_idx(options, 3, value, "ue_radio_cap_check_request_ies_o::value_c::types"); } // UERadioCapabilityCheckResponseIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ue_radio_cap_check_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 30, 19}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 30, 19}; + return map_enum_number(options, 4, idx, "id"); } bool ue_radio_cap_check_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 30, 19}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 30, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -40513,9 +40341,9 @@ crit_e ue_radio_cap_check_resp_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_radio_cap_check_resp_ies_o::value_c ue_radio_cap_check_resp_ies_o::get_value(const uint32_t& id) { @@ -40534,7 +40362,7 @@ ue_radio_cap_check_resp_ies_o::value_c ue_radio_cap_check_resp_ies_o::get_value( ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -40550,9 +40378,9 @@ presence_e ue_radio_cap_check_resp_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -40745,7 +40573,7 @@ SRSASN_CODE ue_radio_cap_check_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_radio_cap_check_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "IMSVoiceSupportIndicator", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "ue_radio_cap_check_resp_ies_o::value_c::types"); } @@ -40753,14 +40581,14 @@ std::string ue_radio_cap_check_resp_ies_o::value_c::types_opts::to_string() cons // UERadioCapabilityInfoIndicationIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ue_radio_cap_info_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 117, 118}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 117, 118}; + return map_enum_number(options, 4, idx, "id"); } bool ue_radio_cap_info_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 117, 118}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 117, 118}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -40778,9 +40606,9 @@ crit_e ue_radio_cap_info_ind_ies_o::get_crit(const uint32_t& id) case 118: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_radio_cap_info_ind_ies_o::value_c ue_radio_cap_info_ind_ies_o::get_value(const uint32_t& id) { @@ -40799,7 +40627,7 @@ ue_radio_cap_info_ind_ies_o::value_c ue_radio_cap_info_ind_ies_o::get_value(cons ret.set(value_c::types::ue_radio_cap_for_paging); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -40815,9 +40643,9 @@ presence_e ue_radio_cap_info_ind_ies_o::get_presence(const uint32_t& id) case 118: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -41014,7 +40842,7 @@ SRSASN_CODE ue_radio_cap_info_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_radio_cap_info_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING", "UERadioCapabilityForPaging"}; return convert_enum_idx(options, 4, value, "ue_radio_cap_info_ind_ies_o::value_c::types"); } @@ -41022,14 +40850,14 @@ std::string ue_radio_cap_info_ind_ies_o::value_c::types_opts::to_string() const // UETNLABindingReleaseRequestIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t uetnla_binding_release_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {10, 85}; + return map_enum_number(options, 2, idx, "id"); } bool uetnla_binding_release_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -41043,9 +40871,9 @@ crit_e uetnla_binding_release_request_ies_o::get_crit(const uint32_t& id) case 85: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } uetnla_binding_release_request_ies_o::value_c uetnla_binding_release_request_ies_o::get_value(const uint32_t& id) { @@ -41058,7 +40886,7 @@ uetnla_binding_release_request_ies_o::value_c uetnla_binding_release_request_ies ret.set(value_c::types::ran_ue_ngap_id); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -41070,9 +40898,9 @@ presence_e uetnla_binding_release_request_ies_o::get_presence(const uint32_t& id case 85: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -41190,21 +41018,21 @@ SRSASN_CODE uetnla_binding_release_request_ies_o::value_c::unpack(cbit_ref& bref std::string uetnla_binding_release_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)"}; + static const char* options[] = {"INTEGER (0..1099511627775)", "INTEGER (0..4294967295)"}; return convert_enum_idx(options, 2, value, "uetnla_binding_release_request_ies_o::value_c::types"); } // UplinkNASTransport-IEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ul_nas_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 38, 121}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 38, 121}; + return map_enum_number(options, 4, idx, "id"); } bool ul_nas_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 38, 121}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 38, 121}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -41222,9 +41050,9 @@ crit_e ul_nas_transport_ies_o::get_crit(const uint32_t& id) case 121: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ul_nas_transport_ies_o::value_c ul_nas_transport_ies_o::get_value(const uint32_t& id) { @@ -41243,7 +41071,7 @@ ul_nas_transport_ies_o::value_c ul_nas_transport_ies_o::get_value(const uint32_t ret.set(value_c::types::user_location_info); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -41259,9 +41087,9 @@ presence_e ul_nas_transport_ies_o::get_presence(const uint32_t& id) case 121: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -41458,7 +41286,7 @@ SRSASN_CODE ul_nas_transport_ies_o::value_c::unpack(cbit_ref& bref) std::string ul_nas_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING", "UserLocationInformation"}; return convert_enum_idx(options, 4, value, "ul_nas_transport_ies_o::value_c::types"); } @@ -41466,14 +41294,14 @@ std::string ul_nas_transport_ies_o::value_c::types_opts::to_string() const // UplinkNonUEAssociatedNRPPaTransportIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ul_non_ueassociated_nrp_pa_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {89, 46}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {89, 46}; + return map_enum_number(options, 2, idx, "id"); } bool ul_non_ueassociated_nrp_pa_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {89, 46}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {89, 46}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -41487,9 +41315,9 @@ crit_e ul_non_ueassociated_nrp_pa_transport_ies_o::get_crit(const uint32_t& id) case 46: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ul_non_ueassociated_nrp_pa_transport_ies_o::value_c ul_non_ueassociated_nrp_pa_transport_ies_o::get_value(const uint32_t& id) @@ -41503,7 +41331,7 @@ ul_non_ueassociated_nrp_pa_transport_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::nrp_pa_pdu); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -41515,9 +41343,9 @@ presence_e ul_non_ueassociated_nrp_pa_transport_ies_o::get_presence(const uint32 case 46: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -41660,21 +41488,21 @@ SRSASN_CODE ul_non_ueassociated_nrp_pa_transport_ies_o::value_c::unpack(cbit_ref std::string ul_non_ueassociated_nrp_pa_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"OCTET STRING", "OCTET STRING"}; + static const char* options[] = {"OCTET STRING", "OCTET STRING"}; return convert_enum_idx(options, 2, value, "ul_non_ueassociated_nrp_pa_transport_ies_o::value_c::types"); } // UplinkRANConfigurationTransferIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ul_ran_cfg_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {99, 158}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {99, 158}; + return map_enum_number(options, 2, idx, "id"); } bool ul_ran_cfg_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {99, 158}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {99, 158}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -41688,9 +41516,9 @@ crit_e ul_ran_cfg_transfer_ies_o::get_crit(const uint32_t& id) case 158: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ul_ran_cfg_transfer_ies_o::value_c ul_ran_cfg_transfer_ies_o::get_value(const uint32_t& id) { @@ -41703,7 +41531,7 @@ ul_ran_cfg_transfer_ies_o::value_c ul_ran_cfg_transfer_ies_o::get_value(const ui ret.set(value_c::types::endc_son_cfg_transfer_ul); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -41715,9 +41543,9 @@ presence_e ul_ran_cfg_transfer_ies_o::get_presence(const uint32_t& id) case 158: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -41860,21 +41688,21 @@ SRSASN_CODE ul_ran_cfg_transfer_ies_o::value_c::unpack(cbit_ref& bref) std::string ul_ran_cfg_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"SONConfigurationTransfer", "OCTET STRING"}; + static const char* options[] = {"SONConfigurationTransfer", "OCTET STRING"}; return convert_enum_idx(options, 2, value, "ul_ran_cfg_transfer_ies_o::value_c::types"); } // UplinkRANStatusTransferIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ul_ran_status_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 84}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {10, 85, 84}; + return map_enum_number(options, 3, idx, "id"); } bool ul_ran_status_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 84}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 84}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -41890,9 +41718,9 @@ crit_e ul_ran_status_transfer_ies_o::get_crit(const uint32_t& id) case 84: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ul_ran_status_transfer_ies_o::value_c ul_ran_status_transfer_ies_o::get_value(const uint32_t& id) { @@ -41908,7 +41736,7 @@ ul_ran_status_transfer_ies_o::value_c ul_ran_status_transfer_ies_o::get_value(co ret.set(value_c::types::ran_status_transfer_transparent_container); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -41922,9 +41750,9 @@ presence_e ul_ran_status_transfer_ies_o::get_presence(const uint32_t& id) case 84: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -42092,7 +41920,7 @@ SRSASN_CODE ul_ran_status_transfer_ies_o::value_c::unpack(cbit_ref& bref) std::string ul_ran_status_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "RANStatusTransfer-TransparentContainer"}; return convert_enum_idx(options, 3, value, "ul_ran_status_transfer_ies_o::value_c::types"); } @@ -42100,14 +41928,14 @@ std::string ul_ran_status_transfer_ies_o::value_c::types_opts::to_string() const // UplinkUEAssociatedNRPPaTransportIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t ul_ueassociated_nrp_pa_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {10, 85, 89, 46}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {10, 85, 89, 46}; + return map_enum_number(options, 4, idx, "id"); } bool ul_ueassociated_nrp_pa_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {10, 85, 89, 46}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {10, 85, 89, 46}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -42125,9 +41953,9 @@ crit_e ul_ueassociated_nrp_pa_transport_ies_o::get_crit(const uint32_t& id) case 46: return crit_e::reject; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ul_ueassociated_nrp_pa_transport_ies_o::value_c ul_ueassociated_nrp_pa_transport_ies_o::get_value(const uint32_t& id) { @@ -42146,7 +41974,7 @@ ul_ueassociated_nrp_pa_transport_ies_o::value_c ul_ueassociated_nrp_pa_transport ret.set(value_c::types::nrp_pa_pdu); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -42162,9 +41990,9 @@ presence_e ul_ueassociated_nrp_pa_transport_ies_o::get_presence(const uint32_t& case 46: return presence_e::mandatory; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -42360,7 +42188,7 @@ SRSASN_CODE ul_ueassociated_nrp_pa_transport_ies_o::value_c::unpack(cbit_ref& br std::string ul_ueassociated_nrp_pa_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..1099511627775)", "INTEGER (0..4294967295)", "OCTET STRING", "OCTET STRING"}; return convert_enum_idx(options, 4, value, "ul_ueassociated_nrp_pa_transport_ies_o::value_c::types"); } @@ -42368,14 +42196,14 @@ std::string ul_ueassociated_nrp_pa_transport_ies_o::value_c::types_opts::to_stri // WriteReplaceWarningRequestIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t write_replace_warning_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {35, 95, 122, 87, 47, 125, 124, 20, 123, 17, 141}; - return convert_enum_idx(options, 11, idx, "id"); + static const uint32_t options[] = {35, 95, 122, 87, 47, 125, 124, 20, 123, 17, 141}; + return map_enum_number(options, 11, idx, "id"); } bool write_replace_warning_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {35, 95, 122, 87, 47, 125, 124, 20, 123, 17, 141}; - for (uint32_t i = 0; i < 11; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {35, 95, 122, 87, 47, 125, 124, 20, 123, 17, 141}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -42407,9 +42235,9 @@ crit_e write_replace_warning_request_ies_o::get_crit(const uint32_t& id) case 141: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } write_replace_warning_request_ies_o::value_c write_replace_warning_request_ies_o::get_value(const uint32_t& id) { @@ -42449,7 +42277,7 @@ write_replace_warning_request_ies_o::value_c write_replace_warning_request_ies_o ret.set(value_c::types::warning_area_coordinates); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -42479,9 +42307,9 @@ presence_e write_replace_warning_request_ies_o::get_presence(const uint32_t& id) case 141: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -42891,31 +42719,31 @@ SRSASN_CODE write_replace_warning_request_ies_o::value_c::unpack(cbit_ref& bref) std::string write_replace_warning_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"BIT STRING", - "BIT STRING", - "WarningAreaList", - "INTEGER (0..131071)", - "INTEGER (0..65535)", - "OCTET STRING", - "OCTET STRING", - "BIT STRING", - "OCTET STRING", - "ConcurrentWarningMessageInd", - "OCTET STRING"}; + static const char* options[] = {"BIT STRING", + "BIT STRING", + "WarningAreaList", + "INTEGER (0..131071)", + "INTEGER (0..65535)", + "OCTET STRING", + "OCTET STRING", + "BIT STRING", + "OCTET STRING", + "ConcurrentWarningMessageInd", + "OCTET STRING"}; return convert_enum_idx(options, 11, value, "write_replace_warning_request_ies_o::value_c::types"); } // WriteReplaceWarningResponseIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES uint32_t write_replace_warning_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {35, 95, 13, 19}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {35, 95, 13, 19}; + return map_enum_number(options, 4, idx, "id"); } bool write_replace_warning_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {35, 95, 13, 19}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {35, 95, 13, 19}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -42933,9 +42761,9 @@ crit_e write_replace_warning_resp_ies_o::get_crit(const uint32_t& id) case 19: return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } write_replace_warning_resp_ies_o::value_c write_replace_warning_resp_ies_o::get_value(const uint32_t& id) { @@ -42954,7 +42782,7 @@ write_replace_warning_resp_ies_o::value_c write_replace_warning_resp_ies_o::get_ ret.set(value_c::types::crit_diagnostics); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } return ret; } @@ -42970,9 +42798,9 @@ presence_e write_replace_warning_resp_ies_o::get_presence(const uint32_t& id) case 19: return presence_e::optional; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::NGAP_NR")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -43178,12 +43006,11 @@ SRSASN_CODE write_replace_warning_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string write_replace_warning_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "BIT STRING", "BIT STRING", "BroadcastCompletedAreaList", "CriticalityDiagnostics"}; + static const char* options[] = {"BIT STRING", "BIT STRING", "BroadcastCompletedAreaList", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "write_replace_warning_resp_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; location_report_ies_container::location_report_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -43262,12 +43089,13 @@ SRSASN_CODE location_report_ies_container::unpack(cbit_ref& bref) ps_cell_info.value = c.value.ps_cell_info(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -43317,7 +43145,7 @@ void location_report_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; location_report_ctrl_ies_container::location_report_ctrl_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -43366,12 +43194,13 @@ SRSASN_CODE location_report_ctrl_ies_container::unpack(cbit_ref& bref) location_report_request_type.value = c.value.location_report_request_type(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -43411,7 +43240,7 @@ void location_report_ctrl_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; location_report_fail_ind_ies_container::location_report_fail_ind_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -43460,12 +43289,13 @@ SRSASN_CODE location_report_fail_ind_ies_container::unpack(cbit_ref& bref) cause.value = c.value.cause(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -43505,7 +43335,7 @@ void location_report_fail_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; nas_non_delivery_ind_ies_container::nas_non_delivery_ind_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -43562,12 +43392,13 @@ SRSASN_CODE nas_non_delivery_ind_ies_container::unpack(cbit_ref& bref) cause.value = c.value.cause(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -43609,7 +43440,7 @@ void nas_non_delivery_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ng_reset_ies_container::ng_reset_ies_container() : cause(15, crit_e::ignore), reset_type(88, crit_e::reject) {} SRSASN_CODE ng_reset_ies_container::pack(bit_ref& bref) const @@ -43646,12 +43477,13 @@ SRSASN_CODE ng_reset_ies_container::unpack(cbit_ref& bref) reset_type.value = c.value.reset_type(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -43689,7 +43521,7 @@ void ng_reset_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ng_reset_ack_ies_container::ng_reset_ack_ies_container() : ue_associated_lc_ng_conn_list(111, crit_e::ignore), @@ -43734,7 +43566,7 @@ SRSASN_CODE ng_reset_ack_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -43778,7 +43610,7 @@ void ng_reset_ack_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ng_setup_fail_ies_container::ng_setup_fail_ies_container() : cause(15, crit_e::ignore), @@ -43833,12 +43665,13 @@ SRSASN_CODE ng_setup_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -43882,7 +43715,7 @@ void ng_setup_fail_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ng_setup_request_ies_container::ng_setup_request_ies_container() : global_ran_node_id(27, crit_e::reject), @@ -43953,12 +43786,13 @@ SRSASN_CODE ng_setup_request_ies_container::unpack(cbit_ref& bref) ue_retention_info.value = c.value.ue_retention_info(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -44006,7 +43840,7 @@ void ng_setup_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ng_setup_resp_ies_container::ng_setup_resp_ies_container() : amf_name(1, crit_e::reject), @@ -44085,12 +43919,13 @@ SRSASN_CODE ng_setup_resp_ies_container::unpack(cbit_ref& bref) ue_retention_info.value = c.value.ue_retention_info(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -44140,7 +43975,7 @@ void ng_setup_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; overload_start_ies_container::overload_start_ies_container() : amf_overload_resp(2, crit_e::reject), @@ -44196,7 +44031,7 @@ SRSASN_CODE overload_start_ies_container::unpack(cbit_ref& bref) overload_start_nssai_list.value = c.value.overload_start_nssai_list(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -44289,7 +44124,7 @@ void overload_stop_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pdu_session_res_modify_confirm_ies_container::pdu_session_res_modify_confirm_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -44360,12 +44195,13 @@ SRSASN_CODE pdu_session_res_modify_confirm_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -44413,7 +44249,7 @@ void pdu_session_res_modify_confirm_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pdu_session_res_modify_ind_ies_container::pdu_session_res_modify_ind_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -44462,12 +44298,13 @@ SRSASN_CODE pdu_session_res_modify_ind_ies_container::unpack(cbit_ref& bref) pdu_session_res_modify_list_mod_ind.value = c.value.pdu_session_res_modify_list_mod_ind(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -44507,7 +44344,7 @@ void pdu_session_res_modify_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pdu_session_res_modify_request_ies_container::pdu_session_res_modify_request_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -44567,12 +44404,13 @@ SRSASN_CODE pdu_session_res_modify_request_ies_container::unpack(cbit_ref& bref) pdu_session_res_modify_list_mod_req.value = c.value.pdu_session_res_modify_list_mod_req(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -44616,7 +44454,7 @@ void pdu_session_res_modify_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pdu_session_res_modify_resp_ies_container::pdu_session_res_modify_resp_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -44701,12 +44539,13 @@ SRSASN_CODE pdu_session_res_modify_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -44760,7 +44599,7 @@ void pdu_session_res_modify_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pdu_session_res_notify_ies_container::pdu_session_res_notify_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -44834,12 +44673,13 @@ SRSASN_CODE pdu_session_res_notify_ies_container::unpack(cbit_ref& bref) user_location_info.value = c.value.user_location_info(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -44889,7 +44729,7 @@ void pdu_session_res_notify_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pdu_session_res_release_cmd_ies_container::pdu_session_res_release_cmd_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -44960,12 +44800,13 @@ SRSASN_CODE pdu_session_res_release_cmd_ies_container::unpack(cbit_ref& bref) pdu_session_res_to_release_list_rel_cmd.value = c.value.pdu_session_res_to_release_list_rel_cmd(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -45013,7 +44854,7 @@ void pdu_session_res_release_cmd_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pdu_session_res_release_resp_ies_container::pdu_session_res_release_resp_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -45084,12 +44925,13 @@ SRSASN_CODE pdu_session_res_release_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -45137,7 +44979,7 @@ void pdu_session_res_release_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pdu_session_res_setup_request_ies_container::pdu_session_res_setup_request_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -45219,12 +45061,13 @@ SRSASN_CODE pdu_session_res_setup_request_ies_container::unpack(cbit_ref& bref) ue_aggregate_maximum_bit_rate.value = c.value.ue_aggregate_maximum_bit_rate(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -45276,7 +45119,7 @@ void pdu_session_res_setup_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pdu_session_res_setup_resp_ies_container::pdu_session_res_setup_resp_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -45350,12 +45193,13 @@ SRSASN_CODE pdu_session_res_setup_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -45405,7 +45249,7 @@ void pdu_session_res_setup_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pws_cancel_request_ies_container::pws_cancel_request_ies_container() : msg_id(35, crit_e::reject), @@ -45468,12 +45312,13 @@ SRSASN_CODE pws_cancel_request_ies_container::unpack(cbit_ref& bref) cancel_all_warning_msgs.value = c.value.cancel_all_warning_msgs(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -45519,7 +45364,7 @@ void pws_cancel_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pws_cancel_resp_ies_container::pws_cancel_resp_ies_container() : msg_id(35, crit_e::reject), @@ -45582,12 +45427,13 @@ SRSASN_CODE pws_cancel_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -45633,7 +45479,7 @@ void pws_cancel_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pws_fail_ind_ies_container::pws_fail_ind_ies_container() : pws_failed_cell_id_list(81, crit_e::reject), @@ -45674,12 +45520,13 @@ SRSASN_CODE pws_fail_ind_ies_container::unpack(cbit_ref& bref) global_ran_node_id.value = c.value.global_ran_node_id(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -45717,7 +45564,7 @@ void pws_fail_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; pws_restart_ind_ies_container::pws_restart_ind_ies_container() : cell_id_list_for_restart(16, crit_e::reject), @@ -45777,12 +45624,13 @@ SRSASN_CODE pws_restart_ind_ies_container::unpack(cbit_ref& bref) emergency_area_id_list_for_restart.value = c.value.emergency_area_id_list_for_restart(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -45826,7 +45674,7 @@ void pws_restart_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; paging_ies_container::paging_ies_container() : ue_paging_id(115, crit_e::ignore), @@ -45922,12 +45770,13 @@ SRSASN_CODE paging_ies_container::unpack(cbit_ref& bref) assist_data_for_paging.value = c.value.assist_data_for_paging(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -45985,7 +45834,7 @@ void paging_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; path_switch_request_ies_container::path_switch_request_ies_container() : ran_ue_ngap_id(85, crit_e::reject), @@ -46061,12 +45910,13 @@ SRSASN_CODE path_switch_request_ies_container::unpack(cbit_ref& bref) pdu_session_res_failed_to_setup_list_ps_req.value = c.value.pdu_session_res_failed_to_setup_list_ps_req(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -46114,7 +45964,7 @@ void path_switch_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; path_switch_request_ack_ies_container::path_switch_request_ack_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -46256,12 +46106,13 @@ SRSASN_CODE path_switch_request_ack_ies_container::unpack(cbit_ref& bref) redirection_voice_fallback.value = c.value.redirection_voice_fallback(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -46333,7 +46184,7 @@ void path_switch_request_ack_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; path_switch_request_fail_ies_container::path_switch_request_fail_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -46393,12 +46244,13 @@ SRSASN_CODE path_switch_request_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -46534,7 +46386,7 @@ void private_msg_s::to_json(json_writer& j) const j.end_array(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ran_cfg_upd_ies_container::ran_cfg_upd_ies_container() : ran_node_name(82, crit_e::ignore), @@ -46601,7 +46453,7 @@ SRSASN_CODE ran_cfg_upd_ies_container::unpack(cbit_ref& bref) global_ran_node_id.value = c.value.global_ran_node_id(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -46653,7 +46505,7 @@ void ran_cfg_upd_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ran_cfg_upd_ack_ies_container::ran_cfg_upd_ack_ies_container() : crit_diagnostics(19, crit_e::ignore) {} SRSASN_CODE ran_cfg_upd_ack_ies_container::pack(bit_ref& bref) const @@ -46676,16 +46528,14 @@ SRSASN_CODE ran_cfg_upd_ack_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 19: - crit_diagnostics_present = true; - crit_diagnostics.id = c.id; - crit_diagnostics.crit = c.crit; - crit_diagnostics.value = c.value.crit_diagnostics(); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 19) { + crit_diagnostics_present = true; + crit_diagnostics.id = c.id; + crit_diagnostics.crit = c.crit; + crit_diagnostics.value = c.value.crit_diagnostics(); + } else { + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -46724,7 +46574,7 @@ void ran_cfg_upd_ack_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ran_cfg_upd_fail_ies_container::ran_cfg_upd_fail_ies_container() : cause(15, crit_e::ignore), @@ -46779,12 +46629,13 @@ SRSASN_CODE ran_cfg_upd_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -46828,7 +46679,7 @@ void ran_cfg_upd_fail_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; rrc_inactive_transition_report_ies_container::rrc_inactive_transition_report_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -46885,12 +46736,13 @@ SRSASN_CODE rrc_inactive_transition_report_ies_container::unpack(cbit_ref& bref) user_location_info.value = c.value.user_location_info(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -46932,7 +46784,7 @@ void rrc_inactive_transition_report_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; reroute_nas_request_ies_container::reroute_nas_request_ies_container() : ran_ue_ngap_id(85, crit_e::reject), @@ -47003,12 +46855,13 @@ SRSASN_CODE reroute_nas_request_ies_container::unpack(cbit_ref& bref) allowed_nssai.value = c.value.allowed_nssai(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -47056,7 +46909,7 @@ void reroute_nas_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; secondary_rat_data_usage_report_ies_container::secondary_rat_data_usage_report_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -47116,12 +46969,13 @@ SRSASN_CODE secondary_rat_data_usage_report_ies_container::unpack(cbit_ref& bref ho_flag.value = c.value.ho_flag(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -47165,7 +47019,7 @@ void secondary_rat_data_usage_report_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; trace_fail_ind_ies_container::trace_fail_ind_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -47222,12 +47076,13 @@ SRSASN_CODE trace_fail_ind_ies_container::unpack(cbit_ref& bref) cause.value = c.value.cause(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -47269,7 +47124,7 @@ void trace_fail_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; trace_start_ies_container::trace_start_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -47318,12 +47173,13 @@ SRSASN_CODE trace_start_ies_container::unpack(cbit_ref& bref) trace_activation.value = c.value.trace_activation(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -47363,7 +47219,7 @@ void trace_start_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ue_context_mod_fail_ies_container::ue_context_mod_fail_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -47423,12 +47279,13 @@ SRSASN_CODE ue_context_mod_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -47472,7 +47329,7 @@ void ue_context_mod_fail_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ue_context_mod_request_ies_container::ue_context_mod_request_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -47612,12 +47469,13 @@ SRSASN_CODE ue_context_mod_request_ies_container::unpack(cbit_ref& bref) rrc_inactive_transition_report_request.value = c.value.rrc_inactive_transition_report_request(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -47691,7 +47549,7 @@ void ue_context_mod_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ue_context_mod_resp_ies_container::ue_context_mod_resp_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -47765,12 +47623,13 @@ SRSASN_CODE ue_context_mod_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -47820,7 +47679,7 @@ void ue_context_mod_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ue_context_release_cmd_ies_container::ue_context_release_cmd_ies_container() : ue_ngap_ids(114, crit_e::reject), @@ -47861,12 +47720,13 @@ SRSASN_CODE ue_context_release_cmd_ies_container::unpack(cbit_ref& bref) cause.value = c.value.cause(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -47904,7 +47764,7 @@ void ue_context_release_cmd_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ue_context_release_complete_ies_container::ue_context_release_complete_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -47990,12 +47850,13 @@ SRSASN_CODE ue_context_release_complete_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -48049,7 +47910,7 @@ void ue_context_release_complete_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ue_context_release_request_ies_container::ue_context_release_request_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -48109,12 +47970,13 @@ SRSASN_CODE ue_context_release_request_ies_container::unpack(cbit_ref& bref) cause.value = c.value.cause(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -48158,7 +48020,7 @@ void ue_context_release_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ue_radio_cap_check_request_ies_container::ue_radio_cap_check_request_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -48210,12 +48072,13 @@ SRSASN_CODE ue_radio_cap_check_request_ies_container::unpack(cbit_ref& bref) ue_radio_cap.value = c.value.ue_radio_cap(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -48257,7 +48120,7 @@ void ue_radio_cap_check_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ue_radio_cap_check_resp_ies_container::ue_radio_cap_check_resp_ies_container() : amf_ue_ngap_id(10, crit_e::ignore), @@ -48317,12 +48180,13 @@ SRSASN_CODE ue_radio_cap_check_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -48366,7 +48230,7 @@ void ue_radio_cap_check_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ue_radio_cap_info_ind_ies_container::ue_radio_cap_info_ind_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -48426,12 +48290,13 @@ SRSASN_CODE ue_radio_cap_info_ind_ies_container::unpack(cbit_ref& bref) ue_radio_cap_for_paging.value = c.value.ue_radio_cap_for_paging(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -48475,7 +48340,7 @@ void ue_radio_cap_info_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; uetnla_binding_release_request_ies_container::uetnla_binding_release_request_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -48516,12 +48381,13 @@ SRSASN_CODE uetnla_binding_release_request_ies_container::unpack(cbit_ref& bref) ran_ue_ngap_id.value = c.value.ran_ue_ngap_id(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -48559,7 +48425,7 @@ void uetnla_binding_release_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ul_nas_transport_ies_container::ul_nas_transport_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -48616,12 +48482,13 @@ SRSASN_CODE ul_nas_transport_ies_container::unpack(cbit_ref& bref) user_location_info.value = c.value.user_location_info(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -48663,7 +48530,7 @@ void ul_nas_transport_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ul_non_ueassociated_nrp_pa_transport_ies_container::ul_non_ueassociated_nrp_pa_transport_ies_container() : routing_id(89, crit_e::reject), @@ -48704,12 +48571,13 @@ SRSASN_CODE ul_non_ueassociated_nrp_pa_transport_ies_container::unpack(cbit_ref& nrp_pa_pdu.value = c.value.nrp_pa_pdu(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -48747,7 +48615,7 @@ void ul_non_ueassociated_nrp_pa_transport_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ul_ran_cfg_transfer_ies_container::ul_ran_cfg_transfer_ies_container() : son_cfg_transfer_ul(99, crit_e::ignore), @@ -48792,7 +48660,7 @@ SRSASN_CODE ul_ran_cfg_transfer_ies_container::unpack(cbit_ref& bref) endc_son_cfg_transfer_ul.value = c.value.endc_son_cfg_transfer_ul(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -48836,7 +48704,7 @@ void ul_ran_cfg_transfer_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ul_ran_status_transfer_ies_container::ul_ran_status_transfer_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -48885,12 +48753,13 @@ SRSASN_CODE ul_ran_status_transfer_ies_container::unpack(cbit_ref& bref) ran_status_transfer_transparent_container.value = c.value.ran_status_transfer_transparent_container(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -48930,7 +48799,7 @@ void ul_ran_status_transfer_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; ul_ueassociated_nrp_pa_transport_ies_container::ul_ueassociated_nrp_pa_transport_ies_container() : amf_ue_ngap_id(10, crit_e::reject), @@ -48987,12 +48856,13 @@ SRSASN_CODE ul_ueassociated_nrp_pa_transport_ies_container::unpack(cbit_ref& bre nrp_pa_pdu.value = c.value.nrp_pa_pdu(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -49034,7 +48904,7 @@ void ul_ueassociated_nrp_pa_transport_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; write_replace_warning_request_ies_container::write_replace_warning_request_ies_container() : msg_id(35, crit_e::reject), @@ -49168,12 +49038,13 @@ SRSASN_CODE write_replace_warning_request_ies_container::unpack(cbit_ref& bref) warning_area_coordinates.value = c.value.warning_area_coordinates(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -49243,7 +49114,7 @@ void write_replace_warning_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::ngap_nr::protocol_ie_field_s; write_replace_warning_resp_ies_container::write_replace_warning_resp_ies_container() : msg_id(35, crit_e::reject), @@ -49306,12 +49177,13 @@ SRSASN_CODE write_replace_warning_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::NGAP_NR")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - ngap_nr_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::NGAP_NR")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -49357,23 +49229,27 @@ void write_replace_warning_resp_s::to_json(json_writer& j) const j.end_obj(); } -// NGAP-ELEMENTARY-PROCEDURES-CLASS-1 ::= OBJECT SET OF NGAP-ELEMENTARY-PROCEDURE -uint16_t ngap_elem_procs_class_minus1_o::idx_to_proc_code(uint32_t idx) +// NGAP-ELEMENTARY-PROCEDURES ::= OBJECT SET OF NGAP-ELEMENTARY-PROCEDURE +uint16_t ngap_elem_procs_o::idx_to_proc_code(uint32_t idx) { - static constexpr const uint16_t options[] = {0, 10, 12, 13, 14, 20, 21, 25, 26, 27, 28, 29, 32, 35, 40, 41, 43, 51}; - return convert_enum_idx(options, 18, idx, "proc_code"); + static const uint16_t options[] = {0, 10, 12, 13, 14, 20, 21, 25, 26, 27, 28, 29, 32, 35, 40, 41, 43, 51, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 15, 18, 16, 17, 19, 22, 23, 24, + 30, 31, 33, 34, 36, 37, 52, 38, 39, 42, 44, 45, 46, 47, 48, 49, 50}; + return map_enum_number(options, 53, idx, "proc_code"); } -bool ngap_elem_procs_class_minus1_o::is_proc_code_valid(const uint16_t& proc_code) +bool ngap_elem_procs_o::is_proc_code_valid(const uint16_t& proc_code) { - static constexpr const uint16_t options[] = {0, 10, 12, 13, 14, 20, 21, 25, 26, 27, 28, 29, 32, 35, 40, 41, 43, 51}; - for (uint32_t i = 0; i < 18; ++i) { - if (options[i] == proc_code) { + static const uint16_t options[] = {0, 10, 12, 13, 14, 20, 21, 25, 26, 27, 28, 29, 32, 35, 40, 41, 43, 51, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 15, 18, 16, 17, 19, 22, 23, 24, + 30, 31, 33, 34, 36, 37, 52, 38, 39, 42, 44, 45, 46, 47, 48, 49, 50}; + for (const auto& o : options) { + if (o == proc_code) { return true; } } return false; } -ngap_elem_procs_class_minus1_o::init_msg_c ngap_elem_procs_class_minus1_o::get_init_msg(const uint16_t& proc_code) +ngap_elem_procs_o::init_msg_c ngap_elem_procs_o::get_init_msg(const uint16_t& proc_code) { init_msg_c ret{}; switch (proc_code) { @@ -49431,130 +49307,213 @@ ngap_elem_procs_class_minus1_o::init_msg_c ngap_elem_procs_class_minus1_o::get_i case 51: ret.set(init_msg_c::types::write_replace_warning_request); break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -ngap_elem_procs_class_minus1_o::successful_outcome_c -ngap_elem_procs_class_minus1_o::get_successful_outcome(const uint16_t& proc_code) -{ - successful_outcome_c ret{}; - switch (proc_code) { - case 0: - ret.set(successful_outcome_c::types::amf_cfg_upd); + case 1: + ret.set(init_msg_c::types::amf_status_ind); break; - case 10: - ret.set(successful_outcome_c::types::ho_cancel); + case 2: + ret.set(init_msg_c::types::cell_traffic_trace); break; - case 12: - ret.set(successful_outcome_c::types::ho_required); + case 3: + ret.set(init_msg_c::types::deactiv_trace); break; - case 13: - ret.set(successful_outcome_c::types::ho_request); + case 4: + ret.set(init_msg_c::types::dl_nas_transport); break; - case 14: - ret.set(successful_outcome_c::types::init_context_setup_request); + case 5: + ret.set(init_msg_c::types::dl_non_ueassociated_nrp_pa_transport); break; - case 20: - ret.set(successful_outcome_c::types::ng_reset); + case 6: + ret.set(init_msg_c::types::dl_ran_cfg_transfer); break; - case 21: - ret.set(successful_outcome_c::types::ng_setup_request); + case 7: + ret.set(init_msg_c::types::dl_ran_status_transfer); break; - case 25: - ret.set(successful_outcome_c::types::path_switch_request); + case 8: + ret.set(init_msg_c::types::dl_ueassociated_nrp_pa_transport); break; - case 26: - ret.set(successful_outcome_c::types::pdu_session_res_modify_request); + case 9: + ret.set(init_msg_c::types::error_ind); break; - case 27: - ret.set(successful_outcome_c::types::pdu_session_res_modify_ind); + case 11: + ret.set(init_msg_c::types::ho_notify); break; - case 28: - ret.set(successful_outcome_c::types::pdu_session_res_release_cmd); + case 15: + ret.set(init_msg_c::types::init_ue_msg); break; - case 29: - ret.set(successful_outcome_c::types::pdu_session_res_setup_request); + case 18: + ret.set(init_msg_c::types::location_report); break; - case 32: - ret.set(successful_outcome_c::types::pws_cancel_request); + case 16: + ret.set(init_msg_c::types::location_report_ctrl); break; - case 35: - ret.set(successful_outcome_c::types::ran_cfg_upd); + case 17: + ret.set(init_msg_c::types::location_report_fail_ind); break; - case 40: - ret.set(successful_outcome_c::types::ue_context_mod_request); + case 19: + ret.set(init_msg_c::types::nas_non_delivery_ind); break; - case 41: - ret.set(successful_outcome_c::types::ue_context_release_cmd); + case 22: + ret.set(init_msg_c::types::overload_start); break; - case 43: - ret.set(successful_outcome_c::types::ue_radio_cap_check_request); + case 23: + ret.set(init_msg_c::types::overload_stop); break; - case 51: - ret.set(successful_outcome_c::types::write_replace_warning_request); + case 24: + ret.set(init_msg_c::types::paging); + break; + case 30: + ret.set(init_msg_c::types::pdu_session_res_notify); + break; + case 31: + ret.set(init_msg_c::types::private_msg); + break; + case 33: + ret.set(init_msg_c::types::pws_fail_ind); + break; + case 34: + ret.set(init_msg_c::types::pws_restart_ind); + break; + case 36: + ret.set(init_msg_c::types::reroute_nas_request); + break; + case 37: + ret.set(init_msg_c::types::rrc_inactive_transition_report); + break; + case 52: + ret.set(init_msg_c::types::secondary_rat_data_usage_report); + break; + case 38: + ret.set(init_msg_c::types::trace_fail_ind); + break; + case 39: + ret.set(init_msg_c::types::trace_start); + break; + case 42: + ret.set(init_msg_c::types::ue_context_release_request); + break; + case 44: + ret.set(init_msg_c::types::ue_radio_cap_info_ind); + break; + case 45: + ret.set(init_msg_c::types::uetnla_binding_release_request); + break; + case 46: + ret.set(init_msg_c::types::ul_nas_transport); + break; + case 47: + ret.set(init_msg_c::types::ul_non_ueassociated_nrp_pa_transport); + break; + case 48: + ret.set(init_msg_c::types::ul_ran_cfg_transfer); + break; + case 49: + ret.set(init_msg_c::types::ul_ran_status_transfer); + break; + case 50: + ret.set(init_msg_c::types::ul_ueassociated_nrp_pa_transport); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); + logmap::get("ASN1::NGAP_NR")->error("The proc_code=%d is not recognized", proc_code); } return ret; } -ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c -ngap_elem_procs_class_minus1_o::get_unsuccessful_outcome(const uint16_t& proc_code) +ngap_elem_procs_o::successful_outcome_c ngap_elem_procs_o::get_successful_outcome(const uint16_t& proc_code) { - unsuccessful_outcome_c ret{}; + successful_outcome_c ret{}; switch (proc_code) { case 0: - ret.set(unsuccessful_outcome_c::types::amf_cfg_upd); + ret.set(successful_outcome_c::types::amf_cfg_upd_ack); break; case 10: + ret.set(successful_outcome_c::types::ho_cancel_ack); break; case 12: - ret.set(unsuccessful_outcome_c::types::ho_required); + ret.set(successful_outcome_c::types::ho_cmd); break; case 13: - ret.set(unsuccessful_outcome_c::types::ho_request); + ret.set(successful_outcome_c::types::ho_request_ack); break; case 14: - ret.set(unsuccessful_outcome_c::types::init_context_setup_request); + ret.set(successful_outcome_c::types::init_context_setup_resp); break; case 20: + ret.set(successful_outcome_c::types::ng_reset_ack); break; case 21: - ret.set(unsuccessful_outcome_c::types::ng_setup_request); + ret.set(successful_outcome_c::types::ng_setup_resp); break; case 25: - ret.set(unsuccessful_outcome_c::types::path_switch_request); + ret.set(successful_outcome_c::types::path_switch_request_ack); break; case 26: + ret.set(successful_outcome_c::types::pdu_session_res_modify_resp); break; case 27: + ret.set(successful_outcome_c::types::pdu_session_res_modify_confirm); break; case 28: + ret.set(successful_outcome_c::types::pdu_session_res_release_resp); break; case 29: + ret.set(successful_outcome_c::types::pdu_session_res_setup_resp); break; case 32: + ret.set(successful_outcome_c::types::pws_cancel_resp); break; case 35: - ret.set(unsuccessful_outcome_c::types::ran_cfg_upd); + ret.set(successful_outcome_c::types::ran_cfg_upd_ack); break; case 40: - ret.set(unsuccessful_outcome_c::types::ue_context_mod_request); + ret.set(successful_outcome_c::types::ue_context_mod_resp); break; case 41: + ret.set(successful_outcome_c::types::ue_context_release_complete); break; case 43: + ret.set(successful_outcome_c::types::ue_radio_cap_check_resp); break; case 51: + ret.set(successful_outcome_c::types::write_replace_warning_resp); break; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); + logmap::get("ASN1::NGAP_NR")->error("The proc_code=%d is not recognized", proc_code); } return ret; } -crit_e ngap_elem_procs_class_minus1_o::get_crit(const uint16_t& proc_code) +ngap_elem_procs_o::unsuccessful_outcome_c ngap_elem_procs_o::get_unsuccessful_outcome(const uint16_t& proc_code) +{ + unsuccessful_outcome_c ret{}; + switch (proc_code) { + case 0: + ret.set(unsuccessful_outcome_c::types::amf_cfg_upd_fail); + break; + case 12: + ret.set(unsuccessful_outcome_c::types::ho_prep_fail); + break; + case 13: + ret.set(unsuccessful_outcome_c::types::ho_fail); + break; + case 14: + ret.set(unsuccessful_outcome_c::types::init_context_setup_fail); + break; + case 21: + ret.set(unsuccessful_outcome_c::types::ng_setup_fail); + break; + case 25: + ret.set(unsuccessful_outcome_c::types::path_switch_request_fail); + break; + case 35: + ret.set(unsuccessful_outcome_c::types::ran_cfg_upd_fail); + break; + case 40: + ret.set(unsuccessful_outcome_c::types::ue_context_mod_fail); + break; + default: + logmap::get("ASN1::NGAP_NR")->error("The proc_code=%d is not recognized", proc_code); + } + return ret; +} +crit_e ngap_elem_procs_o::get_crit(const uint16_t& proc_code) { switch (proc_code) { case 0: @@ -49593,195 +49552,616 @@ crit_e ngap_elem_procs_class_minus1_o::get_crit(const uint16_t& proc_code) return crit_e::reject; case 51: return crit_e::reject; + case 1: + return crit_e::ignore; + case 2: + return crit_e::ignore; + case 3: + return crit_e::ignore; + case 4: + return crit_e::ignore; + case 5: + return crit_e::ignore; + case 6: + return crit_e::ignore; + case 7: + return crit_e::ignore; + case 8: + return crit_e::ignore; + case 9: + return crit_e::ignore; + case 11: + return crit_e::ignore; + case 15: + return crit_e::ignore; + case 18: + return crit_e::ignore; + case 16: + return crit_e::ignore; + case 17: + return crit_e::ignore; + case 19: + return crit_e::ignore; + case 22: + return crit_e::ignore; + case 23: + return crit_e::reject; + case 24: + return crit_e::ignore; + case 30: + return crit_e::ignore; + case 31: + return crit_e::ignore; + case 33: + return crit_e::ignore; + case 34: + return crit_e::ignore; + case 36: + return crit_e::reject; + case 37: + return crit_e::ignore; + case 52: + return crit_e::ignore; + case 38: + return crit_e::ignore; + case 39: + return crit_e::ignore; + case 42: + return crit_e::ignore; + case 44: + return crit_e::ignore; + case 45: + return crit_e::ignore; + case 46: + return crit_e::ignore; + case 47: + return crit_e::ignore; + case 48: + return crit_e::ignore; + case 49: + return crit_e::ignore; + case 50: + return crit_e::ignore; default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); + logmap::get("ASN1::NGAP_NR")->error("The proc_code=%d is not recognized", proc_code); } - return crit_e(); + return {}; } // InitiatingMessage ::= OPEN TYPE -amf_cfg_upd_s& ngap_elem_procs_class_minus1_o::init_msg_c::amf_cfg_upd() +amf_cfg_upd_s& ngap_elem_procs_o::init_msg_c::amf_cfg_upd() { assert_choice_type("AMFConfigurationUpdate", type_.to_string(), "InitiatingMessage"); return c.get(); } -ho_cancel_s& ngap_elem_procs_class_minus1_o::init_msg_c::ho_cancel() +ho_cancel_s& ngap_elem_procs_o::init_msg_c::ho_cancel() { assert_choice_type("HandoverCancel", type_.to_string(), "InitiatingMessage"); return c.get(); } -ho_required_s& ngap_elem_procs_class_minus1_o::init_msg_c::ho_required() +ho_required_s& ngap_elem_procs_o::init_msg_c::ho_required() { assert_choice_type("HandoverRequired", type_.to_string(), "InitiatingMessage"); return c.get(); } -ho_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::ho_request() +ho_request_s& ngap_elem_procs_o::init_msg_c::ho_request() { assert_choice_type("HandoverRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -init_context_setup_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::init_context_setup_request() +init_context_setup_request_s& ngap_elem_procs_o::init_msg_c::init_context_setup_request() { assert_choice_type("InitialContextSetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -ng_reset_s& ngap_elem_procs_class_minus1_o::init_msg_c::ng_reset() +ng_reset_s& ngap_elem_procs_o::init_msg_c::ng_reset() { assert_choice_type("NGReset", type_.to_string(), "InitiatingMessage"); return c.get(); } -ng_setup_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::ng_setup_request() +ng_setup_request_s& ngap_elem_procs_o::init_msg_c::ng_setup_request() { assert_choice_type("NGSetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -path_switch_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::path_switch_request() +path_switch_request_s& ngap_elem_procs_o::init_msg_c::path_switch_request() { assert_choice_type("PathSwitchRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -pdu_session_res_modify_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::pdu_session_res_modify_request() +pdu_session_res_modify_request_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_modify_request() { assert_choice_type("PDUSessionResourceModifyRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -pdu_session_res_modify_ind_s& ngap_elem_procs_class_minus1_o::init_msg_c::pdu_session_res_modify_ind() +pdu_session_res_modify_ind_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_modify_ind() { assert_choice_type("PDUSessionResourceModifyIndication", type_.to_string(), "InitiatingMessage"); return c.get(); } -pdu_session_res_release_cmd_s& ngap_elem_procs_class_minus1_o::init_msg_c::pdu_session_res_release_cmd() +pdu_session_res_release_cmd_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_release_cmd() { assert_choice_type("PDUSessionResourceReleaseCommand", type_.to_string(), "InitiatingMessage"); return c.get(); } -pdu_session_res_setup_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::pdu_session_res_setup_request() +pdu_session_res_setup_request_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_setup_request() { assert_choice_type("PDUSessionResourceSetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -pws_cancel_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::pws_cancel_request() +pws_cancel_request_s& ngap_elem_procs_o::init_msg_c::pws_cancel_request() { assert_choice_type("PWSCancelRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -ran_cfg_upd_s& ngap_elem_procs_class_minus1_o::init_msg_c::ran_cfg_upd() +ran_cfg_upd_s& ngap_elem_procs_o::init_msg_c::ran_cfg_upd() { assert_choice_type("RANConfigurationUpdate", type_.to_string(), "InitiatingMessage"); return c.get(); } -ue_context_mod_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::ue_context_mod_request() +ue_context_mod_request_s& ngap_elem_procs_o::init_msg_c::ue_context_mod_request() { assert_choice_type("UEContextModificationRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -ue_context_release_cmd_s& ngap_elem_procs_class_minus1_o::init_msg_c::ue_context_release_cmd() +ue_context_release_cmd_s& ngap_elem_procs_o::init_msg_c::ue_context_release_cmd() { assert_choice_type("UEContextReleaseCommand", type_.to_string(), "InitiatingMessage"); return c.get(); } -ue_radio_cap_check_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::ue_radio_cap_check_request() +ue_radio_cap_check_request_s& ngap_elem_procs_o::init_msg_c::ue_radio_cap_check_request() { assert_choice_type("UERadioCapabilityCheckRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -write_replace_warning_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::write_replace_warning_request() +write_replace_warning_request_s& ngap_elem_procs_o::init_msg_c::write_replace_warning_request() { assert_choice_type("WriteReplaceWarningRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const amf_cfg_upd_s& ngap_elem_procs_class_minus1_o::init_msg_c::amf_cfg_upd() const +amf_status_ind_s& ngap_elem_procs_o::init_msg_c::amf_status_ind() +{ + assert_choice_type("AMFStatusIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +cell_traffic_trace_s& ngap_elem_procs_o::init_msg_c::cell_traffic_trace() +{ + assert_choice_type("CellTrafficTrace", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +deactiv_trace_s& ngap_elem_procs_o::init_msg_c::deactiv_trace() +{ + assert_choice_type("DeactivateTrace", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +dl_nas_transport_s& ngap_elem_procs_o::init_msg_c::dl_nas_transport() +{ + assert_choice_type("DownlinkNASTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +dl_non_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::dl_non_ueassociated_nrp_pa_transport() +{ + assert_choice_type("DownlinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +dl_ran_cfg_transfer_s& ngap_elem_procs_o::init_msg_c::dl_ran_cfg_transfer() +{ + assert_choice_type("DownlinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +dl_ran_status_transfer_s& ngap_elem_procs_o::init_msg_c::dl_ran_status_transfer() +{ + assert_choice_type("DownlinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +dl_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::dl_ueassociated_nrp_pa_transport() +{ + assert_choice_type("DownlinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +error_ind_s& ngap_elem_procs_o::init_msg_c::error_ind() +{ + assert_choice_type("ErrorIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ho_notify_s& ngap_elem_procs_o::init_msg_c::ho_notify() +{ + assert_choice_type("HandoverNotify", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +init_ue_msg_s& ngap_elem_procs_o::init_msg_c::init_ue_msg() +{ + assert_choice_type("InitialUEMessage", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +location_report_s& ngap_elem_procs_o::init_msg_c::location_report() +{ + assert_choice_type("LocationReport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +location_report_ctrl_s& ngap_elem_procs_o::init_msg_c::location_report_ctrl() +{ + assert_choice_type("LocationReportingControl", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +location_report_fail_ind_s& ngap_elem_procs_o::init_msg_c::location_report_fail_ind() +{ + assert_choice_type("LocationReportingFailureIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +nas_non_delivery_ind_s& ngap_elem_procs_o::init_msg_c::nas_non_delivery_ind() +{ + assert_choice_type("NASNonDeliveryIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +overload_start_s& ngap_elem_procs_o::init_msg_c::overload_start() +{ + assert_choice_type("OverloadStart", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +overload_stop_s& ngap_elem_procs_o::init_msg_c::overload_stop() +{ + assert_choice_type("OverloadStop", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +paging_s& ngap_elem_procs_o::init_msg_c::paging() +{ + assert_choice_type("Paging", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +pdu_session_res_notify_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_notify() +{ + assert_choice_type("PDUSessionResourceNotify", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +private_msg_s& ngap_elem_procs_o::init_msg_c::private_msg() +{ + assert_choice_type("PrivateMessage", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +pws_fail_ind_s& ngap_elem_procs_o::init_msg_c::pws_fail_ind() +{ + assert_choice_type("PWSFailureIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +pws_restart_ind_s& ngap_elem_procs_o::init_msg_c::pws_restart_ind() +{ + assert_choice_type("PWSRestartIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +reroute_nas_request_s& ngap_elem_procs_o::init_msg_c::reroute_nas_request() +{ + assert_choice_type("RerouteNASRequest", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +rrc_inactive_transition_report_s& ngap_elem_procs_o::init_msg_c::rrc_inactive_transition_report() +{ + assert_choice_type("RRCInactiveTransitionReport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +secondary_rat_data_usage_report_s& ngap_elem_procs_o::init_msg_c::secondary_rat_data_usage_report() +{ + assert_choice_type("SecondaryRATDataUsageReport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +trace_fail_ind_s& ngap_elem_procs_o::init_msg_c::trace_fail_ind() +{ + assert_choice_type("TraceFailureIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +trace_start_s& ngap_elem_procs_o::init_msg_c::trace_start() +{ + assert_choice_type("TraceStart", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ue_context_release_request_s& ngap_elem_procs_o::init_msg_c::ue_context_release_request() +{ + assert_choice_type("UEContextReleaseRequest", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ue_radio_cap_info_ind_s& ngap_elem_procs_o::init_msg_c::ue_radio_cap_info_ind() +{ + assert_choice_type("UERadioCapabilityInfoIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +uetnla_binding_release_request_s& ngap_elem_procs_o::init_msg_c::uetnla_binding_release_request() +{ + assert_choice_type("UETNLABindingReleaseRequest", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ul_nas_transport_s& ngap_elem_procs_o::init_msg_c::ul_nas_transport() +{ + assert_choice_type("UplinkNASTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ul_non_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::ul_non_ueassociated_nrp_pa_transport() +{ + assert_choice_type("UplinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ul_ran_cfg_transfer_s& ngap_elem_procs_o::init_msg_c::ul_ran_cfg_transfer() +{ + assert_choice_type("UplinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ul_ran_status_transfer_s& ngap_elem_procs_o::init_msg_c::ul_ran_status_transfer() +{ + assert_choice_type("UplinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ul_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::ul_ueassociated_nrp_pa_transport() +{ + assert_choice_type("UplinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const amf_cfg_upd_s& ngap_elem_procs_o::init_msg_c::amf_cfg_upd() const { assert_choice_type("AMFConfigurationUpdate", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ho_cancel_s& ngap_elem_procs_class_minus1_o::init_msg_c::ho_cancel() const +const ho_cancel_s& ngap_elem_procs_o::init_msg_c::ho_cancel() const { assert_choice_type("HandoverCancel", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ho_required_s& ngap_elem_procs_class_minus1_o::init_msg_c::ho_required() const +const ho_required_s& ngap_elem_procs_o::init_msg_c::ho_required() const { assert_choice_type("HandoverRequired", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ho_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::ho_request() const +const ho_request_s& ngap_elem_procs_o::init_msg_c::ho_request() const { assert_choice_type("HandoverRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const init_context_setup_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::init_context_setup_request() const +const init_context_setup_request_s& ngap_elem_procs_o::init_msg_c::init_context_setup_request() const { assert_choice_type("InitialContextSetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ng_reset_s& ngap_elem_procs_class_minus1_o::init_msg_c::ng_reset() const +const ng_reset_s& ngap_elem_procs_o::init_msg_c::ng_reset() const { assert_choice_type("NGReset", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ng_setup_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::ng_setup_request() const +const ng_setup_request_s& ngap_elem_procs_o::init_msg_c::ng_setup_request() const { assert_choice_type("NGSetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const path_switch_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::path_switch_request() const +const path_switch_request_s& ngap_elem_procs_o::init_msg_c::path_switch_request() const { assert_choice_type("PathSwitchRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const pdu_session_res_modify_request_s& -ngap_elem_procs_class_minus1_o::init_msg_c::pdu_session_res_modify_request() const +const pdu_session_res_modify_request_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_modify_request() const { assert_choice_type("PDUSessionResourceModifyRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const pdu_session_res_modify_ind_s& ngap_elem_procs_class_minus1_o::init_msg_c::pdu_session_res_modify_ind() const +const pdu_session_res_modify_ind_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_modify_ind() const { assert_choice_type("PDUSessionResourceModifyIndication", type_.to_string(), "InitiatingMessage"); return c.get(); } -const pdu_session_res_release_cmd_s& ngap_elem_procs_class_minus1_o::init_msg_c::pdu_session_res_release_cmd() const +const pdu_session_res_release_cmd_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_release_cmd() const { assert_choice_type("PDUSessionResourceReleaseCommand", type_.to_string(), "InitiatingMessage"); return c.get(); } -const pdu_session_res_setup_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::pdu_session_res_setup_request() const +const pdu_session_res_setup_request_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_setup_request() const { assert_choice_type("PDUSessionResourceSetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const pws_cancel_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::pws_cancel_request() const +const pws_cancel_request_s& ngap_elem_procs_o::init_msg_c::pws_cancel_request() const { assert_choice_type("PWSCancelRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ran_cfg_upd_s& ngap_elem_procs_class_minus1_o::init_msg_c::ran_cfg_upd() const +const ran_cfg_upd_s& ngap_elem_procs_o::init_msg_c::ran_cfg_upd() const { assert_choice_type("RANConfigurationUpdate", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ue_context_mod_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::ue_context_mod_request() const +const ue_context_mod_request_s& ngap_elem_procs_o::init_msg_c::ue_context_mod_request() const { assert_choice_type("UEContextModificationRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ue_context_release_cmd_s& ngap_elem_procs_class_minus1_o::init_msg_c::ue_context_release_cmd() const +const ue_context_release_cmd_s& ngap_elem_procs_o::init_msg_c::ue_context_release_cmd() const { assert_choice_type("UEContextReleaseCommand", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ue_radio_cap_check_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::ue_radio_cap_check_request() const +const ue_radio_cap_check_request_s& ngap_elem_procs_o::init_msg_c::ue_radio_cap_check_request() const { assert_choice_type("UERadioCapabilityCheckRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const write_replace_warning_request_s& ngap_elem_procs_class_minus1_o::init_msg_c::write_replace_warning_request() const +const write_replace_warning_request_s& ngap_elem_procs_o::init_msg_c::write_replace_warning_request() const { assert_choice_type("WriteReplaceWarningRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -void ngap_elem_procs_class_minus1_o::init_msg_c::destroy_() +const amf_status_ind_s& ngap_elem_procs_o::init_msg_c::amf_status_ind() const +{ + assert_choice_type("AMFStatusIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const cell_traffic_trace_s& ngap_elem_procs_o::init_msg_c::cell_traffic_trace() const +{ + assert_choice_type("CellTrafficTrace", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const deactiv_trace_s& ngap_elem_procs_o::init_msg_c::deactiv_trace() const +{ + assert_choice_type("DeactivateTrace", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const dl_nas_transport_s& ngap_elem_procs_o::init_msg_c::dl_nas_transport() const +{ + assert_choice_type("DownlinkNASTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const dl_non_ueassociated_nrp_pa_transport_s& +ngap_elem_procs_o::init_msg_c::dl_non_ueassociated_nrp_pa_transport() const +{ + assert_choice_type("DownlinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const dl_ran_cfg_transfer_s& ngap_elem_procs_o::init_msg_c::dl_ran_cfg_transfer() const +{ + assert_choice_type("DownlinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const dl_ran_status_transfer_s& ngap_elem_procs_o::init_msg_c::dl_ran_status_transfer() const +{ + assert_choice_type("DownlinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const dl_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::dl_ueassociated_nrp_pa_transport() const +{ + assert_choice_type("DownlinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const error_ind_s& ngap_elem_procs_o::init_msg_c::error_ind() const +{ + assert_choice_type("ErrorIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const ho_notify_s& ngap_elem_procs_o::init_msg_c::ho_notify() const +{ + assert_choice_type("HandoverNotify", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const init_ue_msg_s& ngap_elem_procs_o::init_msg_c::init_ue_msg() const +{ + assert_choice_type("InitialUEMessage", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const location_report_s& ngap_elem_procs_o::init_msg_c::location_report() const +{ + assert_choice_type("LocationReport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const location_report_ctrl_s& ngap_elem_procs_o::init_msg_c::location_report_ctrl() const +{ + assert_choice_type("LocationReportingControl", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const location_report_fail_ind_s& ngap_elem_procs_o::init_msg_c::location_report_fail_ind() const +{ + assert_choice_type("LocationReportingFailureIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const nas_non_delivery_ind_s& ngap_elem_procs_o::init_msg_c::nas_non_delivery_ind() const +{ + assert_choice_type("NASNonDeliveryIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const overload_start_s& ngap_elem_procs_o::init_msg_c::overload_start() const +{ + assert_choice_type("OverloadStart", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const overload_stop_s& ngap_elem_procs_o::init_msg_c::overload_stop() const +{ + assert_choice_type("OverloadStop", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const paging_s& ngap_elem_procs_o::init_msg_c::paging() const +{ + assert_choice_type("Paging", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const pdu_session_res_notify_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_notify() const +{ + assert_choice_type("PDUSessionResourceNotify", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const private_msg_s& ngap_elem_procs_o::init_msg_c::private_msg() const +{ + assert_choice_type("PrivateMessage", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const pws_fail_ind_s& ngap_elem_procs_o::init_msg_c::pws_fail_ind() const +{ + assert_choice_type("PWSFailureIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const pws_restart_ind_s& ngap_elem_procs_o::init_msg_c::pws_restart_ind() const +{ + assert_choice_type("PWSRestartIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const reroute_nas_request_s& ngap_elem_procs_o::init_msg_c::reroute_nas_request() const +{ + assert_choice_type("RerouteNASRequest", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const rrc_inactive_transition_report_s& ngap_elem_procs_o::init_msg_c::rrc_inactive_transition_report() const +{ + assert_choice_type("RRCInactiveTransitionReport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const secondary_rat_data_usage_report_s& ngap_elem_procs_o::init_msg_c::secondary_rat_data_usage_report() const +{ + assert_choice_type("SecondaryRATDataUsageReport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const trace_fail_ind_s& ngap_elem_procs_o::init_msg_c::trace_fail_ind() const +{ + assert_choice_type("TraceFailureIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const trace_start_s& ngap_elem_procs_o::init_msg_c::trace_start() const +{ + assert_choice_type("TraceStart", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const ue_context_release_request_s& ngap_elem_procs_o::init_msg_c::ue_context_release_request() const +{ + assert_choice_type("UEContextReleaseRequest", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const ue_radio_cap_info_ind_s& ngap_elem_procs_o::init_msg_c::ue_radio_cap_info_ind() const +{ + assert_choice_type("UERadioCapabilityInfoIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const uetnla_binding_release_request_s& ngap_elem_procs_o::init_msg_c::uetnla_binding_release_request() const +{ + assert_choice_type("UETNLABindingReleaseRequest", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const ul_nas_transport_s& ngap_elem_procs_o::init_msg_c::ul_nas_transport() const +{ + assert_choice_type("UplinkNASTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const ul_non_ueassociated_nrp_pa_transport_s& +ngap_elem_procs_o::init_msg_c::ul_non_ueassociated_nrp_pa_transport() const +{ + assert_choice_type("UplinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const ul_ran_cfg_transfer_s& ngap_elem_procs_o::init_msg_c::ul_ran_cfg_transfer() const +{ + assert_choice_type("UplinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const ul_ran_status_transfer_s& ngap_elem_procs_o::init_msg_c::ul_ran_status_transfer() const +{ + assert_choice_type("UplinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const ul_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::ul_ueassociated_nrp_pa_transport() const +{ + assert_choice_type("UplinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +void ngap_elem_procs_o::init_msg_c::destroy_() { switch (type_) { case types::amf_cfg_upd: @@ -49838,29 +50218,134 @@ void ngap_elem_procs_class_minus1_o::init_msg_c::destroy_() case types::write_replace_warning_request: c.destroy(); break; - default: - break; - } -} -void ngap_elem_procs_class_minus1_o::init_msg_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::amf_cfg_upd: - c.init(); + case types::amf_status_ind: + c.destroy(); break; - case types::ho_cancel: - c.init(); + case types::cell_traffic_trace: + c.destroy(); break; - case types::ho_required: - c.init(); + case types::deactiv_trace: + c.destroy(); break; - case types::ho_request: - c.init(); + case types::dl_nas_transport: + c.destroy(); break; - case types::init_context_setup_request: - c.init(); + case types::dl_non_ueassociated_nrp_pa_transport: + c.destroy(); + break; + case types::dl_ran_cfg_transfer: + c.destroy(); + break; + case types::dl_ran_status_transfer: + c.destroy(); + break; + case types::dl_ueassociated_nrp_pa_transport: + c.destroy(); + break; + case types::error_ind: + c.destroy(); + break; + case types::ho_notify: + c.destroy(); + break; + case types::init_ue_msg: + c.destroy(); + break; + case types::location_report: + c.destroy(); + break; + case types::location_report_ctrl: + c.destroy(); + break; + case types::location_report_fail_ind: + c.destroy(); + break; + case types::nas_non_delivery_ind: + c.destroy(); + break; + case types::overload_start: + c.destroy(); + break; + case types::overload_stop: + c.destroy(); + break; + case types::paging: + c.destroy(); + break; + case types::pdu_session_res_notify: + c.destroy(); + break; + case types::private_msg: + c.destroy(); + break; + case types::pws_fail_ind: + c.destroy(); + break; + case types::pws_restart_ind: + c.destroy(); + break; + case types::reroute_nas_request: + c.destroy(); + break; + case types::rrc_inactive_transition_report: + c.destroy(); + break; + case types::secondary_rat_data_usage_report: + c.destroy(); + break; + case types::trace_fail_ind: + c.destroy(); + break; + case types::trace_start: + c.destroy(); + break; + case types::ue_context_release_request: + c.destroy(); + break; + case types::ue_radio_cap_info_ind: + c.destroy(); + break; + case types::uetnla_binding_release_request: + c.destroy(); + break; + case types::ul_nas_transport: + c.destroy(); + break; + case types::ul_non_ueassociated_nrp_pa_transport: + c.destroy(); + break; + case types::ul_ran_cfg_transfer: + c.destroy(); + break; + case types::ul_ran_status_transfer: + c.destroy(); + break; + case types::ul_ueassociated_nrp_pa_transport: + c.destroy(); + break; + default: + break; + } +} +void ngap_elem_procs_o::init_msg_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::amf_cfg_upd: + c.init(); + break; + case types::ho_cancel: + c.init(); + break; + case types::ho_required: + c.init(); + break; + case types::ho_request: + c.init(); + break; + case types::init_context_setup_request: + c.init(); break; case types::ng_reset: c.init(); @@ -49901,13 +50386,118 @@ void ngap_elem_procs_class_minus1_o::init_msg_c::set(types::options e) case types::write_replace_warning_request: c.init(); break; + case types::amf_status_ind: + c.init(); + break; + case types::cell_traffic_trace: + c.init(); + break; + case types::deactiv_trace: + c.init(); + break; + case types::dl_nas_transport: + c.init(); + break; + case types::dl_non_ueassociated_nrp_pa_transport: + c.init(); + break; + case types::dl_ran_cfg_transfer: + c.init(); + break; + case types::dl_ran_status_transfer: + c.init(); + break; + case types::dl_ueassociated_nrp_pa_transport: + c.init(); + break; + case types::error_ind: + c.init(); + break; + case types::ho_notify: + c.init(); + break; + case types::init_ue_msg: + c.init(); + break; + case types::location_report: + c.init(); + break; + case types::location_report_ctrl: + c.init(); + break; + case types::location_report_fail_ind: + c.init(); + break; + case types::nas_non_delivery_ind: + c.init(); + break; + case types::overload_start: + c.init(); + break; + case types::overload_stop: + c.init(); + break; + case types::paging: + c.init(); + break; + case types::pdu_session_res_notify: + c.init(); + break; + case types::private_msg: + c.init(); + break; + case types::pws_fail_ind: + c.init(); + break; + case types::pws_restart_ind: + c.init(); + break; + case types::reroute_nas_request: + c.init(); + break; + case types::rrc_inactive_transition_report: + c.init(); + break; + case types::secondary_rat_data_usage_report: + c.init(); + break; + case types::trace_fail_ind: + c.init(); + break; + case types::trace_start: + c.init(); + break; + case types::ue_context_release_request: + c.init(); + break; + case types::ue_radio_cap_info_ind: + c.init(); + break; + case types::uetnla_binding_release_request: + c.init(); + break; + case types::ul_nas_transport: + c.init(); + break; + case types::ul_non_ueassociated_nrp_pa_transport: + c.init(); + break; + case types::ul_ran_cfg_transfer: + c.init(); + break; + case types::ul_ran_status_transfer: + c.init(); + break; + case types::ul_ueassociated_nrp_pa_transport: + c.init(); + break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::init_msg_c"); + log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); } } -ngap_elem_procs_class_minus1_o::init_msg_c::init_msg_c(const ngap_elem_procs_class_minus1_o::init_msg_c& other) +ngap_elem_procs_o::init_msg_c::init_msg_c(const ngap_elem_procs_o::init_msg_c& other) { type_ = other.type(); switch (type_) { @@ -49965,14 +50555,118 @@ ngap_elem_procs_class_minus1_o::init_msg_c::init_msg_c(const ngap_elem_procs_cla case types::write_replace_warning_request: c.init(other.c.get()); break; + case types::amf_status_ind: + c.init(other.c.get()); + break; + case types::cell_traffic_trace: + c.init(other.c.get()); + break; + case types::deactiv_trace: + c.init(other.c.get()); + break; + case types::dl_nas_transport: + c.init(other.c.get()); + break; + case types::dl_non_ueassociated_nrp_pa_transport: + c.init(other.c.get()); + break; + case types::dl_ran_cfg_transfer: + c.init(other.c.get()); + break; + case types::dl_ran_status_transfer: + c.init(other.c.get()); + break; + case types::dl_ueassociated_nrp_pa_transport: + c.init(other.c.get()); + break; + case types::error_ind: + c.init(other.c.get()); + break; + case types::ho_notify: + c.init(other.c.get()); + break; + case types::init_ue_msg: + c.init(other.c.get()); + break; + case types::location_report: + c.init(other.c.get()); + break; + case types::location_report_ctrl: + c.init(other.c.get()); + break; + case types::location_report_fail_ind: + c.init(other.c.get()); + break; + case types::nas_non_delivery_ind: + c.init(other.c.get()); + break; + case types::overload_start: + c.init(other.c.get()); + break; + case types::overload_stop: + c.init(other.c.get()); + break; + case types::paging: + c.init(other.c.get()); + break; + case types::pdu_session_res_notify: + c.init(other.c.get()); + break; + case types::private_msg: + c.init(other.c.get()); + break; + case types::pws_fail_ind: + c.init(other.c.get()); + break; + case types::pws_restart_ind: + c.init(other.c.get()); + break; + case types::reroute_nas_request: + c.init(other.c.get()); + break; + case types::rrc_inactive_transition_report: + c.init(other.c.get()); + break; + case types::secondary_rat_data_usage_report: + c.init(other.c.get()); + break; + case types::trace_fail_ind: + c.init(other.c.get()); + break; + case types::trace_start: + c.init(other.c.get()); + break; + case types::ue_context_release_request: + c.init(other.c.get()); + break; + case types::ue_radio_cap_info_ind: + c.init(other.c.get()); + break; + case types::uetnla_binding_release_request: + c.init(other.c.get()); + break; + case types::ul_nas_transport: + c.init(other.c.get()); + break; + case types::ul_non_ueassociated_nrp_pa_transport: + c.init(other.c.get()); + break; + case types::ul_ran_cfg_transfer: + c.init(other.c.get()); + break; + case types::ul_ran_status_transfer: + c.init(other.c.get()); + break; + case types::ul_ueassociated_nrp_pa_transport: + c.init(other.c.get()); + break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::init_msg_c"); + log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); } } -ngap_elem_procs_class_minus1_o::init_msg_c& ngap_elem_procs_class_minus1_o::init_msg_c:: - operator=(const ngap_elem_procs_class_minus1_o::init_msg_c& other) +ngap_elem_procs_o::init_msg_c& ngap_elem_procs_o::init_msg_c::operator=(const ngap_elem_procs_o::init_msg_c& other) { if (this == &other) { return *this; @@ -50033,15 +50727,120 @@ ngap_elem_procs_class_minus1_o::init_msg_c& ngap_elem_procs_class_minus1_o::init case types::write_replace_warning_request: c.set(other.c.get()); break; + case types::amf_status_ind: + c.set(other.c.get()); + break; + case types::cell_traffic_trace: + c.set(other.c.get()); + break; + case types::deactiv_trace: + c.set(other.c.get()); + break; + case types::dl_nas_transport: + c.set(other.c.get()); + break; + case types::dl_non_ueassociated_nrp_pa_transport: + c.set(other.c.get()); + break; + case types::dl_ran_cfg_transfer: + c.set(other.c.get()); + break; + case types::dl_ran_status_transfer: + c.set(other.c.get()); + break; + case types::dl_ueassociated_nrp_pa_transport: + c.set(other.c.get()); + break; + case types::error_ind: + c.set(other.c.get()); + break; + case types::ho_notify: + c.set(other.c.get()); + break; + case types::init_ue_msg: + c.set(other.c.get()); + break; + case types::location_report: + c.set(other.c.get()); + break; + case types::location_report_ctrl: + c.set(other.c.get()); + break; + case types::location_report_fail_ind: + c.set(other.c.get()); + break; + case types::nas_non_delivery_ind: + c.set(other.c.get()); + break; + case types::overload_start: + c.set(other.c.get()); + break; + case types::overload_stop: + c.set(other.c.get()); + break; + case types::paging: + c.set(other.c.get()); + break; + case types::pdu_session_res_notify: + c.set(other.c.get()); + break; + case types::private_msg: + c.set(other.c.get()); + break; + case types::pws_fail_ind: + c.set(other.c.get()); + break; + case types::pws_restart_ind: + c.set(other.c.get()); + break; + case types::reroute_nas_request: + c.set(other.c.get()); + break; + case types::rrc_inactive_transition_report: + c.set(other.c.get()); + break; + case types::secondary_rat_data_usage_report: + c.set(other.c.get()); + break; + case types::trace_fail_ind: + c.set(other.c.get()); + break; + case types::trace_start: + c.set(other.c.get()); + break; + case types::ue_context_release_request: + c.set(other.c.get()); + break; + case types::ue_radio_cap_info_ind: + c.set(other.c.get()); + break; + case types::uetnla_binding_release_request: + c.set(other.c.get()); + break; + case types::ul_nas_transport: + c.set(other.c.get()); + break; + case types::ul_non_ueassociated_nrp_pa_transport: + c.set(other.c.get()); + break; + case types::ul_ran_cfg_transfer: + c.set(other.c.get()); + break; + case types::ul_ran_status_transfer: + c.set(other.c.get()); + break; + case types::ul_ueassociated_nrp_pa_transport: + c.set(other.c.get()); + break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::init_msg_c"); + log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); } return *this; } -void ngap_elem_procs_class_minus1_o::init_msg_c::to_json(json_writer& j) const +void ngap_elem_procs_o::init_msg_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { @@ -50117,56 +50916,196 @@ void ngap_elem_procs_class_minus1_o::init_msg_c::to_json(json_writer& j) const j.write_fieldname("WriteReplaceWarningRequest"); c.get().to_json(j); break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::init_msg_c"); - } - j.end_obj(); -} -SRSASN_CODE ngap_elem_procs_class_minus1_o::init_msg_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - switch (type_) { - case types::amf_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); + case types::amf_status_ind: + j.write_fieldname("AMFStatusIndication"); + c.get().to_json(j); break; - case types::ho_cancel: - HANDLE_CODE(c.get().pack(bref)); + case types::cell_traffic_trace: + j.write_fieldname("CellTrafficTrace"); + c.get().to_json(j); break; - case types::ho_required: - HANDLE_CODE(c.get().pack(bref)); + case types::deactiv_trace: + j.write_fieldname("DeactivateTrace"); + c.get().to_json(j); break; - case types::ho_request: - HANDLE_CODE(c.get().pack(bref)); + case types::dl_nas_transport: + j.write_fieldname("DownlinkNASTransport"); + c.get().to_json(j); break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().pack(bref)); + case types::dl_non_ueassociated_nrp_pa_transport: + j.write_fieldname("DownlinkNonUEAssociatedNRPPaTransport"); + c.get().to_json(j); break; - case types::ng_reset: - HANDLE_CODE(c.get().pack(bref)); + case types::dl_ran_cfg_transfer: + j.write_fieldname("DownlinkRANConfigurationTransfer"); + c.get().to_json(j); break; - case types::ng_setup_request: - HANDLE_CODE(c.get().pack(bref)); + case types::dl_ran_status_transfer: + j.write_fieldname("DownlinkRANStatusTransfer"); + c.get().to_json(j); break; - case types::path_switch_request: - HANDLE_CODE(c.get().pack(bref)); + case types::dl_ueassociated_nrp_pa_transport: + j.write_fieldname("DownlinkUEAssociatedNRPPaTransport"); + c.get().to_json(j); break; - case types::pdu_session_res_modify_request: - HANDLE_CODE(c.get().pack(bref)); + case types::error_ind: + j.write_fieldname("ErrorIndication"); + c.get().to_json(j); break; - case types::pdu_session_res_modify_ind: - HANDLE_CODE(c.get().pack(bref)); + case types::ho_notify: + j.write_fieldname("HandoverNotify"); + c.get().to_json(j); break; - case types::pdu_session_res_release_cmd: - HANDLE_CODE(c.get().pack(bref)); + case types::init_ue_msg: + j.write_fieldname("InitialUEMessage"); + c.get().to_json(j); break; - case types::pdu_session_res_setup_request: - HANDLE_CODE(c.get().pack(bref)); + case types::location_report: + j.write_fieldname("LocationReport"); + c.get().to_json(j); break; - case types::pws_cancel_request: - HANDLE_CODE(c.get().pack(bref)); + case types::location_report_ctrl: + j.write_fieldname("LocationReportingControl"); + c.get().to_json(j); break; - case types::ran_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); + case types::location_report_fail_ind: + j.write_fieldname("LocationReportingFailureIndication"); + c.get().to_json(j); + break; + case types::nas_non_delivery_ind: + j.write_fieldname("NASNonDeliveryIndication"); + c.get().to_json(j); + break; + case types::overload_start: + j.write_fieldname("OverloadStart"); + c.get().to_json(j); + break; + case types::overload_stop: + j.write_fieldname("OverloadStop"); + c.get().to_json(j); + break; + case types::paging: + j.write_fieldname("Paging"); + c.get().to_json(j); + break; + case types::pdu_session_res_notify: + j.write_fieldname("PDUSessionResourceNotify"); + c.get().to_json(j); + break; + case types::private_msg: + j.write_fieldname("PrivateMessage"); + c.get().to_json(j); + break; + case types::pws_fail_ind: + j.write_fieldname("PWSFailureIndication"); + c.get().to_json(j); + break; + case types::pws_restart_ind: + j.write_fieldname("PWSRestartIndication"); + c.get().to_json(j); + break; + case types::reroute_nas_request: + j.write_fieldname("RerouteNASRequest"); + c.get().to_json(j); + break; + case types::rrc_inactive_transition_report: + j.write_fieldname("RRCInactiveTransitionReport"); + c.get().to_json(j); + break; + case types::secondary_rat_data_usage_report: + j.write_fieldname("SecondaryRATDataUsageReport"); + c.get().to_json(j); + break; + case types::trace_fail_ind: + j.write_fieldname("TraceFailureIndication"); + c.get().to_json(j); + break; + case types::trace_start: + j.write_fieldname("TraceStart"); + c.get().to_json(j); + break; + case types::ue_context_release_request: + j.write_fieldname("UEContextReleaseRequest"); + c.get().to_json(j); + break; + case types::ue_radio_cap_info_ind: + j.write_fieldname("UERadioCapabilityInfoIndication"); + c.get().to_json(j); + break; + case types::uetnla_binding_release_request: + j.write_fieldname("UETNLABindingReleaseRequest"); + c.get().to_json(j); + break; + case types::ul_nas_transport: + j.write_fieldname("UplinkNASTransport"); + c.get().to_json(j); + break; + case types::ul_non_ueassociated_nrp_pa_transport: + j.write_fieldname("UplinkNonUEAssociatedNRPPaTransport"); + c.get().to_json(j); + break; + case types::ul_ran_cfg_transfer: + j.write_fieldname("UplinkRANConfigurationTransfer"); + c.get().to_json(j); + break; + case types::ul_ran_status_transfer: + j.write_fieldname("UplinkRANStatusTransfer"); + c.get().to_json(j); + break; + case types::ul_ueassociated_nrp_pa_transport: + j.write_fieldname("UplinkUEAssociatedNRPPaTransport"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); + } + j.end_obj(); +} +SRSASN_CODE ngap_elem_procs_o::init_msg_c::pack(bit_ref& bref) const +{ + varlength_field_pack_guard varlen_scope(bref, true); + switch (type_) { + case types::amf_cfg_upd: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ho_cancel: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ho_required: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ho_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::init_context_setup_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ng_reset: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ng_setup_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::path_switch_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pdu_session_res_modify_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pdu_session_res_modify_ind: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pdu_session_res_release_cmd: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pdu_session_res_setup_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pws_cancel_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ran_cfg_upd: + HANDLE_CODE(c.get().pack(bref)); break; case types::ue_context_mod_request: HANDLE_CODE(c.get().pack(bref)); @@ -50180,13 +51119,118 @@ SRSASN_CODE ngap_elem_procs_class_minus1_o::init_msg_c::pack(bit_ref& bref) cons case types::write_replace_warning_request: HANDLE_CODE(c.get().pack(bref)); break; + case types::amf_status_ind: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::cell_traffic_trace: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::deactiv_trace: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::dl_nas_transport: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::dl_non_ueassociated_nrp_pa_transport: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::dl_ran_cfg_transfer: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::dl_ran_status_transfer: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::dl_ueassociated_nrp_pa_transport: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::error_ind: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ho_notify: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::init_ue_msg: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::location_report: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::location_report_ctrl: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::location_report_fail_ind: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::nas_non_delivery_ind: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::overload_start: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::overload_stop: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::paging: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pdu_session_res_notify: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::private_msg: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pws_fail_ind: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pws_restart_ind: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::reroute_nas_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::rrc_inactive_transition_report: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::secondary_rat_data_usage_report: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::trace_fail_ind: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::trace_start: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_context_release_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ue_radio_cap_info_ind: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::uetnla_binding_release_request: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_nas_transport: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_non_ueassociated_nrp_pa_transport: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_ran_cfg_transfer: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_ran_status_transfer: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_ueassociated_nrp_pa_transport: + HANDLE_CODE(c.get().pack(bref)); + break; default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::init_msg_c"); + log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE ngap_elem_procs_class_minus1_o::init_msg_c::unpack(cbit_ref& bref) +SRSASN_CODE ngap_elem_procs_o::init_msg_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); switch (type_) { @@ -50244,6618 +51288,990 @@ SRSASN_CODE ngap_elem_procs_class_minus1_o::init_msg_c::unpack(cbit_ref& bref) case types::write_replace_warning_request: HANDLE_CODE(c.get().unpack(bref)); break; + case types::amf_status_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::cell_traffic_trace: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::deactiv_trace: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::dl_nas_transport: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::dl_non_ueassociated_nrp_pa_transport: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::dl_ran_cfg_transfer: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::dl_ran_status_transfer: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::dl_ueassociated_nrp_pa_transport: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::error_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ho_notify: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::init_ue_msg: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::location_report: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::location_report_ctrl: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::location_report_fail_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::nas_non_delivery_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::overload_start: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::overload_stop: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::paging: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pdu_session_res_notify: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::private_msg: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pws_fail_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pws_restart_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::reroute_nas_request: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::rrc_inactive_transition_report: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::secondary_rat_data_usage_report: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::trace_fail_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::trace_start: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_context_release_request: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ue_radio_cap_info_ind: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::uetnla_binding_release_request: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_nas_transport: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_non_ueassociated_nrp_pa_transport: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_ran_cfg_transfer: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_ran_status_transfer: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_ueassociated_nrp_pa_transport: + HANDLE_CODE(c.get().unpack(bref)); + break; default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::init_msg_c"); + log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -std::string ngap_elem_procs_class_minus1_o::init_msg_c::types_opts::to_string() const +std::string ngap_elem_procs_o::init_msg_c::types_opts::to_string() const { - static constexpr const char* options[] = {"AMFConfigurationUpdate", - "HandoverCancel", - "HandoverRequired", - "HandoverRequest", - "InitialContextSetupRequest", - "NGReset", - "NGSetupRequest", - "PathSwitchRequest", - "PDUSessionResourceModifyRequest", - "PDUSessionResourceModifyIndication", - "PDUSessionResourceReleaseCommand", - "PDUSessionResourceSetupRequest", - "PWSCancelRequest", - "RANConfigurationUpdate", - "UEContextModificationRequest", - "UEContextReleaseCommand", - "UERadioCapabilityCheckRequest", - "WriteReplaceWarningRequest"}; - return convert_enum_idx(options, 18, value, "ngap_elem_procs_class_minus1_o::init_msg_c::types"); + static const char* options[] = {"AMFConfigurationUpdate", + "HandoverCancel", + "HandoverRequired", + "HandoverRequest", + "InitialContextSetupRequest", + "NGReset", + "NGSetupRequest", + "PathSwitchRequest", + "PDUSessionResourceModifyRequest", + "PDUSessionResourceModifyIndication", + "PDUSessionResourceReleaseCommand", + "PDUSessionResourceSetupRequest", + "PWSCancelRequest", + "RANConfigurationUpdate", + "UEContextModificationRequest", + "UEContextReleaseCommand", + "UERadioCapabilityCheckRequest", + "WriteReplaceWarningRequest", + "AMFStatusIndication", + "CellTrafficTrace", + "DeactivateTrace", + "DownlinkNASTransport", + "DownlinkNonUEAssociatedNRPPaTransport", + "DownlinkRANConfigurationTransfer", + "DownlinkRANStatusTransfer", + "DownlinkUEAssociatedNRPPaTransport", + "ErrorIndication", + "HandoverNotify", + "InitialUEMessage", + "LocationReport", + "LocationReportingControl", + "LocationReportingFailureIndication", + "NASNonDeliveryIndication", + "OverloadStart", + "OverloadStop", + "Paging", + "PDUSessionResourceNotify", + "PrivateMessage", + "PWSFailureIndication", + "PWSRestartIndication", + "RerouteNASRequest", + "RRCInactiveTransitionReport", + "SecondaryRATDataUsageReport", + "TraceFailureIndication", + "TraceStart", + "UEContextReleaseRequest", + "UERadioCapabilityInfoIndication", + "UETNLABindingReleaseRequest", + "UplinkNASTransport", + "UplinkNonUEAssociatedNRPPaTransport", + "UplinkRANConfigurationTransfer", + "UplinkRANStatusTransfer", + "UplinkUEAssociatedNRPPaTransport"}; + return convert_enum_idx(options, 53, value, "ngap_elem_procs_o::init_msg_c::types"); } // SuccessfulOutcome ::= OPEN TYPE -amf_cfg_upd_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::amf_cfg_upd() +amf_cfg_upd_ack_s& ngap_elem_procs_o::successful_outcome_c::amf_cfg_upd_ack() { assert_choice_type("AMFConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ho_cancel_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ho_cancel() +ho_cancel_ack_s& ngap_elem_procs_o::successful_outcome_c::ho_cancel_ack() { assert_choice_type("HandoverCancelAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ho_cmd_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ho_required() +ho_cmd_s& ngap_elem_procs_o::successful_outcome_c::ho_cmd() { assert_choice_type("HandoverCommand", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ho_request_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ho_request() +ho_request_ack_s& ngap_elem_procs_o::successful_outcome_c::ho_request_ack() { assert_choice_type("HandoverRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -init_context_setup_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::init_context_setup_request() +init_context_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::init_context_setup_resp() { assert_choice_type("InitialContextSetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ng_reset_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ng_reset() +ng_reset_ack_s& ngap_elem_procs_o::successful_outcome_c::ng_reset_ack() { assert_choice_type("NGResetAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ng_setup_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ng_setup_request() +ng_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::ng_setup_resp() { assert_choice_type("NGSetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -path_switch_request_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::path_switch_request() +path_switch_request_ack_s& ngap_elem_procs_o::successful_outcome_c::path_switch_request_ack() { assert_choice_type("PathSwitchRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -pdu_session_res_modify_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::pdu_session_res_modify_request() +pdu_session_res_modify_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_modify_resp() { assert_choice_type("PDUSessionResourceModifyResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -pdu_session_res_modify_confirm_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::pdu_session_res_modify_ind() +pdu_session_res_modify_confirm_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_modify_confirm() { assert_choice_type("PDUSessionResourceModifyConfirm", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -pdu_session_res_release_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::pdu_session_res_release_cmd() +pdu_session_res_release_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_release_resp() { assert_choice_type("PDUSessionResourceReleaseResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -pdu_session_res_setup_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::pdu_session_res_setup_request() +pdu_session_res_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_setup_resp() { assert_choice_type("PDUSessionResourceSetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -pws_cancel_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::pws_cancel_request() +pws_cancel_resp_s& ngap_elem_procs_o::successful_outcome_c::pws_cancel_resp() { assert_choice_type("PWSCancelResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ran_cfg_upd_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ran_cfg_upd() +ran_cfg_upd_ack_s& ngap_elem_procs_o::successful_outcome_c::ran_cfg_upd_ack() { assert_choice_type("RANConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ue_context_mod_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ue_context_mod_request() +ue_context_mod_resp_s& ngap_elem_procs_o::successful_outcome_c::ue_context_mod_resp() { assert_choice_type("UEContextModificationResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ue_context_release_complete_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ue_context_release_cmd() +ue_context_release_complete_s& ngap_elem_procs_o::successful_outcome_c::ue_context_release_complete() { assert_choice_type("UEContextReleaseComplete", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ue_radio_cap_check_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ue_radio_cap_check_request() +ue_radio_cap_check_resp_s& ngap_elem_procs_o::successful_outcome_c::ue_radio_cap_check_resp() { assert_choice_type("UERadioCapabilityCheckResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -write_replace_warning_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::write_replace_warning_request() +write_replace_warning_resp_s& ngap_elem_procs_o::successful_outcome_c::write_replace_warning_resp() { assert_choice_type("WriteReplaceWarningResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const amf_cfg_upd_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::amf_cfg_upd() const +const amf_cfg_upd_ack_s& ngap_elem_procs_o::successful_outcome_c::amf_cfg_upd_ack() const { assert_choice_type("AMFConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ho_cancel_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ho_cancel() const +const ho_cancel_ack_s& ngap_elem_procs_o::successful_outcome_c::ho_cancel_ack() const { assert_choice_type("HandoverCancelAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ho_cmd_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ho_required() const +const ho_cmd_s& ngap_elem_procs_o::successful_outcome_c::ho_cmd() const { assert_choice_type("HandoverCommand", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ho_request_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ho_request() const +const ho_request_ack_s& ngap_elem_procs_o::successful_outcome_c::ho_request_ack() const { assert_choice_type("HandoverRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const init_context_setup_resp_s& -ngap_elem_procs_class_minus1_o::successful_outcome_c::init_context_setup_request() const +const init_context_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::init_context_setup_resp() const { assert_choice_type("InitialContextSetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ng_reset_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ng_reset() const +const ng_reset_ack_s& ngap_elem_procs_o::successful_outcome_c::ng_reset_ack() const { assert_choice_type("NGResetAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ng_setup_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ng_setup_request() const +const ng_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::ng_setup_resp() const { assert_choice_type("NGSetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const path_switch_request_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::path_switch_request() const +const path_switch_request_ack_s& ngap_elem_procs_o::successful_outcome_c::path_switch_request_ack() const { assert_choice_type("PathSwitchRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const pdu_session_res_modify_resp_s& -ngap_elem_procs_class_minus1_o::successful_outcome_c::pdu_session_res_modify_request() const +const pdu_session_res_modify_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_modify_resp() const { assert_choice_type("PDUSessionResourceModifyResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const pdu_session_res_modify_confirm_s& -ngap_elem_procs_class_minus1_o::successful_outcome_c::pdu_session_res_modify_ind() const +const pdu_session_res_modify_confirm_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_modify_confirm() const { assert_choice_type("PDUSessionResourceModifyConfirm", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const pdu_session_res_release_resp_s& -ngap_elem_procs_class_minus1_o::successful_outcome_c::pdu_session_res_release_cmd() const +const pdu_session_res_release_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_release_resp() const { assert_choice_type("PDUSessionResourceReleaseResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const pdu_session_res_setup_resp_s& -ngap_elem_procs_class_minus1_o::successful_outcome_c::pdu_session_res_setup_request() const +const pdu_session_res_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_setup_resp() const { assert_choice_type("PDUSessionResourceSetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const pws_cancel_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::pws_cancel_request() const +const pws_cancel_resp_s& ngap_elem_procs_o::successful_outcome_c::pws_cancel_resp() const { assert_choice_type("PWSCancelResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ran_cfg_upd_ack_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ran_cfg_upd() const +const ran_cfg_upd_ack_s& ngap_elem_procs_o::successful_outcome_c::ran_cfg_upd_ack() const { assert_choice_type("RANConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ue_context_mod_resp_s& ngap_elem_procs_class_minus1_o::successful_outcome_c::ue_context_mod_request() const +const ue_context_mod_resp_s& ngap_elem_procs_o::successful_outcome_c::ue_context_mod_resp() const { assert_choice_type("UEContextModificationResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ue_context_release_complete_s& -ngap_elem_procs_class_minus1_o::successful_outcome_c::ue_context_release_cmd() const +const ue_context_release_complete_s& ngap_elem_procs_o::successful_outcome_c::ue_context_release_complete() const { assert_choice_type("UEContextReleaseComplete", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ue_radio_cap_check_resp_s& -ngap_elem_procs_class_minus1_o::successful_outcome_c::ue_radio_cap_check_request() const +const ue_radio_cap_check_resp_s& ngap_elem_procs_o::successful_outcome_c::ue_radio_cap_check_resp() const { assert_choice_type("UERadioCapabilityCheckResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const write_replace_warning_resp_s& -ngap_elem_procs_class_minus1_o::successful_outcome_c::write_replace_warning_request() const +const write_replace_warning_resp_s& ngap_elem_procs_o::successful_outcome_c::write_replace_warning_resp() const { assert_choice_type("WriteReplaceWarningResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -void ngap_elem_procs_class_minus1_o::successful_outcome_c::destroy_() +void ngap_elem_procs_o::successful_outcome_c::destroy_() { switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_ack: c.destroy(); break; - case types::ho_cancel: + case types::ho_cancel_ack: c.destroy(); break; - case types::ho_required: + case types::ho_cmd: c.destroy(); break; - case types::ho_request: + case types::ho_request_ack: c.destroy(); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: c.destroy(); break; - case types::ng_reset: + case types::ng_reset_ack: c.destroy(); break; - case types::ng_setup_request: + case types::ng_setup_resp: c.destroy(); break; - case types::path_switch_request: + case types::path_switch_request_ack: c.destroy(); break; - case types::pdu_session_res_modify_request: + case types::pdu_session_res_modify_resp: c.destroy(); break; - case types::pdu_session_res_modify_ind: + case types::pdu_session_res_modify_confirm: c.destroy(); break; - case types::pdu_session_res_release_cmd: + case types::pdu_session_res_release_resp: c.destroy(); break; - case types::pdu_session_res_setup_request: + case types::pdu_session_res_setup_resp: c.destroy(); break; - case types::pws_cancel_request: + case types::pws_cancel_resp: c.destroy(); break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_ack: c.destroy(); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: c.destroy(); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: c.destroy(); break; - case types::ue_radio_cap_check_request: + case types::ue_radio_cap_check_resp: c.destroy(); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: c.destroy(); break; default: break; } } -void ngap_elem_procs_class_minus1_o::successful_outcome_c::set(types::options e) +void ngap_elem_procs_o::successful_outcome_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_ack: c.init(); break; - case types::ho_cancel: + case types::ho_cancel_ack: c.init(); break; - case types::ho_required: + case types::ho_cmd: c.init(); break; - case types::ho_request: + case types::ho_request_ack: c.init(); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: c.init(); break; - case types::ng_reset: + case types::ng_reset_ack: c.init(); break; - case types::ng_setup_request: + case types::ng_setup_resp: c.init(); break; - case types::path_switch_request: + case types::path_switch_request_ack: c.init(); break; - case types::pdu_session_res_modify_request: + case types::pdu_session_res_modify_resp: c.init(); break; - case types::pdu_session_res_modify_ind: + case types::pdu_session_res_modify_confirm: c.init(); break; - case types::pdu_session_res_release_cmd: + case types::pdu_session_res_release_resp: c.init(); break; - case types::pdu_session_res_setup_request: + case types::pdu_session_res_setup_resp: c.init(); break; - case types::pws_cancel_request: + case types::pws_cancel_resp: c.init(); break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_ack: c.init(); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: c.init(); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: c.init(); break; - case types::ue_radio_cap_check_request: + case types::ue_radio_cap_check_resp: c.init(); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::successful_outcome_c"); + log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); } } -ngap_elem_procs_class_minus1_o::successful_outcome_c::successful_outcome_c( - const ngap_elem_procs_class_minus1_o::successful_outcome_c& other) +ngap_elem_procs_o::successful_outcome_c::successful_outcome_c(const ngap_elem_procs_o::successful_outcome_c& other) { type_ = other.type(); switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_ack: c.init(other.c.get()); break; - case types::ho_cancel: + case types::ho_cancel_ack: c.init(other.c.get()); break; - case types::ho_required: + case types::ho_cmd: c.init(other.c.get()); break; - case types::ho_request: + case types::ho_request_ack: c.init(other.c.get()); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: c.init(other.c.get()); break; - case types::ng_reset: + case types::ng_reset_ack: c.init(other.c.get()); break; - case types::ng_setup_request: + case types::ng_setup_resp: c.init(other.c.get()); break; - case types::path_switch_request: + case types::path_switch_request_ack: c.init(other.c.get()); break; - case types::pdu_session_res_modify_request: + case types::pdu_session_res_modify_resp: c.init(other.c.get()); break; - case types::pdu_session_res_modify_ind: + case types::pdu_session_res_modify_confirm: c.init(other.c.get()); break; - case types::pdu_session_res_release_cmd: + case types::pdu_session_res_release_resp: c.init(other.c.get()); break; - case types::pdu_session_res_setup_request: + case types::pdu_session_res_setup_resp: c.init(other.c.get()); break; - case types::pws_cancel_request: + case types::pws_cancel_resp: c.init(other.c.get()); break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_ack: c.init(other.c.get()); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: c.init(other.c.get()); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: c.init(other.c.get()); break; - case types::ue_radio_cap_check_request: + case types::ue_radio_cap_check_resp: c.init(other.c.get()); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::successful_outcome_c"); + log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); } } -ngap_elem_procs_class_minus1_o::successful_outcome_c& ngap_elem_procs_class_minus1_o::successful_outcome_c:: - operator=(const ngap_elem_procs_class_minus1_o::successful_outcome_c& other) +ngap_elem_procs_o::successful_outcome_c& ngap_elem_procs_o::successful_outcome_c:: + operator=(const ngap_elem_procs_o::successful_outcome_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_ack: c.set(other.c.get()); break; - case types::ho_cancel: + case types::ho_cancel_ack: c.set(other.c.get()); break; - case types::ho_required: + case types::ho_cmd: c.set(other.c.get()); break; - case types::ho_request: + case types::ho_request_ack: c.set(other.c.get()); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: c.set(other.c.get()); break; - case types::ng_reset: + case types::ng_reset_ack: c.set(other.c.get()); break; - case types::ng_setup_request: + case types::ng_setup_resp: c.set(other.c.get()); break; - case types::path_switch_request: + case types::path_switch_request_ack: c.set(other.c.get()); break; - case types::pdu_session_res_modify_request: + case types::pdu_session_res_modify_resp: c.set(other.c.get()); break; - case types::pdu_session_res_modify_ind: + case types::pdu_session_res_modify_confirm: c.set(other.c.get()); break; - case types::pdu_session_res_release_cmd: + case types::pdu_session_res_release_resp: c.set(other.c.get()); break; - case types::pdu_session_res_setup_request: + case types::pdu_session_res_setup_resp: c.set(other.c.get()); break; - case types::pws_cancel_request: + case types::pws_cancel_resp: c.set(other.c.get()); break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_ack: c.set(other.c.get()); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: c.set(other.c.get()); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: c.set(other.c.get()); break; - case types::ue_radio_cap_check_request: + case types::ue_radio_cap_check_resp: c.set(other.c.get()); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::successful_outcome_c"); + log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); } return *this; } -void ngap_elem_procs_class_minus1_o::successful_outcome_c::to_json(json_writer& j) const +void ngap_elem_procs_o::successful_outcome_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_ack: j.write_fieldname("AMFConfigurationUpdateAcknowledge"); c.get().to_json(j); break; - case types::ho_cancel: + case types::ho_cancel_ack: j.write_fieldname("HandoverCancelAcknowledge"); c.get().to_json(j); break; - case types::ho_required: + case types::ho_cmd: j.write_fieldname("HandoverCommand"); c.get().to_json(j); break; - case types::ho_request: + case types::ho_request_ack: j.write_fieldname("HandoverRequestAcknowledge"); c.get().to_json(j); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: j.write_fieldname("InitialContextSetupResponse"); c.get().to_json(j); break; - case types::ng_reset: + case types::ng_reset_ack: j.write_fieldname("NGResetAcknowledge"); c.get().to_json(j); break; - case types::ng_setup_request: + case types::ng_setup_resp: j.write_fieldname("NGSetupResponse"); c.get().to_json(j); break; - case types::path_switch_request: + case types::path_switch_request_ack: j.write_fieldname("PathSwitchRequestAcknowledge"); c.get().to_json(j); break; - case types::pdu_session_res_modify_request: + case types::pdu_session_res_modify_resp: j.write_fieldname("PDUSessionResourceModifyResponse"); c.get().to_json(j); break; - case types::pdu_session_res_modify_ind: + case types::pdu_session_res_modify_confirm: j.write_fieldname("PDUSessionResourceModifyConfirm"); c.get().to_json(j); break; - case types::pdu_session_res_release_cmd: + case types::pdu_session_res_release_resp: j.write_fieldname("PDUSessionResourceReleaseResponse"); c.get().to_json(j); break; - case types::pdu_session_res_setup_request: + case types::pdu_session_res_setup_resp: j.write_fieldname("PDUSessionResourceSetupResponse"); c.get().to_json(j); break; - case types::pws_cancel_request: + case types::pws_cancel_resp: j.write_fieldname("PWSCancelResponse"); c.get().to_json(j); break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_ack: j.write_fieldname("RANConfigurationUpdateAcknowledge"); c.get().to_json(j); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: j.write_fieldname("UEContextModificationResponse"); c.get().to_json(j); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: j.write_fieldname("UEContextReleaseComplete"); c.get().to_json(j); break; - case types::ue_radio_cap_check_request: + case types::ue_radio_cap_check_resp: j.write_fieldname("UERadioCapabilityCheckResponse"); c.get().to_json(j); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: j.write_fieldname("WriteReplaceWarningResponse"); c.get().to_json(j); break; default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::successful_outcome_c"); + log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); } j.end_obj(); } -SRSASN_CODE ngap_elem_procs_class_minus1_o::successful_outcome_c::pack(bit_ref& bref) const +SRSASN_CODE ngap_elem_procs_o::successful_outcome_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::ho_cancel: + case types::ho_cancel_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::ho_required: + case types::ho_cmd: HANDLE_CODE(c.get().pack(bref)); break; - case types::ho_request: + case types::ho_request_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::ng_reset: + case types::ng_reset_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::ng_setup_request: + case types::ng_setup_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::path_switch_request: + case types::path_switch_request_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::pdu_session_res_modify_request: + case types::pdu_session_res_modify_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::pdu_session_res_modify_ind: + case types::pdu_session_res_modify_confirm: HANDLE_CODE(c.get().pack(bref)); break; - case types::pdu_session_res_release_cmd: + case types::pdu_session_res_release_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::pdu_session_res_setup_request: + case types::pdu_session_res_setup_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::pws_cancel_request: + case types::pws_cancel_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: HANDLE_CODE(c.get().pack(bref)); break; - case types::ue_radio_cap_check_request: + case types::ue_radio_cap_check_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::successful_outcome_c"); + log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE ngap_elem_procs_class_minus1_o::successful_outcome_c::unpack(cbit_ref& bref) +SRSASN_CODE ngap_elem_procs_o::successful_outcome_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_ack: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ho_cancel: + case types::ho_cancel_ack: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ho_required: + case types::ho_cmd: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ho_request: + case types::ho_request_ack: HANDLE_CODE(c.get().unpack(bref)); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ng_reset: + case types::ng_reset_ack: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ng_setup_request: + case types::ng_setup_resp: HANDLE_CODE(c.get().unpack(bref)); break; - case types::path_switch_request: + case types::path_switch_request_ack: HANDLE_CODE(c.get().unpack(bref)); break; - case types::pdu_session_res_modify_request: + case types::pdu_session_res_modify_resp: HANDLE_CODE(c.get().unpack(bref)); break; - case types::pdu_session_res_modify_ind: + case types::pdu_session_res_modify_confirm: HANDLE_CODE(c.get().unpack(bref)); break; - case types::pdu_session_res_release_cmd: + case types::pdu_session_res_release_resp: HANDLE_CODE(c.get().unpack(bref)); break; - case types::pdu_session_res_setup_request: + case types::pdu_session_res_setup_resp: HANDLE_CODE(c.get().unpack(bref)); break; - case types::pws_cancel_request: + case types::pws_cancel_resp: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_ack: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ue_radio_cap_check_request: + case types::ue_radio_cap_check_resp: HANDLE_CODE(c.get().unpack(bref)); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::successful_outcome_c"); + log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -std::string ngap_elem_procs_class_minus1_o::successful_outcome_c::types_opts::to_string() const +std::string ngap_elem_procs_o::successful_outcome_c::types_opts::to_string() const { - static constexpr const char* options[] = {"AMFConfigurationUpdateAcknowledge", - "HandoverCancelAcknowledge", - "HandoverCommand", - "HandoverRequestAcknowledge", - "InitialContextSetupResponse", - "NGResetAcknowledge", - "NGSetupResponse", - "PathSwitchRequestAcknowledge", - "PDUSessionResourceModifyResponse", - "PDUSessionResourceModifyConfirm", - "PDUSessionResourceReleaseResponse", - "PDUSessionResourceSetupResponse", - "PWSCancelResponse", - "RANConfigurationUpdateAcknowledge", - "UEContextModificationResponse", - "UEContextReleaseComplete", - "UERadioCapabilityCheckResponse", - "WriteReplaceWarningResponse"}; - return convert_enum_idx(options, 18, value, "ngap_elem_procs_class_minus1_o::successful_outcome_c::types"); + static const char* options[] = {"AMFConfigurationUpdateAcknowledge", + "HandoverCancelAcknowledge", + "HandoverCommand", + "HandoverRequestAcknowledge", + "InitialContextSetupResponse", + "NGResetAcknowledge", + "NGSetupResponse", + "PathSwitchRequestAcknowledge", + "PDUSessionResourceModifyResponse", + "PDUSessionResourceModifyConfirm", + "PDUSessionResourceReleaseResponse", + "PDUSessionResourceSetupResponse", + "PWSCancelResponse", + "RANConfigurationUpdateAcknowledge", + "UEContextModificationResponse", + "UEContextReleaseComplete", + "UERadioCapabilityCheckResponse", + "WriteReplaceWarningResponse"}; + return convert_enum_idx(options, 18, value, "ngap_elem_procs_o::successful_outcome_c::types"); } // UnsuccessfulOutcome ::= OPEN TYPE -amf_cfg_upd_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::amf_cfg_upd() +amf_cfg_upd_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::amf_cfg_upd_fail() { assert_choice_type("AMFConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -ho_prep_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ho_required() +ho_prep_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ho_prep_fail() { assert_choice_type("HandoverPreparationFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -ho_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ho_request() +ho_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ho_fail() { assert_choice_type("HandoverFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -init_context_setup_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::init_context_setup_request() +init_context_setup_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::init_context_setup_fail() { assert_choice_type("InitialContextSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -ng_setup_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ng_setup_request() +ng_setup_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ng_setup_fail() { assert_choice_type("NGSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -path_switch_request_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::path_switch_request() +path_switch_request_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::path_switch_request_fail() { assert_choice_type("PathSwitchRequestFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -ran_cfg_upd_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ran_cfg_upd() +ran_cfg_upd_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ran_cfg_upd_fail() { assert_choice_type("RANConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -ue_context_mod_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ue_context_mod_request() +ue_context_mod_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ue_context_mod_fail() { assert_choice_type("UEContextModificationFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const amf_cfg_upd_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::amf_cfg_upd() const +const amf_cfg_upd_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::amf_cfg_upd_fail() const { assert_choice_type("AMFConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const ho_prep_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ho_required() const +const ho_prep_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ho_prep_fail() const { assert_choice_type("HandoverPreparationFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const ho_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ho_request() const +const ho_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ho_fail() const { assert_choice_type("HandoverFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const init_context_setup_fail_s& -ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::init_context_setup_request() const +const init_context_setup_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::init_context_setup_fail() const { assert_choice_type("InitialContextSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const ng_setup_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ng_setup_request() const +const ng_setup_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ng_setup_fail() const { assert_choice_type("NGSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const path_switch_request_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::path_switch_request() const +const path_switch_request_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::path_switch_request_fail() const { assert_choice_type("PathSwitchRequestFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const ran_cfg_upd_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ran_cfg_upd() const +const ran_cfg_upd_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ran_cfg_upd_fail() const { assert_choice_type("RANConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const ue_context_mod_fail_s& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ue_context_mod_request() const +const ue_context_mod_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ue_context_mod_fail() const { assert_choice_type("UEContextModificationFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -void ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::destroy_() +void ngap_elem_procs_o::unsuccessful_outcome_c::destroy_() { switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_fail: c.destroy(); break; - case types::ho_required: + case types::ho_prep_fail: c.destroy(); break; - case types::ho_request: + case types::ho_fail: c.destroy(); break; - case types::init_context_setup_request: + case types::init_context_setup_fail: c.destroy(); break; - case types::ng_setup_request: + case types::ng_setup_fail: c.destroy(); break; - case types::path_switch_request: + case types::path_switch_request_fail: c.destroy(); break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_fail: c.destroy(); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: c.destroy(); break; default: break; } } -void ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::set(types::options e) +void ngap_elem_procs_o::unsuccessful_outcome_c::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_fail: c.init(); break; - case types::ho_cancel: - break; - case types::ho_required: + case types::ho_prep_fail: c.init(); break; - case types::ho_request: + case types::ho_fail: c.init(); break; - case types::init_context_setup_request: + case types::init_context_setup_fail: c.init(); break; - case types::ng_reset: - break; - case types::ng_setup_request: + case types::ng_setup_fail: c.init(); break; - case types::path_switch_request: + case types::path_switch_request_fail: c.init(); break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: - c.init(); - break; - case types::ue_context_mod_request: - c.init(); - break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - } -} -ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::unsuccessful_outcome_c( - const ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::amf_cfg_upd: - c.init(other.c.get()); - break; - case types::ho_cancel: - break; - case types::ho_required: - c.init(other.c.get()); - break; - case types::ho_request: - c.init(other.c.get()); - break; - case types::init_context_setup_request: - c.init(other.c.get()); - break; - case types::ng_reset: - break; - case types::ng_setup_request: - c.init(other.c.get()); - break; - case types::path_switch_request: - c.init(other.c.get()); - break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: - c.init(other.c.get()); - break; - case types::ue_context_mod_request: - c.init(other.c.get()); - break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - } -} -ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c& ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c:: - operator=(const ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::amf_cfg_upd: - c.set(other.c.get()); - break; - case types::ho_cancel: - break; - case types::ho_required: - c.set(other.c.get()); - break; - case types::ho_request: - c.set(other.c.get()); - break; - case types::init_context_setup_request: - c.set(other.c.get()); - break; - case types::ng_reset: - break; - case types::ng_setup_request: - c.set(other.c.get()); - break; - case types::path_switch_request: - c.set(other.c.get()); - break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: - c.set(other.c.get()); - break; - case types::ue_context_mod_request: - c.set(other.c.get()); - break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - } - - return *this; -} -void ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::amf_cfg_upd: - j.write_fieldname("AMFConfigurationUpdateFailure"); - c.get().to_json(j); - break; - case types::ho_cancel: - break; - case types::ho_required: - j.write_fieldname("HandoverPreparationFailure"); - c.get().to_json(j); - break; - case types::ho_request: - j.write_fieldname("HandoverFailure"); - c.get().to_json(j); - break; - case types::init_context_setup_request: - j.write_fieldname("InitialContextSetupFailure"); - c.get().to_json(j); - break; - case types::ng_reset: - break; - case types::ng_setup_request: - j.write_fieldname("NGSetupFailure"); - c.get().to_json(j); - break; - case types::path_switch_request: - j.write_fieldname("PathSwitchRequestFailure"); - c.get().to_json(j); - break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: - j.write_fieldname("RANConfigurationUpdateFailure"); - c.get().to_json(j); - break; - case types::ue_context_mod_request: - j.write_fieldname("UEContextModificationFailure"); - c.get().to_json(j); - break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - } - j.end_obj(); -} -SRSASN_CODE ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - switch (type_) { - case types::amf_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_cancel: - break; - case types::ho_required: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ng_reset: - break; - case types::ng_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - switch (type_) { - case types::amf_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_cancel: - break; - case types::ho_required: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ng_reset: - break; - case types::ng_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::types_opts::to_string() const -{ - static constexpr const char* options[] = {"AMFConfigurationUpdateFailure", - "NULL", - "HandoverPreparationFailure", - "HandoverFailure", - "InitialContextSetupFailure", - "NULL", - "NGSetupFailure", - "PathSwitchRequestFailure", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "RANConfigurationUpdateFailure", - "UEContextModificationFailure", - "NULL", - "NULL", - "NULL"}; - return convert_enum_idx(options, 18, value, "ngap_elem_procs_class_minus1_o::unsuccessful_outcome_c::types"); -} - -// NGAP-ELEMENTARY-PROCEDURES-CLASS-2 ::= OBJECT SET OF NGAP-ELEMENTARY-PROCEDURE -uint16_t ngap_elem_procs_class_minus2_o::idx_to_proc_code(uint32_t idx) -{ - static constexpr const uint16_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 15, 18, 16, 17, 19, 22, 23, 24, - 30, 31, 33, 34, 36, 37, 52, 38, 39, 42, 44, 45, 46, 47, 48, 49, 50}; - return convert_enum_idx(options, 35, idx, "proc_code"); -} -bool ngap_elem_procs_class_minus2_o::is_proc_code_valid(const uint16_t& proc_code) -{ - static constexpr const uint16_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 15, 18, 16, 17, 19, 22, 23, 24, - 30, 31, 33, 34, 36, 37, 52, 38, 39, 42, 44, 45, 46, 47, 48, 49, 50}; - for (uint32_t i = 0; i < 35; ++i) { - if (options[i] == proc_code) { - return true; - } - } - return false; -} -ngap_elem_procs_class_minus2_o::init_msg_c ngap_elem_procs_class_minus2_o::get_init_msg(const uint16_t& proc_code) -{ - init_msg_c ret{}; - switch (proc_code) { - case 1: - ret.set(init_msg_c::types::amf_status_ind); - break; - case 2: - ret.set(init_msg_c::types::cell_traffic_trace); - break; - case 3: - ret.set(init_msg_c::types::deactiv_trace); - break; - case 4: - ret.set(init_msg_c::types::dl_nas_transport); - break; - case 5: - ret.set(init_msg_c::types::dl_non_ueassociated_nrp_pa_transport); - break; - case 6: - ret.set(init_msg_c::types::dl_ran_cfg_transfer); - break; - case 7: - ret.set(init_msg_c::types::dl_ran_status_transfer); - break; - case 8: - ret.set(init_msg_c::types::dl_ueassociated_nrp_pa_transport); - break; - case 9: - ret.set(init_msg_c::types::error_ind); - break; - case 11: - ret.set(init_msg_c::types::ho_notify); - break; - case 15: - ret.set(init_msg_c::types::init_ue_msg); - break; - case 18: - ret.set(init_msg_c::types::location_report); - break; - case 16: - ret.set(init_msg_c::types::location_report_ctrl); - break; - case 17: - ret.set(init_msg_c::types::location_report_fail_ind); - break; - case 19: - ret.set(init_msg_c::types::nas_non_delivery_ind); - break; - case 22: - ret.set(init_msg_c::types::overload_start); - break; - case 23: - ret.set(init_msg_c::types::overload_stop); - break; - case 24: - ret.set(init_msg_c::types::paging); - break; - case 30: - ret.set(init_msg_c::types::pdu_session_res_notify); - break; - case 31: - ret.set(init_msg_c::types::private_msg); - break; - case 33: - ret.set(init_msg_c::types::pws_fail_ind); - break; - case 34: - ret.set(init_msg_c::types::pws_restart_ind); - break; - case 36: - ret.set(init_msg_c::types::reroute_nas_request); - break; - case 37: - ret.set(init_msg_c::types::rrc_inactive_transition_report); - break; - case 52: - ret.set(init_msg_c::types::secondary_rat_data_usage_report); - break; - case 38: - ret.set(init_msg_c::types::trace_fail_ind); - break; - case 39: - ret.set(init_msg_c::types::trace_start); - break; - case 42: - ret.set(init_msg_c::types::ue_context_release_request); - break; - case 44: - ret.set(init_msg_c::types::ue_radio_cap_info_ind); - break; - case 45: - ret.set(init_msg_c::types::uetnla_binding_release_request); - break; - case 46: - ret.set(init_msg_c::types::ul_nas_transport); - break; - case 47: - ret.set(init_msg_c::types::ul_non_ueassociated_nrp_pa_transport); - break; - case 48: - ret.set(init_msg_c::types::ul_ran_cfg_transfer); - break; - case 49: - ret.set(init_msg_c::types::ul_ran_status_transfer); - break; - case 50: - ret.set(init_msg_c::types::ul_ueassociated_nrp_pa_transport); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -ngap_elem_procs_class_minus2_o::successful_outcome_c -ngap_elem_procs_class_minus2_o::get_successful_outcome(const uint16_t& proc_code) -{ - successful_outcome_c ret{}; - switch (proc_code) { - case 1: - break; - case 2: - break; - case 3: - break; - case 4: - break; - case 5: - break; - case 6: - break; - case 7: - break; - case 8: - break; - case 9: - break; - case 11: - break; - case 15: - break; - case 18: - break; - case 16: - break; - case 17: - break; - case 19: - break; - case 22: - break; - case 23: - break; - case 24: - break; - case 30: - break; - case 31: - break; - case 33: - break; - case 34: - break; - case 36: - break; - case 37: - break; - case 52: - break; - case 38: - break; - case 39: - break; - case 42: - break; - case 44: - break; - case 45: - break; - case 46: - break; - case 47: - break; - case 48: - break; - case 49: - break; - case 50: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -ngap_elem_procs_class_minus2_o::unsuccessful_outcome_c -ngap_elem_procs_class_minus2_o::get_unsuccessful_outcome(const uint16_t& proc_code) -{ - unsuccessful_outcome_c ret{}; - switch (proc_code) { - case 1: - break; - case 2: - break; - case 3: - break; - case 4: - break; - case 5: - break; - case 6: - break; - case 7: - break; - case 8: - break; - case 9: - break; - case 11: - break; - case 15: - break; - case 18: - break; - case 16: - break; - case 17: - break; - case 19: - break; - case 22: - break; - case 23: - break; - case 24: - break; - case 30: - break; - case 31: - break; - case 33: - break; - case 34: - break; - case 36: - break; - case 37: - break; - case 52: - break; - case 38: - break; - case 39: - break; - case 42: - break; - case 44: - break; - case 45: - break; - case 46: - break; - case 47: - break; - case 48: - break; - case 49: - break; - case 50: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -crit_e ngap_elem_procs_class_minus2_o::get_crit(const uint16_t& proc_code) -{ - switch (proc_code) { - case 1: - return crit_e::ignore; - case 2: - return crit_e::ignore; - case 3: - return crit_e::ignore; - case 4: - return crit_e::ignore; - case 5: - return crit_e::ignore; - case 6: - return crit_e::ignore; - case 7: - return crit_e::ignore; - case 8: - return crit_e::ignore; - case 9: - return crit_e::ignore; - case 11: - return crit_e::ignore; - case 15: - return crit_e::ignore; - case 18: - return crit_e::ignore; - case 16: - return crit_e::ignore; - case 17: - return crit_e::ignore; - case 19: - return crit_e::ignore; - case 22: - return crit_e::ignore; - case 23: - return crit_e::reject; - case 24: - return crit_e::ignore; - case 30: - return crit_e::ignore; - case 31: - return crit_e::ignore; - case 33: - return crit_e::ignore; - case 34: - return crit_e::ignore; - case 36: - return crit_e::reject; - case 37: - return crit_e::ignore; - case 52: - return crit_e::ignore; - case 38: - return crit_e::ignore; - case 39: - return crit_e::ignore; - case 42: - return crit_e::ignore; - case 44: - return crit_e::ignore; - case 45: - return crit_e::ignore; - case 46: - return crit_e::ignore; - case 47: - return crit_e::ignore; - case 48: - return crit_e::ignore; - case 49: - return crit_e::ignore; - case 50: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return crit_e(); -} - -// InitiatingMessage ::= OPEN TYPE -amf_status_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::amf_status_ind() -{ - assert_choice_type("AMFStatusIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -cell_traffic_trace_s& ngap_elem_procs_class_minus2_o::init_msg_c::cell_traffic_trace() -{ - assert_choice_type("CellTrafficTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -deactiv_trace_s& ngap_elem_procs_class_minus2_o::init_msg_c::deactiv_trace() -{ - assert_choice_type("DeactivateTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_nas_transport_s& ngap_elem_procs_class_minus2_o::init_msg_c::dl_nas_transport() -{ - assert_choice_type("DownlinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_non_ueassociated_nrp_pa_transport_s& -ngap_elem_procs_class_minus2_o::init_msg_c::dl_non_ueassociated_nrp_pa_transport() -{ - assert_choice_type("DownlinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_ran_cfg_transfer_s& ngap_elem_procs_class_minus2_o::init_msg_c::dl_ran_cfg_transfer() -{ - assert_choice_type("DownlinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_ran_status_transfer_s& ngap_elem_procs_class_minus2_o::init_msg_c::dl_ran_status_transfer() -{ - assert_choice_type("DownlinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_ueassociated_nrp_pa_transport_s& ngap_elem_procs_class_minus2_o::init_msg_c::dl_ueassociated_nrp_pa_transport() -{ - assert_choice_type("DownlinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -error_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::error_ind() -{ - assert_choice_type("ErrorIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ho_notify_s& ngap_elem_procs_class_minus2_o::init_msg_c::ho_notify() -{ - assert_choice_type("HandoverNotify", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -init_ue_msg_s& ngap_elem_procs_class_minus2_o::init_msg_c::init_ue_msg() -{ - assert_choice_type("InitialUEMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_s& ngap_elem_procs_class_minus2_o::init_msg_c::location_report() -{ - assert_choice_type("LocationReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_ctrl_s& ngap_elem_procs_class_minus2_o::init_msg_c::location_report_ctrl() -{ - assert_choice_type("LocationReportingControl", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_fail_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::location_report_fail_ind() -{ - assert_choice_type("LocationReportingFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -nas_non_delivery_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::nas_non_delivery_ind() -{ - assert_choice_type("NASNonDeliveryIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -overload_start_s& ngap_elem_procs_class_minus2_o::init_msg_c::overload_start() -{ - assert_choice_type("OverloadStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -overload_stop_s& ngap_elem_procs_class_minus2_o::init_msg_c::overload_stop() -{ - assert_choice_type("OverloadStop", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -paging_s& ngap_elem_procs_class_minus2_o::init_msg_c::paging() -{ - assert_choice_type("Paging", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -pdu_session_res_notify_s& ngap_elem_procs_class_minus2_o::init_msg_c::pdu_session_res_notify() -{ - assert_choice_type("PDUSessionResourceNotify", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -private_msg_s& ngap_elem_procs_class_minus2_o::init_msg_c::private_msg() -{ - assert_choice_type("PrivateMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -pws_fail_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::pws_fail_ind() -{ - assert_choice_type("PWSFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -pws_restart_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::pws_restart_ind() -{ - assert_choice_type("PWSRestartIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -reroute_nas_request_s& ngap_elem_procs_class_minus2_o::init_msg_c::reroute_nas_request() -{ - assert_choice_type("RerouteNASRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -rrc_inactive_transition_report_s& ngap_elem_procs_class_minus2_o::init_msg_c::rrc_inactive_transition_report() -{ - assert_choice_type("RRCInactiveTransitionReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -secondary_rat_data_usage_report_s& ngap_elem_procs_class_minus2_o::init_msg_c::secondary_rat_data_usage_report() -{ - assert_choice_type("SecondaryRATDataUsageReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -trace_fail_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::trace_fail_ind() -{ - assert_choice_type("TraceFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -trace_start_s& ngap_elem_procs_class_minus2_o::init_msg_c::trace_start() -{ - assert_choice_type("TraceStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_context_release_request_s& ngap_elem_procs_class_minus2_o::init_msg_c::ue_context_release_request() -{ - assert_choice_type("UEContextReleaseRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_radio_cap_info_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::ue_radio_cap_info_ind() -{ - assert_choice_type("UERadioCapabilityInfoIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -uetnla_binding_release_request_s& ngap_elem_procs_class_minus2_o::init_msg_c::uetnla_binding_release_request() -{ - assert_choice_type("UETNLABindingReleaseRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_nas_transport_s& ngap_elem_procs_class_minus2_o::init_msg_c::ul_nas_transport() -{ - assert_choice_type("UplinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_non_ueassociated_nrp_pa_transport_s& -ngap_elem_procs_class_minus2_o::init_msg_c::ul_non_ueassociated_nrp_pa_transport() -{ - assert_choice_type("UplinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_ran_cfg_transfer_s& ngap_elem_procs_class_minus2_o::init_msg_c::ul_ran_cfg_transfer() -{ - assert_choice_type("UplinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_ran_status_transfer_s& ngap_elem_procs_class_minus2_o::init_msg_c::ul_ran_status_transfer() -{ - assert_choice_type("UplinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_ueassociated_nrp_pa_transport_s& ngap_elem_procs_class_minus2_o::init_msg_c::ul_ueassociated_nrp_pa_transport() -{ - assert_choice_type("UplinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const amf_status_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::amf_status_ind() const -{ - assert_choice_type("AMFStatusIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const cell_traffic_trace_s& ngap_elem_procs_class_minus2_o::init_msg_c::cell_traffic_trace() const -{ - assert_choice_type("CellTrafficTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const deactiv_trace_s& ngap_elem_procs_class_minus2_o::init_msg_c::deactiv_trace() const -{ - assert_choice_type("DeactivateTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_nas_transport_s& ngap_elem_procs_class_minus2_o::init_msg_c::dl_nas_transport() const -{ - assert_choice_type("DownlinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_non_ueassociated_nrp_pa_transport_s& -ngap_elem_procs_class_minus2_o::init_msg_c::dl_non_ueassociated_nrp_pa_transport() const -{ - assert_choice_type("DownlinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_ran_cfg_transfer_s& ngap_elem_procs_class_minus2_o::init_msg_c::dl_ran_cfg_transfer() const -{ - assert_choice_type("DownlinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_ran_status_transfer_s& ngap_elem_procs_class_minus2_o::init_msg_c::dl_ran_status_transfer() const -{ - assert_choice_type("DownlinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_ueassociated_nrp_pa_transport_s& -ngap_elem_procs_class_minus2_o::init_msg_c::dl_ueassociated_nrp_pa_transport() const -{ - assert_choice_type("DownlinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const error_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::error_ind() const -{ - assert_choice_type("ErrorIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ho_notify_s& ngap_elem_procs_class_minus2_o::init_msg_c::ho_notify() const -{ - assert_choice_type("HandoverNotify", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const init_ue_msg_s& ngap_elem_procs_class_minus2_o::init_msg_c::init_ue_msg() const -{ - assert_choice_type("InitialUEMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const location_report_s& ngap_elem_procs_class_minus2_o::init_msg_c::location_report() const -{ - assert_choice_type("LocationReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const location_report_ctrl_s& ngap_elem_procs_class_minus2_o::init_msg_c::location_report_ctrl() const -{ - assert_choice_type("LocationReportingControl", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const location_report_fail_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::location_report_fail_ind() const -{ - assert_choice_type("LocationReportingFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const nas_non_delivery_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::nas_non_delivery_ind() const -{ - assert_choice_type("NASNonDeliveryIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const overload_start_s& ngap_elem_procs_class_minus2_o::init_msg_c::overload_start() const -{ - assert_choice_type("OverloadStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const overload_stop_s& ngap_elem_procs_class_minus2_o::init_msg_c::overload_stop() const -{ - assert_choice_type("OverloadStop", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const paging_s& ngap_elem_procs_class_minus2_o::init_msg_c::paging() const -{ - assert_choice_type("Paging", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const pdu_session_res_notify_s& ngap_elem_procs_class_minus2_o::init_msg_c::pdu_session_res_notify() const -{ - assert_choice_type("PDUSessionResourceNotify", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const private_msg_s& ngap_elem_procs_class_minus2_o::init_msg_c::private_msg() const -{ - assert_choice_type("PrivateMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const pws_fail_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::pws_fail_ind() const -{ - assert_choice_type("PWSFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const pws_restart_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::pws_restart_ind() const -{ - assert_choice_type("PWSRestartIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const reroute_nas_request_s& ngap_elem_procs_class_minus2_o::init_msg_c::reroute_nas_request() const -{ - assert_choice_type("RerouteNASRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const rrc_inactive_transition_report_s& -ngap_elem_procs_class_minus2_o::init_msg_c::rrc_inactive_transition_report() const -{ - assert_choice_type("RRCInactiveTransitionReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const secondary_rat_data_usage_report_s& -ngap_elem_procs_class_minus2_o::init_msg_c::secondary_rat_data_usage_report() const -{ - assert_choice_type("SecondaryRATDataUsageReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const trace_fail_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::trace_fail_ind() const -{ - assert_choice_type("TraceFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const trace_start_s& ngap_elem_procs_class_minus2_o::init_msg_c::trace_start() const -{ - assert_choice_type("TraceStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ue_context_release_request_s& ngap_elem_procs_class_minus2_o::init_msg_c::ue_context_release_request() const -{ - assert_choice_type("UEContextReleaseRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ue_radio_cap_info_ind_s& ngap_elem_procs_class_minus2_o::init_msg_c::ue_radio_cap_info_ind() const -{ - assert_choice_type("UERadioCapabilityInfoIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const uetnla_binding_release_request_s& -ngap_elem_procs_class_minus2_o::init_msg_c::uetnla_binding_release_request() const -{ - assert_choice_type("UETNLABindingReleaseRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_nas_transport_s& ngap_elem_procs_class_minus2_o::init_msg_c::ul_nas_transport() const -{ - assert_choice_type("UplinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_non_ueassociated_nrp_pa_transport_s& -ngap_elem_procs_class_minus2_o::init_msg_c::ul_non_ueassociated_nrp_pa_transport() const -{ - assert_choice_type("UplinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_ran_cfg_transfer_s& ngap_elem_procs_class_minus2_o::init_msg_c::ul_ran_cfg_transfer() const -{ - assert_choice_type("UplinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_ran_status_transfer_s& ngap_elem_procs_class_minus2_o::init_msg_c::ul_ran_status_transfer() const -{ - assert_choice_type("UplinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_ueassociated_nrp_pa_transport_s& -ngap_elem_procs_class_minus2_o::init_msg_c::ul_ueassociated_nrp_pa_transport() const -{ - assert_choice_type("UplinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -void ngap_elem_procs_class_minus2_o::init_msg_c::destroy_() -{ - switch (type_) { - case types::amf_status_ind: - c.destroy(); - break; - case types::cell_traffic_trace: - c.destroy(); - break; - case types::deactiv_trace: - c.destroy(); - break; - case types::dl_nas_transport: - c.destroy(); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - c.destroy(); - break; - case types::dl_ran_cfg_transfer: - c.destroy(); - break; - case types::dl_ran_status_transfer: - c.destroy(); - break; - case types::dl_ueassociated_nrp_pa_transport: - c.destroy(); - break; - case types::error_ind: - c.destroy(); - break; - case types::ho_notify: - c.destroy(); - break; - case types::init_ue_msg: - c.destroy(); - break; - case types::location_report: - c.destroy(); - break; - case types::location_report_ctrl: - c.destroy(); - break; - case types::location_report_fail_ind: - c.destroy(); - break; - case types::nas_non_delivery_ind: - c.destroy(); - break; - case types::overload_start: - c.destroy(); - break; - case types::overload_stop: - c.destroy(); - break; - case types::paging: - c.destroy(); - break; - case types::pdu_session_res_notify: - c.destroy(); - break; - case types::private_msg: - c.destroy(); - break; - case types::pws_fail_ind: - c.destroy(); - break; - case types::pws_restart_ind: - c.destroy(); - break; - case types::reroute_nas_request: - c.destroy(); - break; - case types::rrc_inactive_transition_report: - c.destroy(); - break; - case types::secondary_rat_data_usage_report: - c.destroy(); - break; - case types::trace_fail_ind: - c.destroy(); - break; - case types::trace_start: - c.destroy(); - break; - case types::ue_context_release_request: - c.destroy(); - break; - case types::ue_radio_cap_info_ind: - c.destroy(); - break; - case types::uetnla_binding_release_request: - c.destroy(); - break; - case types::ul_nas_transport: - c.destroy(); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - c.destroy(); - break; - case types::ul_ran_cfg_transfer: - c.destroy(); - break; - case types::ul_ran_status_transfer: - c.destroy(); - break; - case types::ul_ueassociated_nrp_pa_transport: - c.destroy(); - break; - default: - break; - } -} -void ngap_elem_procs_class_minus2_o::init_msg_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::amf_status_ind: - c.init(); - break; - case types::cell_traffic_trace: - c.init(); - break; - case types::deactiv_trace: - c.init(); - break; - case types::dl_nas_transport: - c.init(); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - c.init(); - break; - case types::dl_ran_cfg_transfer: - c.init(); - break; - case types::dl_ran_status_transfer: - c.init(); - break; - case types::dl_ueassociated_nrp_pa_transport: - c.init(); - break; - case types::error_ind: - c.init(); - break; - case types::ho_notify: - c.init(); - break; - case types::init_ue_msg: - c.init(); - break; - case types::location_report: - c.init(); - break; - case types::location_report_ctrl: - c.init(); - break; - case types::location_report_fail_ind: - c.init(); - break; - case types::nas_non_delivery_ind: - c.init(); - break; - case types::overload_start: - c.init(); - break; - case types::overload_stop: - c.init(); - break; - case types::paging: - c.init(); - break; - case types::pdu_session_res_notify: - c.init(); - break; - case types::private_msg: - c.init(); - break; - case types::pws_fail_ind: - c.init(); - break; - case types::pws_restart_ind: - c.init(); - break; - case types::reroute_nas_request: - c.init(); - break; - case types::rrc_inactive_transition_report: - c.init(); - break; - case types::secondary_rat_data_usage_report: - c.init(); - break; - case types::trace_fail_ind: - c.init(); - break; - case types::trace_start: - c.init(); - break; - case types::ue_context_release_request: - c.init(); - break; - case types::ue_radio_cap_info_ind: - c.init(); - break; - case types::uetnla_binding_release_request: - c.init(); - break; - case types::ul_nas_transport: - c.init(); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - c.init(); - break; - case types::ul_ran_cfg_transfer: - c.init(); - break; - case types::ul_ran_status_transfer: - c.init(); - break; - case types::ul_ueassociated_nrp_pa_transport: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus2_o::init_msg_c"); - } -} -ngap_elem_procs_class_minus2_o::init_msg_c::init_msg_c(const ngap_elem_procs_class_minus2_o::init_msg_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::amf_status_ind: - c.init(other.c.get()); - break; - case types::cell_traffic_trace: - c.init(other.c.get()); - break; - case types::deactiv_trace: - c.init(other.c.get()); - break; - case types::dl_nas_transport: - c.init(other.c.get()); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - c.init(other.c.get()); - break; - case types::dl_ran_cfg_transfer: - c.init(other.c.get()); - break; - case types::dl_ran_status_transfer: - c.init(other.c.get()); - break; - case types::dl_ueassociated_nrp_pa_transport: - c.init(other.c.get()); - break; - case types::error_ind: - c.init(other.c.get()); - break; - case types::ho_notify: - c.init(other.c.get()); - break; - case types::init_ue_msg: - c.init(other.c.get()); - break; - case types::location_report: - c.init(other.c.get()); - break; - case types::location_report_ctrl: - c.init(other.c.get()); - break; - case types::location_report_fail_ind: - c.init(other.c.get()); - break; - case types::nas_non_delivery_ind: - c.init(other.c.get()); - break; - case types::overload_start: - c.init(other.c.get()); - break; - case types::overload_stop: - c.init(other.c.get()); - break; - case types::paging: - c.init(other.c.get()); - break; - case types::pdu_session_res_notify: - c.init(other.c.get()); - break; - case types::private_msg: - c.init(other.c.get()); - break; - case types::pws_fail_ind: - c.init(other.c.get()); - break; - case types::pws_restart_ind: - c.init(other.c.get()); - break; - case types::reroute_nas_request: - c.init(other.c.get()); - break; - case types::rrc_inactive_transition_report: - c.init(other.c.get()); - break; - case types::secondary_rat_data_usage_report: - c.init(other.c.get()); - break; - case types::trace_fail_ind: - c.init(other.c.get()); - break; - case types::trace_start: - c.init(other.c.get()); - break; - case types::ue_context_release_request: - c.init(other.c.get()); - break; - case types::ue_radio_cap_info_ind: - c.init(other.c.get()); - break; - case types::uetnla_binding_release_request: - c.init(other.c.get()); - break; - case types::ul_nas_transport: - c.init(other.c.get()); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - c.init(other.c.get()); - break; - case types::ul_ran_cfg_transfer: - c.init(other.c.get()); - break; - case types::ul_ran_status_transfer: - c.init(other.c.get()); - break; - case types::ul_ueassociated_nrp_pa_transport: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus2_o::init_msg_c"); - } -} -ngap_elem_procs_class_minus2_o::init_msg_c& ngap_elem_procs_class_minus2_o::init_msg_c:: - operator=(const ngap_elem_procs_class_minus2_o::init_msg_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::amf_status_ind: - c.set(other.c.get()); - break; - case types::cell_traffic_trace: - c.set(other.c.get()); - break; - case types::deactiv_trace: - c.set(other.c.get()); - break; - case types::dl_nas_transport: - c.set(other.c.get()); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - c.set(other.c.get()); - break; - case types::dl_ran_cfg_transfer: - c.set(other.c.get()); - break; - case types::dl_ran_status_transfer: - c.set(other.c.get()); - break; - case types::dl_ueassociated_nrp_pa_transport: - c.set(other.c.get()); - break; - case types::error_ind: - c.set(other.c.get()); - break; - case types::ho_notify: - c.set(other.c.get()); - break; - case types::init_ue_msg: - c.set(other.c.get()); - break; - case types::location_report: - c.set(other.c.get()); - break; - case types::location_report_ctrl: - c.set(other.c.get()); - break; - case types::location_report_fail_ind: - c.set(other.c.get()); - break; - case types::nas_non_delivery_ind: - c.set(other.c.get()); - break; - case types::overload_start: - c.set(other.c.get()); - break; - case types::overload_stop: - c.set(other.c.get()); - break; - case types::paging: - c.set(other.c.get()); - break; - case types::pdu_session_res_notify: - c.set(other.c.get()); - break; - case types::private_msg: - c.set(other.c.get()); - break; - case types::pws_fail_ind: - c.set(other.c.get()); - break; - case types::pws_restart_ind: - c.set(other.c.get()); - break; - case types::reroute_nas_request: - c.set(other.c.get()); - break; - case types::rrc_inactive_transition_report: - c.set(other.c.get()); - break; - case types::secondary_rat_data_usage_report: - c.set(other.c.get()); - break; - case types::trace_fail_ind: - c.set(other.c.get()); - break; - case types::trace_start: - c.set(other.c.get()); - break; - case types::ue_context_release_request: - c.set(other.c.get()); - break; - case types::ue_radio_cap_info_ind: - c.set(other.c.get()); - break; - case types::uetnla_binding_release_request: - c.set(other.c.get()); - break; - case types::ul_nas_transport: - c.set(other.c.get()); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - c.set(other.c.get()); - break; - case types::ul_ran_cfg_transfer: - c.set(other.c.get()); - break; - case types::ul_ran_status_transfer: - c.set(other.c.get()); - break; - case types::ul_ueassociated_nrp_pa_transport: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus2_o::init_msg_c"); - } - - return *this; -} -void ngap_elem_procs_class_minus2_o::init_msg_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::amf_status_ind: - j.write_fieldname("AMFStatusIndication"); - c.get().to_json(j); - break; - case types::cell_traffic_trace: - j.write_fieldname("CellTrafficTrace"); - c.get().to_json(j); - break; - case types::deactiv_trace: - j.write_fieldname("DeactivateTrace"); - c.get().to_json(j); - break; - case types::dl_nas_transport: - j.write_fieldname("DownlinkNASTransport"); - c.get().to_json(j); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - j.write_fieldname("DownlinkNonUEAssociatedNRPPaTransport"); - c.get().to_json(j); - break; - case types::dl_ran_cfg_transfer: - j.write_fieldname("DownlinkRANConfigurationTransfer"); - c.get().to_json(j); - break; - case types::dl_ran_status_transfer: - j.write_fieldname("DownlinkRANStatusTransfer"); - c.get().to_json(j); - break; - case types::dl_ueassociated_nrp_pa_transport: - j.write_fieldname("DownlinkUEAssociatedNRPPaTransport"); - c.get().to_json(j); - break; - case types::error_ind: - j.write_fieldname("ErrorIndication"); - c.get().to_json(j); - break; - case types::ho_notify: - j.write_fieldname("HandoverNotify"); - c.get().to_json(j); - break; - case types::init_ue_msg: - j.write_fieldname("InitialUEMessage"); - c.get().to_json(j); - break; - case types::location_report: - j.write_fieldname("LocationReport"); - c.get().to_json(j); - break; - case types::location_report_ctrl: - j.write_fieldname("LocationReportingControl"); - c.get().to_json(j); - break; - case types::location_report_fail_ind: - j.write_fieldname("LocationReportingFailureIndication"); - c.get().to_json(j); - break; - case types::nas_non_delivery_ind: - j.write_fieldname("NASNonDeliveryIndication"); - c.get().to_json(j); - break; - case types::overload_start: - j.write_fieldname("OverloadStart"); - c.get().to_json(j); - break; - case types::overload_stop: - j.write_fieldname("OverloadStop"); - c.get().to_json(j); - break; - case types::paging: - j.write_fieldname("Paging"); - c.get().to_json(j); - break; - case types::pdu_session_res_notify: - j.write_fieldname("PDUSessionResourceNotify"); - c.get().to_json(j); - break; - case types::private_msg: - j.write_fieldname("PrivateMessage"); - c.get().to_json(j); - break; - case types::pws_fail_ind: - j.write_fieldname("PWSFailureIndication"); - c.get().to_json(j); - break; - case types::pws_restart_ind: - j.write_fieldname("PWSRestartIndication"); - c.get().to_json(j); - break; - case types::reroute_nas_request: - j.write_fieldname("RerouteNASRequest"); - c.get().to_json(j); - break; - case types::rrc_inactive_transition_report: - j.write_fieldname("RRCInactiveTransitionReport"); - c.get().to_json(j); - break; - case types::secondary_rat_data_usage_report: - j.write_fieldname("SecondaryRATDataUsageReport"); - c.get().to_json(j); - break; - case types::trace_fail_ind: - j.write_fieldname("TraceFailureIndication"); - c.get().to_json(j); - break; - case types::trace_start: - j.write_fieldname("TraceStart"); - c.get().to_json(j); - break; - case types::ue_context_release_request: - j.write_fieldname("UEContextReleaseRequest"); - c.get().to_json(j); - break; - case types::ue_radio_cap_info_ind: - j.write_fieldname("UERadioCapabilityInfoIndication"); - c.get().to_json(j); - break; - case types::uetnla_binding_release_request: - j.write_fieldname("UETNLABindingReleaseRequest"); - c.get().to_json(j); - break; - case types::ul_nas_transport: - j.write_fieldname("UplinkNASTransport"); - c.get().to_json(j); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - j.write_fieldname("UplinkNonUEAssociatedNRPPaTransport"); - c.get().to_json(j); - break; - case types::ul_ran_cfg_transfer: - j.write_fieldname("UplinkRANConfigurationTransfer"); - c.get().to_json(j); - break; - case types::ul_ran_status_transfer: - j.write_fieldname("UplinkRANStatusTransfer"); - c.get().to_json(j); - break; - case types::ul_ueassociated_nrp_pa_transport: - j.write_fieldname("UplinkUEAssociatedNRPPaTransport"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus2_o::init_msg_c"); - } - j.end_obj(); -} -SRSASN_CODE ngap_elem_procs_class_minus2_o::init_msg_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - switch (type_) { - case types::amf_status_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::cell_traffic_trace: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::deactiv_trace: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_nas_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_ran_cfg_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_ran_status_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::error_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_notify: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::init_ue_msg: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::location_report: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::location_report_ctrl: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::location_report_fail_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::nas_non_delivery_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::overload_start: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::overload_stop: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::paging: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdu_session_res_notify: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::private_msg: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pws_fail_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pws_restart_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::reroute_nas_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_inactive_transition_report: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::secondary_rat_data_usage_report: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::trace_fail_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::trace_start: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_release_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_radio_cap_info_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::uetnla_binding_release_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_nas_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_ran_cfg_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_ran_status_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus2_o::init_msg_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ngap_elem_procs_class_minus2_o::init_msg_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - switch (type_) { - case types::amf_status_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::cell_traffic_trace: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::deactiv_trace: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_nas_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_ran_cfg_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_ran_status_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::error_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_notify: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::init_ue_msg: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::location_report: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::location_report_ctrl: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::location_report_fail_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::nas_non_delivery_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::overload_start: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::overload_stop: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::paging: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdu_session_res_notify: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::private_msg: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pws_fail_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pws_restart_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::reroute_nas_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_inactive_transition_report: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::secondary_rat_data_usage_report: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::trace_fail_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::trace_start: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_release_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_radio_cap_info_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::uetnla_binding_release_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_nas_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_ran_cfg_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_ran_status_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_class_minus2_o::init_msg_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string ngap_elem_procs_class_minus2_o::init_msg_c::types_opts::to_string() const -{ - static constexpr const char* options[] = {"AMFStatusIndication", - "CellTrafficTrace", - "DeactivateTrace", - "DownlinkNASTransport", - "DownlinkNonUEAssociatedNRPPaTransport", - "DownlinkRANConfigurationTransfer", - "DownlinkRANStatusTransfer", - "DownlinkUEAssociatedNRPPaTransport", - "ErrorIndication", - "HandoverNotify", - "InitialUEMessage", - "LocationReport", - "LocationReportingControl", - "LocationReportingFailureIndication", - "NASNonDeliveryIndication", - "OverloadStart", - "OverloadStop", - "Paging", - "PDUSessionResourceNotify", - "PrivateMessage", - "PWSFailureIndication", - "PWSRestartIndication", - "RerouteNASRequest", - "RRCInactiveTransitionReport", - "SecondaryRATDataUsageReport", - "TraceFailureIndication", - "TraceStart", - "UEContextReleaseRequest", - "UERadioCapabilityInfoIndication", - "UETNLABindingReleaseRequest", - "UplinkNASTransport", - "UplinkNonUEAssociatedNRPPaTransport", - "UplinkRANConfigurationTransfer", - "UplinkRANStatusTransfer", - "UplinkUEAssociatedNRPPaTransport"}; - return convert_enum_idx(options, 35, value, "ngap_elem_procs_class_minus2_o::init_msg_c::types"); -} - -// SuccessfulOutcome ::= OPEN TYPE -void ngap_elem_procs_class_minus2_o::successful_outcome_c::set(types::options e) -{ - type_ = e; -} -void ngap_elem_procs_class_minus2_o::successful_outcome_c::to_json(json_writer& j) const -{ - j.start_obj(); - j.end_obj(); -} -SRSASN_CODE ngap_elem_procs_class_minus2_o::successful_outcome_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - return SRSASN_SUCCESS; -} -SRSASN_CODE ngap_elem_procs_class_minus2_o::successful_outcome_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - return SRSASN_SUCCESS; -} - -std::string ngap_elem_procs_class_minus2_o::successful_outcome_c::types_opts::to_string() const -{ - static constexpr const char* options[] = {"NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", - "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", - "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", - "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL"}; - return convert_enum_idx(options, 35, value, "ngap_elem_procs_class_minus2_o::successful_outcome_c::types"); -} - -// UnsuccessfulOutcome ::= OPEN TYPE -void ngap_elem_procs_class_minus2_o::unsuccessful_outcome_c::set(types::options e) -{ - type_ = e; -} -void ngap_elem_procs_class_minus2_o::unsuccessful_outcome_c::to_json(json_writer& j) const -{ - j.start_obj(); - j.end_obj(); -} -SRSASN_CODE ngap_elem_procs_class_minus2_o::unsuccessful_outcome_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - return SRSASN_SUCCESS; -} -SRSASN_CODE ngap_elem_procs_class_minus2_o::unsuccessful_outcome_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - return SRSASN_SUCCESS; -} - -std::string ngap_elem_procs_class_minus2_o::unsuccessful_outcome_c::types_opts::to_string() const -{ - static constexpr const char* options[] = {"NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", - "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", - "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", - "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL"}; - return convert_enum_idx(options, 35, value, "ngap_elem_procs_class_minus2_o::unsuccessful_outcome_c::types"); -} - -// NGAP-ELEMENTARY-PROCEDURES ::= OBJECT SET OF NGAP-ELEMENTARY-PROCEDURE -uint16_t ngap_elem_procs_o::idx_to_proc_code(uint32_t idx) -{ - static constexpr const uint16_t options[] = {0, 10, 12, 13, 14, 20, 21, 25, 26, 27, 28, 29, 32, 35, 40, 41, 43, 51, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 15, 18, 16, 17, 19, 22, 23, 24, - 30, 31, 33, 34, 36, 37, 52, 38, 39, 42, 44, 45, 46, 47, 48, 49, 50}; - return convert_enum_idx(options, 53, idx, "proc_code"); -} -bool ngap_elem_procs_o::is_proc_code_valid(const uint16_t& proc_code) -{ - static constexpr const uint16_t options[] = {0, 10, 12, 13, 14, 20, 21, 25, 26, 27, 28, 29, 32, 35, 40, 41, 43, 51, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 15, 18, 16, 17, 19, 22, 23, 24, - 30, 31, 33, 34, 36, 37, 52, 38, 39, 42, 44, 45, 46, 47, 48, 49, 50}; - for (uint32_t i = 0; i < 53; ++i) { - if (options[i] == proc_code) { - return true; - } - } - return false; -} -ngap_elem_procs_o::init_msg_c ngap_elem_procs_o::get_init_msg(const uint16_t& proc_code) -{ - init_msg_c ret{}; - switch (proc_code) { - case 0: - ret.set(init_msg_c::types::amf_cfg_upd); - break; - case 10: - ret.set(init_msg_c::types::ho_cancel); - break; - case 12: - ret.set(init_msg_c::types::ho_required); - break; - case 13: - ret.set(init_msg_c::types::ho_request); - break; - case 14: - ret.set(init_msg_c::types::init_context_setup_request); - break; - case 20: - ret.set(init_msg_c::types::ng_reset); - break; - case 21: - ret.set(init_msg_c::types::ng_setup_request); - break; - case 25: - ret.set(init_msg_c::types::path_switch_request); - break; - case 26: - ret.set(init_msg_c::types::pdu_session_res_modify_request); - break; - case 27: - ret.set(init_msg_c::types::pdu_session_res_modify_ind); - break; - case 28: - ret.set(init_msg_c::types::pdu_session_res_release_cmd); - break; - case 29: - ret.set(init_msg_c::types::pdu_session_res_setup_request); - break; - case 32: - ret.set(init_msg_c::types::pws_cancel_request); - break; - case 35: - ret.set(init_msg_c::types::ran_cfg_upd); - break; - case 40: - ret.set(init_msg_c::types::ue_context_mod_request); - break; - case 41: - ret.set(init_msg_c::types::ue_context_release_cmd); - break; - case 43: - ret.set(init_msg_c::types::ue_radio_cap_check_request); - break; - case 51: - ret.set(init_msg_c::types::write_replace_warning_request); - break; - case 1: - ret.set(init_msg_c::types::amf_status_ind); - break; - case 2: - ret.set(init_msg_c::types::cell_traffic_trace); - break; - case 3: - ret.set(init_msg_c::types::deactiv_trace); - break; - case 4: - ret.set(init_msg_c::types::dl_nas_transport); - break; - case 5: - ret.set(init_msg_c::types::dl_non_ueassociated_nrp_pa_transport); - break; - case 6: - ret.set(init_msg_c::types::dl_ran_cfg_transfer); - break; - case 7: - ret.set(init_msg_c::types::dl_ran_status_transfer); - break; - case 8: - ret.set(init_msg_c::types::dl_ueassociated_nrp_pa_transport); - break; - case 9: - ret.set(init_msg_c::types::error_ind); - break; - case 11: - ret.set(init_msg_c::types::ho_notify); - break; - case 15: - ret.set(init_msg_c::types::init_ue_msg); - break; - case 18: - ret.set(init_msg_c::types::location_report); - break; - case 16: - ret.set(init_msg_c::types::location_report_ctrl); - break; - case 17: - ret.set(init_msg_c::types::location_report_fail_ind); - break; - case 19: - ret.set(init_msg_c::types::nas_non_delivery_ind); - break; - case 22: - ret.set(init_msg_c::types::overload_start); - break; - case 23: - ret.set(init_msg_c::types::overload_stop); - break; - case 24: - ret.set(init_msg_c::types::paging); - break; - case 30: - ret.set(init_msg_c::types::pdu_session_res_notify); - break; - case 31: - ret.set(init_msg_c::types::private_msg); - break; - case 33: - ret.set(init_msg_c::types::pws_fail_ind); - break; - case 34: - ret.set(init_msg_c::types::pws_restart_ind); - break; - case 36: - ret.set(init_msg_c::types::reroute_nas_request); - break; - case 37: - ret.set(init_msg_c::types::rrc_inactive_transition_report); - break; - case 52: - ret.set(init_msg_c::types::secondary_rat_data_usage_report); - break; - case 38: - ret.set(init_msg_c::types::trace_fail_ind); - break; - case 39: - ret.set(init_msg_c::types::trace_start); - break; - case 42: - ret.set(init_msg_c::types::ue_context_release_request); - break; - case 44: - ret.set(init_msg_c::types::ue_radio_cap_info_ind); - break; - case 45: - ret.set(init_msg_c::types::uetnla_binding_release_request); - break; - case 46: - ret.set(init_msg_c::types::ul_nas_transport); - break; - case 47: - ret.set(init_msg_c::types::ul_non_ueassociated_nrp_pa_transport); - break; - case 48: - ret.set(init_msg_c::types::ul_ran_cfg_transfer); - break; - case 49: - ret.set(init_msg_c::types::ul_ran_status_transfer); - break; - case 50: - ret.set(init_msg_c::types::ul_ueassociated_nrp_pa_transport); - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -ngap_elem_procs_o::successful_outcome_c ngap_elem_procs_o::get_successful_outcome(const uint16_t& proc_code) -{ - successful_outcome_c ret{}; - switch (proc_code) { - case 0: - ret.set(successful_outcome_c::types::amf_cfg_upd); - break; - case 10: - ret.set(successful_outcome_c::types::ho_cancel); - break; - case 12: - ret.set(successful_outcome_c::types::ho_required); - break; - case 13: - ret.set(successful_outcome_c::types::ho_request); - break; - case 14: - ret.set(successful_outcome_c::types::init_context_setup_request); - break; - case 20: - ret.set(successful_outcome_c::types::ng_reset); - break; - case 21: - ret.set(successful_outcome_c::types::ng_setup_request); - break; - case 25: - ret.set(successful_outcome_c::types::path_switch_request); - break; - case 26: - ret.set(successful_outcome_c::types::pdu_session_res_modify_request); - break; - case 27: - ret.set(successful_outcome_c::types::pdu_session_res_modify_ind); - break; - case 28: - ret.set(successful_outcome_c::types::pdu_session_res_release_cmd); - break; - case 29: - ret.set(successful_outcome_c::types::pdu_session_res_setup_request); - break; - case 32: - ret.set(successful_outcome_c::types::pws_cancel_request); - break; - case 35: - ret.set(successful_outcome_c::types::ran_cfg_upd); - break; - case 40: - ret.set(successful_outcome_c::types::ue_context_mod_request); - break; - case 41: - ret.set(successful_outcome_c::types::ue_context_release_cmd); - break; - case 43: - ret.set(successful_outcome_c::types::ue_radio_cap_check_request); - break; - case 51: - ret.set(successful_outcome_c::types::write_replace_warning_request); - break; - case 1: - break; - case 2: - break; - case 3: - break; - case 4: - break; - case 5: - break; - case 6: - break; - case 7: - break; - case 8: - break; - case 9: - break; - case 11: - break; - case 15: - break; - case 18: - break; - case 16: - break; - case 17: - break; - case 19: - break; - case 22: - break; - case 23: - break; - case 24: - break; - case 30: - break; - case 31: - break; - case 33: - break; - case 34: - break; - case 36: - break; - case 37: - break; - case 52: - break; - case 38: - break; - case 39: - break; - case 42: - break; - case 44: - break; - case 45: - break; - case 46: - break; - case 47: - break; - case 48: - break; - case 49: - break; - case 50: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -ngap_elem_procs_o::unsuccessful_outcome_c ngap_elem_procs_o::get_unsuccessful_outcome(const uint16_t& proc_code) -{ - unsuccessful_outcome_c ret{}; - switch (proc_code) { - case 0: - ret.set(unsuccessful_outcome_c::types::amf_cfg_upd); - break; - case 10: - break; - case 12: - ret.set(unsuccessful_outcome_c::types::ho_required); - break; - case 13: - ret.set(unsuccessful_outcome_c::types::ho_request); - break; - case 14: - ret.set(unsuccessful_outcome_c::types::init_context_setup_request); - break; - case 20: - break; - case 21: - ret.set(unsuccessful_outcome_c::types::ng_setup_request); - break; - case 25: - ret.set(unsuccessful_outcome_c::types::path_switch_request); - break; - case 26: - break; - case 27: - break; - case 28: - break; - case 29: - break; - case 32: - break; - case 35: - ret.set(unsuccessful_outcome_c::types::ran_cfg_upd); - break; - case 40: - ret.set(unsuccessful_outcome_c::types::ue_context_mod_request); - break; - case 41: - break; - case 43: - break; - case 51: - break; - case 1: - break; - case 2: - break; - case 3: - break; - case 4: - break; - case 5: - break; - case 6: - break; - case 7: - break; - case 8: - break; - case 9: - break; - case 11: - break; - case 15: - break; - case 18: - break; - case 16: - break; - case 17: - break; - case 19: - break; - case 22: - break; - case 23: - break; - case 24: - break; - case 30: - break; - case 31: - break; - case 33: - break; - case 34: - break; - case 36: - break; - case 37: - break; - case 52: - break; - case 38: - break; - case 39: - break; - case 42: - break; - case 44: - break; - case 45: - break; - case 46: - break; - case 47: - break; - case 48: - break; - case 49: - break; - case 50: - break; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -crit_e ngap_elem_procs_o::get_crit(const uint16_t& proc_code) -{ - switch (proc_code) { - case 0: - return crit_e::reject; - case 10: - return crit_e::reject; - case 12: - return crit_e::reject; - case 13: - return crit_e::reject; - case 14: - return crit_e::reject; - case 20: - return crit_e::reject; - case 21: - return crit_e::reject; - case 25: - return crit_e::reject; - case 26: - return crit_e::reject; - case 27: - return crit_e::reject; - case 28: - return crit_e::reject; - case 29: - return crit_e::reject; - case 32: - return crit_e::reject; - case 35: - return crit_e::reject; - case 40: - return crit_e::reject; - case 41: - return crit_e::reject; - case 43: - return crit_e::reject; - case 51: - return crit_e::reject; - case 1: - return crit_e::ignore; - case 2: - return crit_e::ignore; - case 3: - return crit_e::ignore; - case 4: - return crit_e::ignore; - case 5: - return crit_e::ignore; - case 6: - return crit_e::ignore; - case 7: - return crit_e::ignore; - case 8: - return crit_e::ignore; - case 9: - return crit_e::ignore; - case 11: - return crit_e::ignore; - case 15: - return crit_e::ignore; - case 18: - return crit_e::ignore; - case 16: - return crit_e::ignore; - case 17: - return crit_e::ignore; - case 19: - return crit_e::ignore; - case 22: - return crit_e::ignore; - case 23: - return crit_e::reject; - case 24: - return crit_e::ignore; - case 30: - return crit_e::ignore; - case 31: - return crit_e::ignore; - case 33: - return crit_e::ignore; - case 34: - return crit_e::ignore; - case 36: - return crit_e::reject; - case 37: - return crit_e::ignore; - case 52: - return crit_e::ignore; - case 38: - return crit_e::ignore; - case 39: - return crit_e::ignore; - case 42: - return crit_e::ignore; - case 44: - return crit_e::ignore; - case 45: - return crit_e::ignore; - case 46: - return crit_e::ignore; - case 47: - return crit_e::ignore; - case 48: - return crit_e::ignore; - case 49: - return crit_e::ignore; - case 50: - return crit_e::ignore; - default: - ngap_nr_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return crit_e(); -} - -// InitiatingMessage ::= OPEN TYPE -amf_cfg_upd_s& ngap_elem_procs_o::init_msg_c::amf_cfg_upd() -{ - assert_choice_type("AMFConfigurationUpdate", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ho_cancel_s& ngap_elem_procs_o::init_msg_c::ho_cancel() -{ - assert_choice_type("HandoverCancel", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ho_required_s& ngap_elem_procs_o::init_msg_c::ho_required() -{ - assert_choice_type("HandoverRequired", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ho_request_s& ngap_elem_procs_o::init_msg_c::ho_request() -{ - assert_choice_type("HandoverRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -init_context_setup_request_s& ngap_elem_procs_o::init_msg_c::init_context_setup_request() -{ - assert_choice_type("InitialContextSetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ng_reset_s& ngap_elem_procs_o::init_msg_c::ng_reset() -{ - assert_choice_type("NGReset", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ng_setup_request_s& ngap_elem_procs_o::init_msg_c::ng_setup_request() -{ - assert_choice_type("NGSetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -path_switch_request_s& ngap_elem_procs_o::init_msg_c::path_switch_request() -{ - assert_choice_type("PathSwitchRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -pdu_session_res_modify_request_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_modify_request() -{ - assert_choice_type("PDUSessionResourceModifyRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -pdu_session_res_modify_ind_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_modify_ind() -{ - assert_choice_type("PDUSessionResourceModifyIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -pdu_session_res_release_cmd_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_release_cmd() -{ - assert_choice_type("PDUSessionResourceReleaseCommand", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -pdu_session_res_setup_request_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_setup_request() -{ - assert_choice_type("PDUSessionResourceSetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -pws_cancel_request_s& ngap_elem_procs_o::init_msg_c::pws_cancel_request() -{ - assert_choice_type("PWSCancelRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ran_cfg_upd_s& ngap_elem_procs_o::init_msg_c::ran_cfg_upd() -{ - assert_choice_type("RANConfigurationUpdate", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_context_mod_request_s& ngap_elem_procs_o::init_msg_c::ue_context_mod_request() -{ - assert_choice_type("UEContextModificationRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_context_release_cmd_s& ngap_elem_procs_o::init_msg_c::ue_context_release_cmd() -{ - assert_choice_type("UEContextReleaseCommand", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_radio_cap_check_request_s& ngap_elem_procs_o::init_msg_c::ue_radio_cap_check_request() -{ - assert_choice_type("UERadioCapabilityCheckRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -write_replace_warning_request_s& ngap_elem_procs_o::init_msg_c::write_replace_warning_request() -{ - assert_choice_type("WriteReplaceWarningRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -amf_status_ind_s& ngap_elem_procs_o::init_msg_c::amf_status_ind() -{ - assert_choice_type("AMFStatusIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -cell_traffic_trace_s& ngap_elem_procs_o::init_msg_c::cell_traffic_trace() -{ - assert_choice_type("CellTrafficTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -deactiv_trace_s& ngap_elem_procs_o::init_msg_c::deactiv_trace() -{ - assert_choice_type("DeactivateTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_nas_transport_s& ngap_elem_procs_o::init_msg_c::dl_nas_transport() -{ - assert_choice_type("DownlinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_non_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::dl_non_ueassociated_nrp_pa_transport() -{ - assert_choice_type("DownlinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_ran_cfg_transfer_s& ngap_elem_procs_o::init_msg_c::dl_ran_cfg_transfer() -{ - assert_choice_type("DownlinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_ran_status_transfer_s& ngap_elem_procs_o::init_msg_c::dl_ran_status_transfer() -{ - assert_choice_type("DownlinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::dl_ueassociated_nrp_pa_transport() -{ - assert_choice_type("DownlinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -error_ind_s& ngap_elem_procs_o::init_msg_c::error_ind() -{ - assert_choice_type("ErrorIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ho_notify_s& ngap_elem_procs_o::init_msg_c::ho_notify() -{ - assert_choice_type("HandoverNotify", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -init_ue_msg_s& ngap_elem_procs_o::init_msg_c::init_ue_msg() -{ - assert_choice_type("InitialUEMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_s& ngap_elem_procs_o::init_msg_c::location_report() -{ - assert_choice_type("LocationReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_ctrl_s& ngap_elem_procs_o::init_msg_c::location_report_ctrl() -{ - assert_choice_type("LocationReportingControl", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_fail_ind_s& ngap_elem_procs_o::init_msg_c::location_report_fail_ind() -{ - assert_choice_type("LocationReportingFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -nas_non_delivery_ind_s& ngap_elem_procs_o::init_msg_c::nas_non_delivery_ind() -{ - assert_choice_type("NASNonDeliveryIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -overload_start_s& ngap_elem_procs_o::init_msg_c::overload_start() -{ - assert_choice_type("OverloadStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -overload_stop_s& ngap_elem_procs_o::init_msg_c::overload_stop() -{ - assert_choice_type("OverloadStop", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -paging_s& ngap_elem_procs_o::init_msg_c::paging() -{ - assert_choice_type("Paging", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -pdu_session_res_notify_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_notify() -{ - assert_choice_type("PDUSessionResourceNotify", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -private_msg_s& ngap_elem_procs_o::init_msg_c::private_msg() -{ - assert_choice_type("PrivateMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -pws_fail_ind_s& ngap_elem_procs_o::init_msg_c::pws_fail_ind() -{ - assert_choice_type("PWSFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -pws_restart_ind_s& ngap_elem_procs_o::init_msg_c::pws_restart_ind() -{ - assert_choice_type("PWSRestartIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -reroute_nas_request_s& ngap_elem_procs_o::init_msg_c::reroute_nas_request() -{ - assert_choice_type("RerouteNASRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -rrc_inactive_transition_report_s& ngap_elem_procs_o::init_msg_c::rrc_inactive_transition_report() -{ - assert_choice_type("RRCInactiveTransitionReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -secondary_rat_data_usage_report_s& ngap_elem_procs_o::init_msg_c::secondary_rat_data_usage_report() -{ - assert_choice_type("SecondaryRATDataUsageReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -trace_fail_ind_s& ngap_elem_procs_o::init_msg_c::trace_fail_ind() -{ - assert_choice_type("TraceFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -trace_start_s& ngap_elem_procs_o::init_msg_c::trace_start() -{ - assert_choice_type("TraceStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_context_release_request_s& ngap_elem_procs_o::init_msg_c::ue_context_release_request() -{ - assert_choice_type("UEContextReleaseRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_radio_cap_info_ind_s& ngap_elem_procs_o::init_msg_c::ue_radio_cap_info_ind() -{ - assert_choice_type("UERadioCapabilityInfoIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -uetnla_binding_release_request_s& ngap_elem_procs_o::init_msg_c::uetnla_binding_release_request() -{ - assert_choice_type("UETNLABindingReleaseRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_nas_transport_s& ngap_elem_procs_o::init_msg_c::ul_nas_transport() -{ - assert_choice_type("UplinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_non_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::ul_non_ueassociated_nrp_pa_transport() -{ - assert_choice_type("UplinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_ran_cfg_transfer_s& ngap_elem_procs_o::init_msg_c::ul_ran_cfg_transfer() -{ - assert_choice_type("UplinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_ran_status_transfer_s& ngap_elem_procs_o::init_msg_c::ul_ran_status_transfer() -{ - assert_choice_type("UplinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::ul_ueassociated_nrp_pa_transport() -{ - assert_choice_type("UplinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const amf_cfg_upd_s& ngap_elem_procs_o::init_msg_c::amf_cfg_upd() const -{ - assert_choice_type("AMFConfigurationUpdate", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ho_cancel_s& ngap_elem_procs_o::init_msg_c::ho_cancel() const -{ - assert_choice_type("HandoverCancel", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ho_required_s& ngap_elem_procs_o::init_msg_c::ho_required() const -{ - assert_choice_type("HandoverRequired", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ho_request_s& ngap_elem_procs_o::init_msg_c::ho_request() const -{ - assert_choice_type("HandoverRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const init_context_setup_request_s& ngap_elem_procs_o::init_msg_c::init_context_setup_request() const -{ - assert_choice_type("InitialContextSetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ng_reset_s& ngap_elem_procs_o::init_msg_c::ng_reset() const -{ - assert_choice_type("NGReset", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ng_setup_request_s& ngap_elem_procs_o::init_msg_c::ng_setup_request() const -{ - assert_choice_type("NGSetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const path_switch_request_s& ngap_elem_procs_o::init_msg_c::path_switch_request() const -{ - assert_choice_type("PathSwitchRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const pdu_session_res_modify_request_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_modify_request() const -{ - assert_choice_type("PDUSessionResourceModifyRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const pdu_session_res_modify_ind_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_modify_ind() const -{ - assert_choice_type("PDUSessionResourceModifyIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const pdu_session_res_release_cmd_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_release_cmd() const -{ - assert_choice_type("PDUSessionResourceReleaseCommand", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const pdu_session_res_setup_request_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_setup_request() const -{ - assert_choice_type("PDUSessionResourceSetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const pws_cancel_request_s& ngap_elem_procs_o::init_msg_c::pws_cancel_request() const -{ - assert_choice_type("PWSCancelRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ran_cfg_upd_s& ngap_elem_procs_o::init_msg_c::ran_cfg_upd() const -{ - assert_choice_type("RANConfigurationUpdate", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ue_context_mod_request_s& ngap_elem_procs_o::init_msg_c::ue_context_mod_request() const -{ - assert_choice_type("UEContextModificationRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ue_context_release_cmd_s& ngap_elem_procs_o::init_msg_c::ue_context_release_cmd() const -{ - assert_choice_type("UEContextReleaseCommand", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ue_radio_cap_check_request_s& ngap_elem_procs_o::init_msg_c::ue_radio_cap_check_request() const -{ - assert_choice_type("UERadioCapabilityCheckRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const write_replace_warning_request_s& ngap_elem_procs_o::init_msg_c::write_replace_warning_request() const -{ - assert_choice_type("WriteReplaceWarningRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const amf_status_ind_s& ngap_elem_procs_o::init_msg_c::amf_status_ind() const -{ - assert_choice_type("AMFStatusIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const cell_traffic_trace_s& ngap_elem_procs_o::init_msg_c::cell_traffic_trace() const -{ - assert_choice_type("CellTrafficTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const deactiv_trace_s& ngap_elem_procs_o::init_msg_c::deactiv_trace() const -{ - assert_choice_type("DeactivateTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_nas_transport_s& ngap_elem_procs_o::init_msg_c::dl_nas_transport() const -{ - assert_choice_type("DownlinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_non_ueassociated_nrp_pa_transport_s& -ngap_elem_procs_o::init_msg_c::dl_non_ueassociated_nrp_pa_transport() const -{ - assert_choice_type("DownlinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_ran_cfg_transfer_s& ngap_elem_procs_o::init_msg_c::dl_ran_cfg_transfer() const -{ - assert_choice_type("DownlinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_ran_status_transfer_s& ngap_elem_procs_o::init_msg_c::dl_ran_status_transfer() const -{ - assert_choice_type("DownlinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::dl_ueassociated_nrp_pa_transport() const -{ - assert_choice_type("DownlinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const error_ind_s& ngap_elem_procs_o::init_msg_c::error_ind() const -{ - assert_choice_type("ErrorIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ho_notify_s& ngap_elem_procs_o::init_msg_c::ho_notify() const -{ - assert_choice_type("HandoverNotify", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const init_ue_msg_s& ngap_elem_procs_o::init_msg_c::init_ue_msg() const -{ - assert_choice_type("InitialUEMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const location_report_s& ngap_elem_procs_o::init_msg_c::location_report() const -{ - assert_choice_type("LocationReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const location_report_ctrl_s& ngap_elem_procs_o::init_msg_c::location_report_ctrl() const -{ - assert_choice_type("LocationReportingControl", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const location_report_fail_ind_s& ngap_elem_procs_o::init_msg_c::location_report_fail_ind() const -{ - assert_choice_type("LocationReportingFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const nas_non_delivery_ind_s& ngap_elem_procs_o::init_msg_c::nas_non_delivery_ind() const -{ - assert_choice_type("NASNonDeliveryIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const overload_start_s& ngap_elem_procs_o::init_msg_c::overload_start() const -{ - assert_choice_type("OverloadStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const overload_stop_s& ngap_elem_procs_o::init_msg_c::overload_stop() const -{ - assert_choice_type("OverloadStop", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const paging_s& ngap_elem_procs_o::init_msg_c::paging() const -{ - assert_choice_type("Paging", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const pdu_session_res_notify_s& ngap_elem_procs_o::init_msg_c::pdu_session_res_notify() const -{ - assert_choice_type("PDUSessionResourceNotify", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const private_msg_s& ngap_elem_procs_o::init_msg_c::private_msg() const -{ - assert_choice_type("PrivateMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const pws_fail_ind_s& ngap_elem_procs_o::init_msg_c::pws_fail_ind() const -{ - assert_choice_type("PWSFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const pws_restart_ind_s& ngap_elem_procs_o::init_msg_c::pws_restart_ind() const -{ - assert_choice_type("PWSRestartIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const reroute_nas_request_s& ngap_elem_procs_o::init_msg_c::reroute_nas_request() const -{ - assert_choice_type("RerouteNASRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const rrc_inactive_transition_report_s& ngap_elem_procs_o::init_msg_c::rrc_inactive_transition_report() const -{ - assert_choice_type("RRCInactiveTransitionReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const secondary_rat_data_usage_report_s& ngap_elem_procs_o::init_msg_c::secondary_rat_data_usage_report() const -{ - assert_choice_type("SecondaryRATDataUsageReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const trace_fail_ind_s& ngap_elem_procs_o::init_msg_c::trace_fail_ind() const -{ - assert_choice_type("TraceFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const trace_start_s& ngap_elem_procs_o::init_msg_c::trace_start() const -{ - assert_choice_type("TraceStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ue_context_release_request_s& ngap_elem_procs_o::init_msg_c::ue_context_release_request() const -{ - assert_choice_type("UEContextReleaseRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ue_radio_cap_info_ind_s& ngap_elem_procs_o::init_msg_c::ue_radio_cap_info_ind() const -{ - assert_choice_type("UERadioCapabilityInfoIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const uetnla_binding_release_request_s& ngap_elem_procs_o::init_msg_c::uetnla_binding_release_request() const -{ - assert_choice_type("UETNLABindingReleaseRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_nas_transport_s& ngap_elem_procs_o::init_msg_c::ul_nas_transport() const -{ - assert_choice_type("UplinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_non_ueassociated_nrp_pa_transport_s& -ngap_elem_procs_o::init_msg_c::ul_non_ueassociated_nrp_pa_transport() const -{ - assert_choice_type("UplinkNonUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_ran_cfg_transfer_s& ngap_elem_procs_o::init_msg_c::ul_ran_cfg_transfer() const -{ - assert_choice_type("UplinkRANConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_ran_status_transfer_s& ngap_elem_procs_o::init_msg_c::ul_ran_status_transfer() const -{ - assert_choice_type("UplinkRANStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_ueassociated_nrp_pa_transport_s& ngap_elem_procs_o::init_msg_c::ul_ueassociated_nrp_pa_transport() const -{ - assert_choice_type("UplinkUEAssociatedNRPPaTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -void ngap_elem_procs_o::init_msg_c::destroy_() -{ - switch (type_) { - case types::amf_cfg_upd: - c.destroy(); - break; - case types::ho_cancel: - c.destroy(); - break; - case types::ho_required: - c.destroy(); - break; - case types::ho_request: - c.destroy(); - break; - case types::init_context_setup_request: - c.destroy(); - break; - case types::ng_reset: - c.destroy(); - break; - case types::ng_setup_request: - c.destroy(); - break; - case types::path_switch_request: - c.destroy(); - break; - case types::pdu_session_res_modify_request: - c.destroy(); - break; - case types::pdu_session_res_modify_ind: - c.destroy(); - break; - case types::pdu_session_res_release_cmd: - c.destroy(); - break; - case types::pdu_session_res_setup_request: - c.destroy(); - break; - case types::pws_cancel_request: - c.destroy(); - break; - case types::ran_cfg_upd: - c.destroy(); - break; - case types::ue_context_mod_request: - c.destroy(); - break; - case types::ue_context_release_cmd: - c.destroy(); - break; - case types::ue_radio_cap_check_request: - c.destroy(); - break; - case types::write_replace_warning_request: - c.destroy(); - break; - case types::amf_status_ind: - c.destroy(); - break; - case types::cell_traffic_trace: - c.destroy(); - break; - case types::deactiv_trace: - c.destroy(); - break; - case types::dl_nas_transport: - c.destroy(); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - c.destroy(); - break; - case types::dl_ran_cfg_transfer: - c.destroy(); - break; - case types::dl_ran_status_transfer: - c.destroy(); - break; - case types::dl_ueassociated_nrp_pa_transport: - c.destroy(); - break; - case types::error_ind: - c.destroy(); - break; - case types::ho_notify: - c.destroy(); - break; - case types::init_ue_msg: - c.destroy(); - break; - case types::location_report: - c.destroy(); - break; - case types::location_report_ctrl: - c.destroy(); - break; - case types::location_report_fail_ind: - c.destroy(); - break; - case types::nas_non_delivery_ind: - c.destroy(); - break; - case types::overload_start: - c.destroy(); - break; - case types::overload_stop: - c.destroy(); - break; - case types::paging: - c.destroy(); - break; - case types::pdu_session_res_notify: - c.destroy(); - break; - case types::private_msg: - c.destroy(); - break; - case types::pws_fail_ind: - c.destroy(); - break; - case types::pws_restart_ind: - c.destroy(); - break; - case types::reroute_nas_request: - c.destroy(); - break; - case types::rrc_inactive_transition_report: - c.destroy(); - break; - case types::secondary_rat_data_usage_report: - c.destroy(); - break; - case types::trace_fail_ind: - c.destroy(); - break; - case types::trace_start: - c.destroy(); - break; - case types::ue_context_release_request: - c.destroy(); - break; - case types::ue_radio_cap_info_ind: - c.destroy(); - break; - case types::uetnla_binding_release_request: - c.destroy(); - break; - case types::ul_nas_transport: - c.destroy(); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - c.destroy(); - break; - case types::ul_ran_cfg_transfer: - c.destroy(); - break; - case types::ul_ran_status_transfer: - c.destroy(); - break; - case types::ul_ueassociated_nrp_pa_transport: - c.destroy(); - break; - default: - break; - } -} -void ngap_elem_procs_o::init_msg_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::amf_cfg_upd: - c.init(); - break; - case types::ho_cancel: - c.init(); - break; - case types::ho_required: - c.init(); - break; - case types::ho_request: - c.init(); - break; - case types::init_context_setup_request: - c.init(); - break; - case types::ng_reset: - c.init(); - break; - case types::ng_setup_request: - c.init(); - break; - case types::path_switch_request: - c.init(); - break; - case types::pdu_session_res_modify_request: - c.init(); - break; - case types::pdu_session_res_modify_ind: - c.init(); - break; - case types::pdu_session_res_release_cmd: - c.init(); - break; - case types::pdu_session_res_setup_request: - c.init(); - break; - case types::pws_cancel_request: - c.init(); - break; - case types::ran_cfg_upd: - c.init(); - break; - case types::ue_context_mod_request: - c.init(); - break; - case types::ue_context_release_cmd: - c.init(); - break; - case types::ue_radio_cap_check_request: - c.init(); - break; - case types::write_replace_warning_request: - c.init(); - break; - case types::amf_status_ind: - c.init(); - break; - case types::cell_traffic_trace: - c.init(); - break; - case types::deactiv_trace: - c.init(); - break; - case types::dl_nas_transport: - c.init(); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - c.init(); - break; - case types::dl_ran_cfg_transfer: - c.init(); - break; - case types::dl_ran_status_transfer: - c.init(); - break; - case types::dl_ueassociated_nrp_pa_transport: - c.init(); - break; - case types::error_ind: - c.init(); - break; - case types::ho_notify: - c.init(); - break; - case types::init_ue_msg: - c.init(); - break; - case types::location_report: - c.init(); - break; - case types::location_report_ctrl: - c.init(); - break; - case types::location_report_fail_ind: - c.init(); - break; - case types::nas_non_delivery_ind: - c.init(); - break; - case types::overload_start: - c.init(); - break; - case types::overload_stop: - c.init(); - break; - case types::paging: - c.init(); - break; - case types::pdu_session_res_notify: - c.init(); - break; - case types::private_msg: - c.init(); - break; - case types::pws_fail_ind: - c.init(); - break; - case types::pws_restart_ind: - c.init(); - break; - case types::reroute_nas_request: - c.init(); - break; - case types::rrc_inactive_transition_report: - c.init(); - break; - case types::secondary_rat_data_usage_report: - c.init(); - break; - case types::trace_fail_ind: - c.init(); - break; - case types::trace_start: - c.init(); - break; - case types::ue_context_release_request: - c.init(); - break; - case types::ue_radio_cap_info_ind: - c.init(); - break; - case types::uetnla_binding_release_request: - c.init(); - break; - case types::ul_nas_transport: - c.init(); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - c.init(); - break; - case types::ul_ran_cfg_transfer: - c.init(); - break; - case types::ul_ran_status_transfer: - c.init(); - break; - case types::ul_ueassociated_nrp_pa_transport: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); - } -} -ngap_elem_procs_o::init_msg_c::init_msg_c(const ngap_elem_procs_o::init_msg_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::amf_cfg_upd: - c.init(other.c.get()); - break; - case types::ho_cancel: - c.init(other.c.get()); - break; - case types::ho_required: - c.init(other.c.get()); - break; - case types::ho_request: - c.init(other.c.get()); - break; - case types::init_context_setup_request: - c.init(other.c.get()); - break; - case types::ng_reset: - c.init(other.c.get()); - break; - case types::ng_setup_request: - c.init(other.c.get()); - break; - case types::path_switch_request: - c.init(other.c.get()); - break; - case types::pdu_session_res_modify_request: - c.init(other.c.get()); - break; - case types::pdu_session_res_modify_ind: - c.init(other.c.get()); - break; - case types::pdu_session_res_release_cmd: - c.init(other.c.get()); - break; - case types::pdu_session_res_setup_request: - c.init(other.c.get()); - break; - case types::pws_cancel_request: - c.init(other.c.get()); - break; - case types::ran_cfg_upd: - c.init(other.c.get()); - break; - case types::ue_context_mod_request: - c.init(other.c.get()); - break; - case types::ue_context_release_cmd: - c.init(other.c.get()); - break; - case types::ue_radio_cap_check_request: - c.init(other.c.get()); - break; - case types::write_replace_warning_request: - c.init(other.c.get()); - break; - case types::amf_status_ind: - c.init(other.c.get()); - break; - case types::cell_traffic_trace: - c.init(other.c.get()); - break; - case types::deactiv_trace: - c.init(other.c.get()); - break; - case types::dl_nas_transport: - c.init(other.c.get()); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - c.init(other.c.get()); - break; - case types::dl_ran_cfg_transfer: - c.init(other.c.get()); - break; - case types::dl_ran_status_transfer: - c.init(other.c.get()); - break; - case types::dl_ueassociated_nrp_pa_transport: - c.init(other.c.get()); - break; - case types::error_ind: - c.init(other.c.get()); - break; - case types::ho_notify: - c.init(other.c.get()); - break; - case types::init_ue_msg: - c.init(other.c.get()); - break; - case types::location_report: - c.init(other.c.get()); - break; - case types::location_report_ctrl: - c.init(other.c.get()); - break; - case types::location_report_fail_ind: - c.init(other.c.get()); - break; - case types::nas_non_delivery_ind: - c.init(other.c.get()); - break; - case types::overload_start: - c.init(other.c.get()); - break; - case types::overload_stop: - c.init(other.c.get()); - break; - case types::paging: - c.init(other.c.get()); - break; - case types::pdu_session_res_notify: - c.init(other.c.get()); - break; - case types::private_msg: - c.init(other.c.get()); - break; - case types::pws_fail_ind: - c.init(other.c.get()); - break; - case types::pws_restart_ind: - c.init(other.c.get()); - break; - case types::reroute_nas_request: - c.init(other.c.get()); - break; - case types::rrc_inactive_transition_report: - c.init(other.c.get()); - break; - case types::secondary_rat_data_usage_report: - c.init(other.c.get()); - break; - case types::trace_fail_ind: - c.init(other.c.get()); - break; - case types::trace_start: - c.init(other.c.get()); - break; - case types::ue_context_release_request: - c.init(other.c.get()); - break; - case types::ue_radio_cap_info_ind: - c.init(other.c.get()); - break; - case types::uetnla_binding_release_request: - c.init(other.c.get()); - break; - case types::ul_nas_transport: - c.init(other.c.get()); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - c.init(other.c.get()); - break; - case types::ul_ran_cfg_transfer: - c.init(other.c.get()); - break; - case types::ul_ran_status_transfer: - c.init(other.c.get()); - break; - case types::ul_ueassociated_nrp_pa_transport: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); - } -} -ngap_elem_procs_o::init_msg_c& ngap_elem_procs_o::init_msg_c::operator=(const ngap_elem_procs_o::init_msg_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::amf_cfg_upd: - c.set(other.c.get()); - break; - case types::ho_cancel: - c.set(other.c.get()); - break; - case types::ho_required: - c.set(other.c.get()); - break; - case types::ho_request: - c.set(other.c.get()); - break; - case types::init_context_setup_request: - c.set(other.c.get()); - break; - case types::ng_reset: - c.set(other.c.get()); - break; - case types::ng_setup_request: - c.set(other.c.get()); - break; - case types::path_switch_request: - c.set(other.c.get()); - break; - case types::pdu_session_res_modify_request: - c.set(other.c.get()); - break; - case types::pdu_session_res_modify_ind: - c.set(other.c.get()); - break; - case types::pdu_session_res_release_cmd: - c.set(other.c.get()); - break; - case types::pdu_session_res_setup_request: - c.set(other.c.get()); - break; - case types::pws_cancel_request: - c.set(other.c.get()); - break; - case types::ran_cfg_upd: - c.set(other.c.get()); - break; - case types::ue_context_mod_request: - c.set(other.c.get()); - break; - case types::ue_context_release_cmd: - c.set(other.c.get()); - break; - case types::ue_radio_cap_check_request: - c.set(other.c.get()); - break; - case types::write_replace_warning_request: - c.set(other.c.get()); - break; - case types::amf_status_ind: - c.set(other.c.get()); - break; - case types::cell_traffic_trace: - c.set(other.c.get()); - break; - case types::deactiv_trace: - c.set(other.c.get()); - break; - case types::dl_nas_transport: - c.set(other.c.get()); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - c.set(other.c.get()); - break; - case types::dl_ran_cfg_transfer: - c.set(other.c.get()); - break; - case types::dl_ran_status_transfer: - c.set(other.c.get()); - break; - case types::dl_ueassociated_nrp_pa_transport: - c.set(other.c.get()); - break; - case types::error_ind: - c.set(other.c.get()); - break; - case types::ho_notify: - c.set(other.c.get()); - break; - case types::init_ue_msg: - c.set(other.c.get()); - break; - case types::location_report: - c.set(other.c.get()); - break; - case types::location_report_ctrl: - c.set(other.c.get()); - break; - case types::location_report_fail_ind: - c.set(other.c.get()); - break; - case types::nas_non_delivery_ind: - c.set(other.c.get()); - break; - case types::overload_start: - c.set(other.c.get()); - break; - case types::overload_stop: - c.set(other.c.get()); - break; - case types::paging: - c.set(other.c.get()); - break; - case types::pdu_session_res_notify: - c.set(other.c.get()); - break; - case types::private_msg: - c.set(other.c.get()); - break; - case types::pws_fail_ind: - c.set(other.c.get()); - break; - case types::pws_restart_ind: - c.set(other.c.get()); - break; - case types::reroute_nas_request: - c.set(other.c.get()); - break; - case types::rrc_inactive_transition_report: - c.set(other.c.get()); - break; - case types::secondary_rat_data_usage_report: - c.set(other.c.get()); - break; - case types::trace_fail_ind: - c.set(other.c.get()); - break; - case types::trace_start: - c.set(other.c.get()); - break; - case types::ue_context_release_request: - c.set(other.c.get()); - break; - case types::ue_radio_cap_info_ind: - c.set(other.c.get()); - break; - case types::uetnla_binding_release_request: - c.set(other.c.get()); - break; - case types::ul_nas_transport: - c.set(other.c.get()); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - c.set(other.c.get()); - break; - case types::ul_ran_cfg_transfer: - c.set(other.c.get()); - break; - case types::ul_ran_status_transfer: - c.set(other.c.get()); - break; - case types::ul_ueassociated_nrp_pa_transport: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); - } - - return *this; -} -void ngap_elem_procs_o::init_msg_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::amf_cfg_upd: - j.write_fieldname("AMFConfigurationUpdate"); - c.get().to_json(j); - break; - case types::ho_cancel: - j.write_fieldname("HandoverCancel"); - c.get().to_json(j); - break; - case types::ho_required: - j.write_fieldname("HandoverRequired"); - c.get().to_json(j); - break; - case types::ho_request: - j.write_fieldname("HandoverRequest"); - c.get().to_json(j); - break; - case types::init_context_setup_request: - j.write_fieldname("InitialContextSetupRequest"); - c.get().to_json(j); - break; - case types::ng_reset: - j.write_fieldname("NGReset"); - c.get().to_json(j); - break; - case types::ng_setup_request: - j.write_fieldname("NGSetupRequest"); - c.get().to_json(j); - break; - case types::path_switch_request: - j.write_fieldname("PathSwitchRequest"); - c.get().to_json(j); - break; - case types::pdu_session_res_modify_request: - j.write_fieldname("PDUSessionResourceModifyRequest"); - c.get().to_json(j); - break; - case types::pdu_session_res_modify_ind: - j.write_fieldname("PDUSessionResourceModifyIndication"); - c.get().to_json(j); - break; - case types::pdu_session_res_release_cmd: - j.write_fieldname("PDUSessionResourceReleaseCommand"); - c.get().to_json(j); - break; - case types::pdu_session_res_setup_request: - j.write_fieldname("PDUSessionResourceSetupRequest"); - c.get().to_json(j); - break; - case types::pws_cancel_request: - j.write_fieldname("PWSCancelRequest"); - c.get().to_json(j); - break; - case types::ran_cfg_upd: - j.write_fieldname("RANConfigurationUpdate"); - c.get().to_json(j); - break; - case types::ue_context_mod_request: - j.write_fieldname("UEContextModificationRequest"); - c.get().to_json(j); - break; - case types::ue_context_release_cmd: - j.write_fieldname("UEContextReleaseCommand"); - c.get().to_json(j); - break; - case types::ue_radio_cap_check_request: - j.write_fieldname("UERadioCapabilityCheckRequest"); - c.get().to_json(j); - break; - case types::write_replace_warning_request: - j.write_fieldname("WriteReplaceWarningRequest"); - c.get().to_json(j); - break; - case types::amf_status_ind: - j.write_fieldname("AMFStatusIndication"); - c.get().to_json(j); - break; - case types::cell_traffic_trace: - j.write_fieldname("CellTrafficTrace"); - c.get().to_json(j); - break; - case types::deactiv_trace: - j.write_fieldname("DeactivateTrace"); - c.get().to_json(j); - break; - case types::dl_nas_transport: - j.write_fieldname("DownlinkNASTransport"); - c.get().to_json(j); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - j.write_fieldname("DownlinkNonUEAssociatedNRPPaTransport"); - c.get().to_json(j); - break; - case types::dl_ran_cfg_transfer: - j.write_fieldname("DownlinkRANConfigurationTransfer"); - c.get().to_json(j); - break; - case types::dl_ran_status_transfer: - j.write_fieldname("DownlinkRANStatusTransfer"); - c.get().to_json(j); - break; - case types::dl_ueassociated_nrp_pa_transport: - j.write_fieldname("DownlinkUEAssociatedNRPPaTransport"); - c.get().to_json(j); - break; - case types::error_ind: - j.write_fieldname("ErrorIndication"); - c.get().to_json(j); - break; - case types::ho_notify: - j.write_fieldname("HandoverNotify"); - c.get().to_json(j); - break; - case types::init_ue_msg: - j.write_fieldname("InitialUEMessage"); - c.get().to_json(j); - break; - case types::location_report: - j.write_fieldname("LocationReport"); - c.get().to_json(j); - break; - case types::location_report_ctrl: - j.write_fieldname("LocationReportingControl"); - c.get().to_json(j); - break; - case types::location_report_fail_ind: - j.write_fieldname("LocationReportingFailureIndication"); - c.get().to_json(j); - break; - case types::nas_non_delivery_ind: - j.write_fieldname("NASNonDeliveryIndication"); - c.get().to_json(j); - break; - case types::overload_start: - j.write_fieldname("OverloadStart"); - c.get().to_json(j); - break; - case types::overload_stop: - j.write_fieldname("OverloadStop"); - c.get().to_json(j); - break; - case types::paging: - j.write_fieldname("Paging"); - c.get().to_json(j); - break; - case types::pdu_session_res_notify: - j.write_fieldname("PDUSessionResourceNotify"); - c.get().to_json(j); - break; - case types::private_msg: - j.write_fieldname("PrivateMessage"); - c.get().to_json(j); - break; - case types::pws_fail_ind: - j.write_fieldname("PWSFailureIndication"); - c.get().to_json(j); - break; - case types::pws_restart_ind: - j.write_fieldname("PWSRestartIndication"); - c.get().to_json(j); - break; - case types::reroute_nas_request: - j.write_fieldname("RerouteNASRequest"); - c.get().to_json(j); - break; - case types::rrc_inactive_transition_report: - j.write_fieldname("RRCInactiveTransitionReport"); - c.get().to_json(j); - break; - case types::secondary_rat_data_usage_report: - j.write_fieldname("SecondaryRATDataUsageReport"); - c.get().to_json(j); - break; - case types::trace_fail_ind: - j.write_fieldname("TraceFailureIndication"); - c.get().to_json(j); - break; - case types::trace_start: - j.write_fieldname("TraceStart"); - c.get().to_json(j); - break; - case types::ue_context_release_request: - j.write_fieldname("UEContextReleaseRequest"); - c.get().to_json(j); - break; - case types::ue_radio_cap_info_ind: - j.write_fieldname("UERadioCapabilityInfoIndication"); - c.get().to_json(j); - break; - case types::uetnla_binding_release_request: - j.write_fieldname("UETNLABindingReleaseRequest"); - c.get().to_json(j); - break; - case types::ul_nas_transport: - j.write_fieldname("UplinkNASTransport"); - c.get().to_json(j); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - j.write_fieldname("UplinkNonUEAssociatedNRPPaTransport"); - c.get().to_json(j); - break; - case types::ul_ran_cfg_transfer: - j.write_fieldname("UplinkRANConfigurationTransfer"); - c.get().to_json(j); - break; - case types::ul_ran_status_transfer: - j.write_fieldname("UplinkRANStatusTransfer"); - c.get().to_json(j); - break; - case types::ul_ueassociated_nrp_pa_transport: - j.write_fieldname("UplinkUEAssociatedNRPPaTransport"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); - } - j.end_obj(); -} -SRSASN_CODE ngap_elem_procs_o::init_msg_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - switch (type_) { - case types::amf_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_cancel: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_required: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ng_reset: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ng_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdu_session_res_modify_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdu_session_res_modify_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdu_session_res_release_cmd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdu_session_res_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pws_cancel_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ran_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_release_cmd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_radio_cap_check_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::write_replace_warning_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::amf_status_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::cell_traffic_trace: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::deactiv_trace: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_nas_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_ran_cfg_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_ran_status_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::error_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_notify: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::init_ue_msg: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::location_report: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::location_report_ctrl: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::location_report_fail_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::nas_non_delivery_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::overload_start: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::overload_stop: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::paging: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdu_session_res_notify: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::private_msg: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pws_fail_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pws_restart_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::reroute_nas_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::rrc_inactive_transition_report: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::secondary_rat_data_usage_report: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::trace_fail_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::trace_start: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_release_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_radio_cap_info_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::uetnla_binding_release_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_nas_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_ran_cfg_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_ran_status_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ngap_elem_procs_o::init_msg_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - switch (type_) { - case types::amf_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_cancel: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_required: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ng_reset: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ng_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdu_session_res_modify_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdu_session_res_modify_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdu_session_res_release_cmd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdu_session_res_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pws_cancel_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ran_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_release_cmd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_radio_cap_check_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::write_replace_warning_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::amf_status_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::cell_traffic_trace: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::deactiv_trace: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_nas_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_non_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_ran_cfg_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_ran_status_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::error_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_notify: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::init_ue_msg: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::location_report: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::location_report_ctrl: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::location_report_fail_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::nas_non_delivery_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::overload_start: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::overload_stop: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::paging: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdu_session_res_notify: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::private_msg: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pws_fail_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pws_restart_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::reroute_nas_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::rrc_inactive_transition_report: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::secondary_rat_data_usage_report: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::trace_fail_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::trace_start: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_release_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_radio_cap_info_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::uetnla_binding_release_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_nas_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_non_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_ran_cfg_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_ran_status_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_ueassociated_nrp_pa_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::init_msg_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string ngap_elem_procs_o::init_msg_c::types_opts::to_string() const -{ - static constexpr const char* options[] = {"AMFConfigurationUpdate", - "HandoverCancel", - "HandoverRequired", - "HandoverRequest", - "InitialContextSetupRequest", - "NGReset", - "NGSetupRequest", - "PathSwitchRequest", - "PDUSessionResourceModifyRequest", - "PDUSessionResourceModifyIndication", - "PDUSessionResourceReleaseCommand", - "PDUSessionResourceSetupRequest", - "PWSCancelRequest", - "RANConfigurationUpdate", - "UEContextModificationRequest", - "UEContextReleaseCommand", - "UERadioCapabilityCheckRequest", - "WriteReplaceWarningRequest", - "AMFStatusIndication", - "CellTrafficTrace", - "DeactivateTrace", - "DownlinkNASTransport", - "DownlinkNonUEAssociatedNRPPaTransport", - "DownlinkRANConfigurationTransfer", - "DownlinkRANStatusTransfer", - "DownlinkUEAssociatedNRPPaTransport", - "ErrorIndication", - "HandoverNotify", - "InitialUEMessage", - "LocationReport", - "LocationReportingControl", - "LocationReportingFailureIndication", - "NASNonDeliveryIndication", - "OverloadStart", - "OverloadStop", - "Paging", - "PDUSessionResourceNotify", - "PrivateMessage", - "PWSFailureIndication", - "PWSRestartIndication", - "RerouteNASRequest", - "RRCInactiveTransitionReport", - "SecondaryRATDataUsageReport", - "TraceFailureIndication", - "TraceStart", - "UEContextReleaseRequest", - "UERadioCapabilityInfoIndication", - "UETNLABindingReleaseRequest", - "UplinkNASTransport", - "UplinkNonUEAssociatedNRPPaTransport", - "UplinkRANConfigurationTransfer", - "UplinkRANStatusTransfer", - "UplinkUEAssociatedNRPPaTransport"}; - return convert_enum_idx(options, 53, value, "ngap_elem_procs_o::init_msg_c::types"); -} - -// SuccessfulOutcome ::= OPEN TYPE -amf_cfg_upd_ack_s& ngap_elem_procs_o::successful_outcome_c::amf_cfg_upd() -{ - assert_choice_type("AMFConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ho_cancel_ack_s& ngap_elem_procs_o::successful_outcome_c::ho_cancel() -{ - assert_choice_type("HandoverCancelAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ho_cmd_s& ngap_elem_procs_o::successful_outcome_c::ho_required() -{ - assert_choice_type("HandoverCommand", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ho_request_ack_s& ngap_elem_procs_o::successful_outcome_c::ho_request() -{ - assert_choice_type("HandoverRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -init_context_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::init_context_setup_request() -{ - assert_choice_type("InitialContextSetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ng_reset_ack_s& ngap_elem_procs_o::successful_outcome_c::ng_reset() -{ - assert_choice_type("NGResetAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ng_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::ng_setup_request() -{ - assert_choice_type("NGSetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -path_switch_request_ack_s& ngap_elem_procs_o::successful_outcome_c::path_switch_request() -{ - assert_choice_type("PathSwitchRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -pdu_session_res_modify_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_modify_request() -{ - assert_choice_type("PDUSessionResourceModifyResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -pdu_session_res_modify_confirm_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_modify_ind() -{ - assert_choice_type("PDUSessionResourceModifyConfirm", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -pdu_session_res_release_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_release_cmd() -{ - assert_choice_type("PDUSessionResourceReleaseResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -pdu_session_res_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_setup_request() -{ - assert_choice_type("PDUSessionResourceSetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -pws_cancel_resp_s& ngap_elem_procs_o::successful_outcome_c::pws_cancel_request() -{ - assert_choice_type("PWSCancelResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ran_cfg_upd_ack_s& ngap_elem_procs_o::successful_outcome_c::ran_cfg_upd() -{ - assert_choice_type("RANConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ue_context_mod_resp_s& ngap_elem_procs_o::successful_outcome_c::ue_context_mod_request() -{ - assert_choice_type("UEContextModificationResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ue_context_release_complete_s& ngap_elem_procs_o::successful_outcome_c::ue_context_release_cmd() -{ - assert_choice_type("UEContextReleaseComplete", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ue_radio_cap_check_resp_s& ngap_elem_procs_o::successful_outcome_c::ue_radio_cap_check_request() -{ - assert_choice_type("UERadioCapabilityCheckResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -write_replace_warning_resp_s& ngap_elem_procs_o::successful_outcome_c::write_replace_warning_request() -{ - assert_choice_type("WriteReplaceWarningResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const amf_cfg_upd_ack_s& ngap_elem_procs_o::successful_outcome_c::amf_cfg_upd() const -{ - assert_choice_type("AMFConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ho_cancel_ack_s& ngap_elem_procs_o::successful_outcome_c::ho_cancel() const -{ - assert_choice_type("HandoverCancelAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ho_cmd_s& ngap_elem_procs_o::successful_outcome_c::ho_required() const -{ - assert_choice_type("HandoverCommand", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ho_request_ack_s& ngap_elem_procs_o::successful_outcome_c::ho_request() const -{ - assert_choice_type("HandoverRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const init_context_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::init_context_setup_request() const -{ - assert_choice_type("InitialContextSetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ng_reset_ack_s& ngap_elem_procs_o::successful_outcome_c::ng_reset() const -{ - assert_choice_type("NGResetAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ng_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::ng_setup_request() const -{ - assert_choice_type("NGSetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const path_switch_request_ack_s& ngap_elem_procs_o::successful_outcome_c::path_switch_request() const -{ - assert_choice_type("PathSwitchRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const pdu_session_res_modify_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_modify_request() const -{ - assert_choice_type("PDUSessionResourceModifyResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const pdu_session_res_modify_confirm_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_modify_ind() const -{ - assert_choice_type("PDUSessionResourceModifyConfirm", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const pdu_session_res_release_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_release_cmd() const -{ - assert_choice_type("PDUSessionResourceReleaseResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const pdu_session_res_setup_resp_s& ngap_elem_procs_o::successful_outcome_c::pdu_session_res_setup_request() const -{ - assert_choice_type("PDUSessionResourceSetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const pws_cancel_resp_s& ngap_elem_procs_o::successful_outcome_c::pws_cancel_request() const -{ - assert_choice_type("PWSCancelResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ran_cfg_upd_ack_s& ngap_elem_procs_o::successful_outcome_c::ran_cfg_upd() const -{ - assert_choice_type("RANConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ue_context_mod_resp_s& ngap_elem_procs_o::successful_outcome_c::ue_context_mod_request() const -{ - assert_choice_type("UEContextModificationResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ue_context_release_complete_s& ngap_elem_procs_o::successful_outcome_c::ue_context_release_cmd() const -{ - assert_choice_type("UEContextReleaseComplete", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ue_radio_cap_check_resp_s& ngap_elem_procs_o::successful_outcome_c::ue_radio_cap_check_request() const -{ - assert_choice_type("UERadioCapabilityCheckResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const write_replace_warning_resp_s& ngap_elem_procs_o::successful_outcome_c::write_replace_warning_request() const -{ - assert_choice_type("WriteReplaceWarningResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -void ngap_elem_procs_o::successful_outcome_c::destroy_() -{ - switch (type_) { - case types::amf_cfg_upd: - c.destroy(); - break; - case types::ho_cancel: - c.destroy(); - break; - case types::ho_required: - c.destroy(); - break; - case types::ho_request: - c.destroy(); - break; - case types::init_context_setup_request: - c.destroy(); - break; - case types::ng_reset: - c.destroy(); - break; - case types::ng_setup_request: - c.destroy(); - break; - case types::path_switch_request: - c.destroy(); - break; - case types::pdu_session_res_modify_request: - c.destroy(); - break; - case types::pdu_session_res_modify_ind: - c.destroy(); - break; - case types::pdu_session_res_release_cmd: - c.destroy(); - break; - case types::pdu_session_res_setup_request: - c.destroy(); - break; - case types::pws_cancel_request: - c.destroy(); - break; - case types::ran_cfg_upd: - c.destroy(); - break; - case types::ue_context_mod_request: - c.destroy(); - break; - case types::ue_context_release_cmd: - c.destroy(); - break; - case types::ue_radio_cap_check_request: - c.destroy(); - break; - case types::write_replace_warning_request: - c.destroy(); - break; - default: - break; - } -} -void ngap_elem_procs_o::successful_outcome_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::amf_cfg_upd: - c.init(); - break; - case types::ho_cancel: - c.init(); - break; - case types::ho_required: - c.init(); - break; - case types::ho_request: - c.init(); - break; - case types::init_context_setup_request: - c.init(); - break; - case types::ng_reset: - c.init(); - break; - case types::ng_setup_request: - c.init(); - break; - case types::path_switch_request: - c.init(); - break; - case types::pdu_session_res_modify_request: - c.init(); - break; - case types::pdu_session_res_modify_ind: - c.init(); - break; - case types::pdu_session_res_release_cmd: - c.init(); - break; - case types::pdu_session_res_setup_request: - c.init(); - break; - case types::pws_cancel_request: - c.init(); - break; - case types::ran_cfg_upd: - c.init(); - break; - case types::ue_context_mod_request: - c.init(); - break; - case types::ue_context_release_cmd: - c.init(); - break; - case types::ue_radio_cap_check_request: - c.init(); - break; - case types::write_replace_warning_request: - c.init(); - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: - break; - case types::ul_ueassociated_nrp_pa_transport: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); - } -} -ngap_elem_procs_o::successful_outcome_c::successful_outcome_c(const ngap_elem_procs_o::successful_outcome_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::amf_cfg_upd: - c.init(other.c.get()); - break; - case types::ho_cancel: - c.init(other.c.get()); - break; - case types::ho_required: - c.init(other.c.get()); - break; - case types::ho_request: - c.init(other.c.get()); - break; - case types::init_context_setup_request: - c.init(other.c.get()); - break; - case types::ng_reset: - c.init(other.c.get()); - break; - case types::ng_setup_request: - c.init(other.c.get()); - break; - case types::path_switch_request: - c.init(other.c.get()); - break; - case types::pdu_session_res_modify_request: - c.init(other.c.get()); - break; - case types::pdu_session_res_modify_ind: - c.init(other.c.get()); - break; - case types::pdu_session_res_release_cmd: - c.init(other.c.get()); - break; - case types::pdu_session_res_setup_request: - c.init(other.c.get()); - break; - case types::pws_cancel_request: - c.init(other.c.get()); - break; - case types::ran_cfg_upd: - c.init(other.c.get()); - break; - case types::ue_context_mod_request: - c.init(other.c.get()); - break; - case types::ue_context_release_cmd: - c.init(other.c.get()); - break; - case types::ue_radio_cap_check_request: - c.init(other.c.get()); - break; - case types::write_replace_warning_request: - c.init(other.c.get()); - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: - break; - case types::ul_ueassociated_nrp_pa_transport: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); - } -} -ngap_elem_procs_o::successful_outcome_c& ngap_elem_procs_o::successful_outcome_c:: - operator=(const ngap_elem_procs_o::successful_outcome_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::amf_cfg_upd: - c.set(other.c.get()); - break; - case types::ho_cancel: - c.set(other.c.get()); - break; - case types::ho_required: - c.set(other.c.get()); - break; - case types::ho_request: - c.set(other.c.get()); - break; - case types::init_context_setup_request: - c.set(other.c.get()); - break; - case types::ng_reset: - c.set(other.c.get()); - break; - case types::ng_setup_request: - c.set(other.c.get()); - break; - case types::path_switch_request: - c.set(other.c.get()); - break; - case types::pdu_session_res_modify_request: - c.set(other.c.get()); - break; - case types::pdu_session_res_modify_ind: - c.set(other.c.get()); - break; - case types::pdu_session_res_release_cmd: - c.set(other.c.get()); - break; - case types::pdu_session_res_setup_request: - c.set(other.c.get()); - break; - case types::pws_cancel_request: - c.set(other.c.get()); - break; - case types::ran_cfg_upd: - c.set(other.c.get()); - break; - case types::ue_context_mod_request: - c.set(other.c.get()); - break; - case types::ue_context_release_cmd: - c.set(other.c.get()); - break; - case types::ue_radio_cap_check_request: - c.set(other.c.get()); - break; - case types::write_replace_warning_request: - c.set(other.c.get()); - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: - break; - case types::ul_ueassociated_nrp_pa_transport: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); - } - - return *this; -} -void ngap_elem_procs_o::successful_outcome_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::amf_cfg_upd: - j.write_fieldname("AMFConfigurationUpdateAcknowledge"); - c.get().to_json(j); - break; - case types::ho_cancel: - j.write_fieldname("HandoverCancelAcknowledge"); - c.get().to_json(j); - break; - case types::ho_required: - j.write_fieldname("HandoverCommand"); - c.get().to_json(j); - break; - case types::ho_request: - j.write_fieldname("HandoverRequestAcknowledge"); - c.get().to_json(j); - break; - case types::init_context_setup_request: - j.write_fieldname("InitialContextSetupResponse"); - c.get().to_json(j); - break; - case types::ng_reset: - j.write_fieldname("NGResetAcknowledge"); - c.get().to_json(j); - break; - case types::ng_setup_request: - j.write_fieldname("NGSetupResponse"); - c.get().to_json(j); - break; - case types::path_switch_request: - j.write_fieldname("PathSwitchRequestAcknowledge"); - c.get().to_json(j); - break; - case types::pdu_session_res_modify_request: - j.write_fieldname("PDUSessionResourceModifyResponse"); - c.get().to_json(j); - break; - case types::pdu_session_res_modify_ind: - j.write_fieldname("PDUSessionResourceModifyConfirm"); - c.get().to_json(j); - break; - case types::pdu_session_res_release_cmd: - j.write_fieldname("PDUSessionResourceReleaseResponse"); - c.get().to_json(j); - break; - case types::pdu_session_res_setup_request: - j.write_fieldname("PDUSessionResourceSetupResponse"); - c.get().to_json(j); - break; - case types::pws_cancel_request: - j.write_fieldname("PWSCancelResponse"); - c.get().to_json(j); - break; - case types::ran_cfg_upd: - j.write_fieldname("RANConfigurationUpdateAcknowledge"); - c.get().to_json(j); - break; - case types::ue_context_mod_request: - j.write_fieldname("UEContextModificationResponse"); - c.get().to_json(j); - break; - case types::ue_context_release_cmd: - j.write_fieldname("UEContextReleaseComplete"); - c.get().to_json(j); - break; - case types::ue_radio_cap_check_request: - j.write_fieldname("UERadioCapabilityCheckResponse"); - c.get().to_json(j); - break; - case types::write_replace_warning_request: - j.write_fieldname("WriteReplaceWarningResponse"); - c.get().to_json(j); - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: - break; - case types::ul_ueassociated_nrp_pa_transport: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); - } - j.end_obj(); -} -SRSASN_CODE ngap_elem_procs_o::successful_outcome_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - switch (type_) { - case types::amf_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_cancel: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_required: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ng_reset: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ng_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdu_session_res_modify_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdu_session_res_modify_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdu_session_res_release_cmd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdu_session_res_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pws_cancel_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ran_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_release_cmd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_radio_cap_check_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::write_replace_warning_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: - break; - case types::ul_ueassociated_nrp_pa_transport: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ngap_elem_procs_o::successful_outcome_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - switch (type_) { - case types::amf_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_cancel: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_required: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ng_reset: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ng_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdu_session_res_modify_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdu_session_res_modify_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdu_session_res_release_cmd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdu_session_res_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pws_cancel_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ran_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_release_cmd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_radio_cap_check_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::write_replace_warning_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: - break; - case types::ul_ueassociated_nrp_pa_transport: - break; - default: - log_invalid_choice_id(type_, "ngap_elem_procs_o::successful_outcome_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string ngap_elem_procs_o::successful_outcome_c::types_opts::to_string() const -{ - static constexpr const char* options[] = {"AMFConfigurationUpdateAcknowledge", - "HandoverCancelAcknowledge", - "HandoverCommand", - "HandoverRequestAcknowledge", - "InitialContextSetupResponse", - "NGResetAcknowledge", - "NGSetupResponse", - "PathSwitchRequestAcknowledge", - "PDUSessionResourceModifyResponse", - "PDUSessionResourceModifyConfirm", - "PDUSessionResourceReleaseResponse", - "PDUSessionResourceSetupResponse", - "PWSCancelResponse", - "RANConfigurationUpdateAcknowledge", - "UEContextModificationResponse", - "UEContextReleaseComplete", - "UERadioCapabilityCheckResponse", - "WriteReplaceWarningResponse", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL"}; - return convert_enum_idx(options, 53, value, "ngap_elem_procs_o::successful_outcome_c::types"); -} - -// UnsuccessfulOutcome ::= OPEN TYPE -amf_cfg_upd_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::amf_cfg_upd() -{ - assert_choice_type("AMFConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -ho_prep_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ho_required() -{ - assert_choice_type("HandoverPreparationFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -ho_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ho_request() -{ - assert_choice_type("HandoverFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -init_context_setup_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::init_context_setup_request() -{ - assert_choice_type("InitialContextSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -ng_setup_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ng_setup_request() -{ - assert_choice_type("NGSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -path_switch_request_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::path_switch_request() -{ - assert_choice_type("PathSwitchRequestFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -ran_cfg_upd_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ran_cfg_upd() -{ - assert_choice_type("RANConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -ue_context_mod_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ue_context_mod_request() -{ - assert_choice_type("UEContextModificationFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const amf_cfg_upd_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::amf_cfg_upd() const -{ - assert_choice_type("AMFConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const ho_prep_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ho_required() const -{ - assert_choice_type("HandoverPreparationFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const ho_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ho_request() const -{ - assert_choice_type("HandoverFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const init_context_setup_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::init_context_setup_request() const -{ - assert_choice_type("InitialContextSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const ng_setup_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ng_setup_request() const -{ - assert_choice_type("NGSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const path_switch_request_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::path_switch_request() const -{ - assert_choice_type("PathSwitchRequestFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const ran_cfg_upd_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ran_cfg_upd() const -{ - assert_choice_type("RANConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const ue_context_mod_fail_s& ngap_elem_procs_o::unsuccessful_outcome_c::ue_context_mod_request() const -{ - assert_choice_type("UEContextModificationFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -void ngap_elem_procs_o::unsuccessful_outcome_c::destroy_() -{ - switch (type_) { - case types::amf_cfg_upd: - c.destroy(); - break; - case types::ho_required: - c.destroy(); - break; - case types::ho_request: - c.destroy(); - break; - case types::init_context_setup_request: - c.destroy(); - break; - case types::ng_setup_request: - c.destroy(); - break; - case types::path_switch_request: - c.destroy(); - break; - case types::ran_cfg_upd: - c.destroy(); - break; - case types::ue_context_mod_request: - c.destroy(); - break; - default: - break; - } -} -void ngap_elem_procs_o::unsuccessful_outcome_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::amf_cfg_upd: - c.init(); - break; - case types::ho_cancel: - break; - case types::ho_required: - c.init(); - break; - case types::ho_request: - c.init(); - break; - case types::init_context_setup_request: - c.init(); - break; - case types::ng_reset: - break; - case types::ng_setup_request: - c.init(); - break; - case types::path_switch_request: - c.init(); - break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: - c.init(); - break; - case types::ue_context_mod_request: - c.init(); - break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: + case types::ran_cfg_upd_fail: + c.init(); break; - case types::ul_ueassociated_nrp_pa_transport: + case types::ue_context_mod_fail: + c.init(); break; case types::nulltype: break; @@ -56868,120 +52284,30 @@ ngap_elem_procs_o::unsuccessful_outcome_c::unsuccessful_outcome_c( { type_ = other.type(); switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_fail: c.init(other.c.get()); break; - case types::ho_cancel: - break; - case types::ho_required: + case types::ho_prep_fail: c.init(other.c.get()); break; - case types::ho_request: + case types::ho_fail: c.init(other.c.get()); break; - case types::init_context_setup_request: + case types::init_context_setup_fail: c.init(other.c.get()); break; - case types::ng_reset: - break; - case types::ng_setup_request: + case types::ng_setup_fail: c.init(other.c.get()); break; - case types::path_switch_request: + case types::path_switch_request_fail: c.init(other.c.get()); break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_fail: c.init(other.c.get()); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: c.init(other.c.get()); break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: - break; - case types::ul_ueassociated_nrp_pa_transport: - break; case types::nulltype: break; default: @@ -56996,120 +52322,30 @@ ngap_elem_procs_o::unsuccessful_outcome_c& ngap_elem_procs_o::unsuccessful_outco } set(other.type()); switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_fail: c.set(other.c.get()); break; - case types::ho_cancel: - break; - case types::ho_required: + case types::ho_prep_fail: c.set(other.c.get()); break; - case types::ho_request: + case types::ho_fail: c.set(other.c.get()); break; - case types::init_context_setup_request: + case types::init_context_setup_fail: c.set(other.c.get()); break; - case types::ng_reset: - break; - case types::ng_setup_request: + case types::ng_setup_fail: c.set(other.c.get()); break; - case types::path_switch_request: + case types::path_switch_request_fail: c.set(other.c.get()); break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_fail: c.set(other.c.get()); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: c.set(other.c.get()); break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: - break; - case types::ul_ueassociated_nrp_pa_transport: - break; case types::nulltype: break; default: @@ -57122,128 +52358,38 @@ void ngap_elem_procs_o::unsuccessful_outcome_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_fail: j.write_fieldname("AMFConfigurationUpdateFailure"); c.get().to_json(j); break; - case types::ho_cancel: - break; - case types::ho_required: + case types::ho_prep_fail: j.write_fieldname("HandoverPreparationFailure"); c.get().to_json(j); break; - case types::ho_request: + case types::ho_fail: j.write_fieldname("HandoverFailure"); c.get().to_json(j); break; - case types::init_context_setup_request: + case types::init_context_setup_fail: j.write_fieldname("InitialContextSetupFailure"); c.get().to_json(j); break; - case types::ng_reset: - break; - case types::ng_setup_request: + case types::ng_setup_fail: j.write_fieldname("NGSetupFailure"); c.get().to_json(j); break; - case types::path_switch_request: + case types::path_switch_request_fail: j.write_fieldname("PathSwitchRequestFailure"); c.get().to_json(j); break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_fail: j.write_fieldname("RANConfigurationUpdateFailure"); c.get().to_json(j); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: j.write_fieldname("UEContextModificationFailure"); c.get().to_json(j); break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: - break; - case types::ul_ueassociated_nrp_pa_transport: - break; default: log_invalid_choice_id(type_, "ngap_elem_procs_o::unsuccessful_outcome_c"); } @@ -57253,120 +52399,30 @@ SRSASN_CODE ngap_elem_procs_o::unsuccessful_outcome_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::ho_cancel: - break; - case types::ho_required: + case types::ho_prep_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::ho_request: + case types::ho_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::init_context_setup_request: + case types::init_context_setup_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::ng_reset: - break; - case types::ng_setup_request: + case types::ng_setup_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::path_switch_request: + case types::path_switch_request_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: - break; - case types::ul_ueassociated_nrp_pa_transport: - break; default: log_invalid_choice_id(type_, "ngap_elem_procs_o::unsuccessful_outcome_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -57377,120 +52433,30 @@ SRSASN_CODE ngap_elem_procs_o::unsuccessful_outcome_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); switch (type_) { - case types::amf_cfg_upd: + case types::amf_cfg_upd_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ho_cancel: - break; - case types::ho_required: + case types::ho_prep_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ho_request: + case types::ho_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::init_context_setup_request: + case types::init_context_setup_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ng_reset: - break; - case types::ng_setup_request: + case types::ng_setup_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::path_switch_request: + case types::path_switch_request_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::pdu_session_res_modify_request: - break; - case types::pdu_session_res_modify_ind: - break; - case types::pdu_session_res_release_cmd: - break; - case types::pdu_session_res_setup_request: - break; - case types::pws_cancel_request: - break; - case types::ran_cfg_upd: + case types::ran_cfg_upd_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ue_context_release_cmd: - break; - case types::ue_radio_cap_check_request: - break; - case types::write_replace_warning_request: - break; - case types::amf_status_ind: - break; - case types::cell_traffic_trace: - break; - case types::deactiv_trace: - break; - case types::dl_nas_transport: - break; - case types::dl_non_ueassociated_nrp_pa_transport: - break; - case types::dl_ran_cfg_transfer: - break; - case types::dl_ran_status_transfer: - break; - case types::dl_ueassociated_nrp_pa_transport: - break; - case types::error_ind: - break; - case types::ho_notify: - break; - case types::init_ue_msg: - break; - case types::location_report: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::paging: - break; - case types::pdu_session_res_notify: - break; - case types::private_msg: - break; - case types::pws_fail_ind: - break; - case types::pws_restart_ind: - break; - case types::reroute_nas_request: - break; - case types::rrc_inactive_transition_report: - break; - case types::secondary_rat_data_usage_report: - break; - case types::trace_fail_ind: - break; - case types::trace_start: - break; - case types::ue_context_release_request: - break; - case types::ue_radio_cap_info_ind: - break; - case types::uetnla_binding_release_request: - break; - case types::ul_nas_transport: - break; - case types::ul_non_ueassociated_nrp_pa_transport: - break; - case types::ul_ran_cfg_transfer: - break; - case types::ul_ran_status_transfer: - break; - case types::ul_ueassociated_nrp_pa_transport: - break; default: log_invalid_choice_id(type_, "ngap_elem_procs_o::unsuccessful_outcome_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -57500,60 +52466,15 @@ SRSASN_CODE ngap_elem_procs_o::unsuccessful_outcome_c::unpack(cbit_ref& bref) std::string ngap_elem_procs_o::unsuccessful_outcome_c::types_opts::to_string() const { - static constexpr const char* options[] = {"AMFConfigurationUpdateFailure", - "NULL", - "HandoverPreparationFailure", - "HandoverFailure", - "InitialContextSetupFailure", - "NULL", - "NGSetupFailure", - "PathSwitchRequestFailure", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "RANConfigurationUpdateFailure", - "UEContextModificationFailure", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL"}; - return convert_enum_idx(options, 53, value, "ngap_elem_procs_o::unsuccessful_outcome_c::types"); + static const char* options[] = {"AMFConfigurationUpdateFailure", + "HandoverPreparationFailure", + "HandoverFailure", + "InitialContextSetupFailure", + "NGSetupFailure", + "PathSwitchRequestFailure", + "RANConfigurationUpdateFailure", + "UEContextModificationFailure"}; + return convert_enum_idx(options, 8, value, "ngap_elem_procs_o::unsuccessful_outcome_c::types"); } // InitiatingMessage ::= SEQUENCE{{NGAP-ELEMENTARY-PROCEDURE}} @@ -57592,7 +52513,7 @@ bool init_msg_s::load_info_obj(const uint16_t& proc_code_) proc_code = proc_code_; crit = ngap_elem_procs_o::get_crit(proc_code); value = ngap_elem_procs_o::get_init_msg(proc_code); - return true; + return value.type().value != ngap_elem_procs_o::init_msg_c::types_opts::nulltype; } // LastVisitedNGRANCellInformation ::= SEQUENCE @@ -57849,7 +52770,7 @@ SRSASN_CODE last_visited_cell_info_c::unpack(cbit_ref& bref) std::string last_visited_cell_info_c::types_opts::to_string() const { - static constexpr const char* options[] = {"nGRANCell", "eUTRANCell", "uTRANCell", "gERANCell", "choice-Extensions"}; + static const char* options[] = {"nGRANCell", "eUTRANCell", "uTRANCell", "gERANCell", "choice-Extensions"}; return convert_enum_idx(options, 5, value, "last_visited_cell_info_c::types"); } @@ -57926,7 +52847,7 @@ bool successful_outcome_s::load_info_obj(const uint16_t& proc_code_) proc_code = proc_code_; crit = ngap_elem_procs_o::get_crit(proc_code); value = ngap_elem_procs_o::get_successful_outcome(proc_code); - return true; + return value.type().value != ngap_elem_procs_o::successful_outcome_c::types_opts::nulltype; } // UnsuccessfulOutcome ::= SEQUENCE{{NGAP-ELEMENTARY-PROCEDURE}} @@ -57965,7 +52886,7 @@ bool unsuccessful_outcome_s::load_info_obj(const uint16_t& proc_code_) proc_code = proc_code_; crit = ngap_elem_procs_o::get_crit(proc_code); value = ngap_elem_procs_o::get_unsuccessful_outcome(proc_code); - return true; + return value.type().value != ngap_elem_procs_o::unsuccessful_outcome_c::types_opts::nulltype; } // NGAP-PDU ::= CHOICE @@ -58112,7 +53033,7 @@ SRSASN_CODE ngap_pdu_c::unpack(cbit_ref& bref) std::string ngap_pdu_c::types_opts::to_string() const { - static constexpr const char* options[] = {"initiatingMessage", "successfulOutcome", "unsuccessfulOutcome"}; + static const char* options[] = {"initiatingMessage", "successfulOutcome", "unsuccessfulOutcome"}; return convert_enum_idx(options, 3, value, "ngap_pdu_c::types"); } @@ -58203,14 +53124,14 @@ void pdu_session_res_info_item_s::to_json(json_writer& j) const j.start_obj(); j.write_int("pDUSessionID", pdu_session_id); j.start_array("qosFlowInformationList"); - for (uint32_t i1 = 0; i1 < qos_flow_info_list.size(); ++i1) { - qos_flow_info_list[i1].to_json(j); + for (const auto& e1 : qos_flow_info_list) { + e1.to_json(j); } j.end_array(); if (drbs_to_qos_flows_map_list_present) { j.start_array("dRBsToQosFlowsMappingList"); - for (uint32_t i1 = 0; i1 < drbs_to_qos_flows_map_list.size(); ++i1) { - drbs_to_qos_flows_map_list[i1].to_json(j); + for (const auto& e1 : drbs_to_qos_flows_map_list) { + e1.to_json(j); } j.end_array(); } @@ -58268,7 +53189,8 @@ bool protocol_ie_field_pair_s::load_info_obj(const uint32_t& id first_value = ies_set_paramT_::get_first_value(id); second_crit = ies_set_paramT_::get_second_crit(id); second_value = ies_set_paramT_::get_second_value(id); - return true; + return first_value.type().value != ies_set_paramT_::first_value_c::types_opts::nulltype and + second_value.type().value != ies_set_paramT_::second_value_c::types_opts::nulltype; } // QosFlowSetupResponseItemSURes ::= SEQUENCE @@ -58366,15 +53288,15 @@ void source_ngran_node_to_target_ngran_node_transparent_container_s::to_json(jso j.write_str("rRCContainer", rrc_container.to_string()); if (pdu_session_res_info_list_present) { j.start_array("pDUSessionResourceInformationList"); - for (uint32_t i1 = 0; i1 < pdu_session_res_info_list.size(); ++i1) { - pdu_session_res_info_list[i1].to_json(j); + for (const auto& e1 : pdu_session_res_info_list) { + e1.to_json(j); } j.end_array(); } if (erab_info_list_present) { j.start_array("e-RABInformationList"); - for (uint32_t i1 = 0; i1 < erab_info_list.size(); ++i1) { - erab_info_list[i1].to_json(j); + for (const auto& e1 : erab_info_list) { + e1.to_json(j); } j.end_array(); } @@ -58384,8 +53306,8 @@ void source_ngran_node_to_target_ngran_node_transparent_container_s::to_json(jso j.write_int("indexToRFSP", idx_to_rfsp); } j.start_array("uEHistoryInformation"); - for (uint32_t i1 = 0; i1 < uehistory_info.size(); ++i1) { - uehistory_info[i1].to_json(j); + for (const auto& e1 : uehistory_info) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { diff --git a/lib/src/asn1/rrc_asn1.cc b/lib/src/asn1/rrc_asn1.cc index ab292a761..b77312003 100644 --- a/lib/src/asn1/rrc_asn1.cc +++ b/lib/src/asn1/rrc_asn1.cc @@ -24,29 +24,15 @@ using namespace asn1; using namespace asn1::rrc; +using srslte::logmap; /******************************************************************************* * Logging Utilities ******************************************************************************/ -srslte::log* asn1::rrc::rrc_log_ptr = nullptr; - -void asn1::rrc::rrc_log_register_handler(srslte::log* ctx) -{ - rrc_log_ptr = ctx; -} - -void asn1::rrc::rrc_log_print(srslte::LOG_LEVEL_ENUM log_level, const char* format, ...) -{ - va_list args; - va_start(args, format); - vlog_print(rrc_log_ptr, log_level, format, args); - va_end(args); -} - void asn1::rrc::log_invalid_access_choice_id(uint32_t val, uint32_t choice_id) { - rrc_log_print(LOG_LEVEL_ERROR, "The access choice id is invalid (%d!=%d)\n", val, choice_id); + logmap::get("ASN1::RRC")->error("The access choice id is invalid (%d!=%d)\n", val, choice_id); } void asn1::rrc::assert_choice_type(uint32_t val, uint32_t choice_id) @@ -61,11 +47,11 @@ void asn1::rrc::assert_choice_type(const std::string& access_type, const std::string& choice_type) { if (access_type != current_type) { - rrc_log_print(LOG_LEVEL_ERROR, - "Invalid field access for choice type \"%s\" (\"%s\"!=\"%s\")\n", - choice_type.c_str(), - access_type.c_str(), - current_type.c_str()); + logmap::get("ASN1::RRC") + ->error("Invalid field access for choice type \"%s\" (\"%s\"!=\"%s\")\n", + choice_type.c_str(), + access_type.c_str(), + current_type.c_str()); } } @@ -74,23 +60,75 @@ asn1::rrc::convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t en { if (enum_val >= nof_types) { if (enum_val == nof_types) { - rrc_log_print(LOG_LEVEL_ERROR, "The enum of type %s was not initialized.\n", enum_type); + logmap::get("ASN1::RRC")->error("The enum of type %s was not initialized.\n", enum_type); } else { - rrc_log_print(LOG_LEVEL_ERROR, "The enum value=%d of type %s is not valid.\n", enum_val, enum_type); + logmap::get("ASN1::RRC")->error("The enum value=%d of type %s is not valid.\n", enum_val, enum_type); } return ""; } return array[enum_val]; } -#define rrc_asn1_warn_assert(cond, file, line) \ - if ((cond)) { \ - rrc_log_print(LOG_LEVEL_WARNING, "Assertion in [%s][%d] failed.\n", (file), (line)); \ +template +ItemType asn1::rrc::map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type) +{ + if (enum_val >= nof_types) { + if (enum_val == nof_types) { + logmap::get("ASN1::RRC")->error("The enum of type %s is not initialized.\n", enum_type); + } else { + logmap::get("ASN1::RRC") + ->error("The enum value=%d of type %s cannot be converted to a number.\n", enum_val, enum_type); + } + return 0; } - + return array[enum_val]; +} +template const uint8_t asn1::rrc::map_enum_number(const uint8_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint16_t asn1::rrc::map_enum_number(const uint16_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint32_t asn1::rrc::map_enum_number(const uint32_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint64_t asn1::rrc::map_enum_number(const uint64_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int8_t asn1::rrc::map_enum_number(const int8_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int16_t asn1::rrc::map_enum_number(const int16_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int32_t asn1::rrc::map_enum_number(const int32_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int64_t asn1::rrc::map_enum_number(const int64_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const float asn1::rrc::map_enum_number(const float* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); + +void rrc_asn1_warn_assert(bool cond, const char* filename, int lineno) +{ + if (cond) { + logmap::get("ASN1::RRC")->warning("Assertion in [%s][%d] failed.\n", filename, lineno); + } +} static void log_invalid_choice_id(uint32_t val, const char* choice_type) { - rrc_log_print(LOG_LEVEL_ERROR, "Invalid choice id=%d for choice type %s\n", val, choice_type); + logmap::get("ASN1::RRC")->error("Invalid choice id=%d for choice type %s\n", val, choice_type); } /******************************************************************************* @@ -315,14 +353,14 @@ void plmn_id_s::to_json(json_writer& j) const j.start_obj(); if (mcc_present) { j.start_array("mcc"); - for (uint32_t i1 = 0; i1 < mcc.size(); ++i1) { - j.write_int(mcc[i1]); + for (const auto& e1 : mcc) { + j.write_int(e1); } j.end_array(); } j.start_array("mnc"); - for (uint32_t i1 = 0; i1 < mnc.size(); ++i1) { - j.write_int(mnc[i1]); + for (const auto& e1 : mnc) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -678,8 +716,8 @@ void pos_sched_info_r15_s::to_json(json_writer& j) const j.start_obj(); j.write_str("posSI-Periodicity-r15", pos_si_periodicity_r15.to_string()); j.start_array("posSIB-MappingInfo-r15"); - for (uint32_t i1 = 0; i1 < pos_sib_map_info_r15.size(); ++i1) { - pos_sib_map_info_r15[i1].to_json(j); + for (const auto& e1 : pos_sib_map_info_r15) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -716,8 +754,8 @@ void cell_access_related_info_minus5_gc_r15_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("plmn-IdentityList-r15"); - for (uint32_t i1 = 0; i1 < plmn_id_list_r15.size(); ++i1) { - plmn_id_list_r15[i1].to_json(j); + for (const auto& e1 : plmn_id_list_r15) { + e1.to_json(j); } j.end_array(); if (ran_area_code_r15_present) { @@ -867,8 +905,8 @@ void sl_min_t2_value_r15_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("priorityList-r15"); - for (uint32_t i1 = 0; i1 < prio_list_r15.size(); ++i1) { - j.write_int(prio_list_r15[i1]); + for (const auto& e1 : prio_list_r15) { + j.write_int(e1); } j.end_array(); j.write_int("minT2Value-r15", min_t2_value_r15); @@ -901,8 +939,8 @@ void sl_pppp_tx_cfg_idx_r14_s::to_json(json_writer& j) const j.write_int("defaultTxConfigIndex-r14", default_tx_cfg_idx_r14); j.write_int("cbr-ConfigIndex-r14", cbr_cfg_idx_r14); j.start_array("tx-ConfigIndexList-r14"); - for (uint32_t i1 = 0; i1 < tx_cfg_idx_list_r14.size(); ++i1) { - j.write_int(tx_cfg_idx_list_r14[i1]); + for (const auto& e1 : tx_cfg_idx_list_r14) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -934,8 +972,8 @@ void sl_pppp_tx_cfg_idx_v1530_s::to_json(json_writer& j) const j.start_obj(); if (mcs_pssch_range_list_r15_present) { j.start_array("mcs-PSSCH-RangeList-r15"); - for (uint32_t i1 = 0; i1 < mcs_pssch_range_list_r15.size(); ++i1) { - mcs_pssch_range_list_r15[i1].to_json(j); + for (const auto& e1 : mcs_pssch_range_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -1097,15 +1135,15 @@ void sib_type1_v1530_ies_s::to_json(json_writer& j) const j.write_str("cellBarred-CRS-r15", cell_barred_crs_r15.to_string()); if (plmn_id_list_v1530_present) { j.start_array("plmn-IdentityList-v1530"); - for (uint32_t i1 = 0; i1 < plmn_id_list_v1530.size(); ++i1) { - plmn_id_list_v1530[i1].to_json(j); + for (const auto& e1 : plmn_id_list_v1530) { + e1.to_json(j); } j.end_array(); } if (pos_sched_info_list_r15_present) { j.start_array("posSchedulingInfoList-r15"); - for (uint32_t i1 = 0; i1 < pos_sched_info_list_r15.size(); ++i1) { - pos_sched_info_list_r15[i1].to_json(j); + for (const auto& e1 : pos_sched_info_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -1116,10 +1154,8 @@ void sib_type1_v1530_ies_s::to_json(json_writer& j) const j.write_str("cellBarred-5GC-CRS-r15", cell_access_related_info_minus5_gc_r15.cell_barred_minus5_gc_crs_r15.to_string()); j.start_array("cellAccessRelatedInfoList-5GC-r15"); - for (uint32_t i1 = 0; - i1 < cell_access_related_info_minus5_gc_r15.cell_access_related_info_list_minus5_gc_r15.size(); - ++i1) { - cell_access_related_info_minus5_gc_r15.cell_access_related_info_list_minus5_gc_r15[i1].to_json(j); + for (const auto& e1 : cell_access_related_info_minus5_gc_r15.cell_access_related_info_list_minus5_gc_r15) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -1226,8 +1262,8 @@ void cell_access_related_info_r14_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("plmn-IdentityList-r14"); - for (uint32_t i1 = 0; i1 < plmn_id_list_r14.size(); ++i1) { - plmn_id_list_r14[i1].to_json(j); + for (const auto& e1 : plmn_id_list_r14) { + e1.to_json(j); } j.end_array(); j.write_str("trackingAreaCode-r14", tac_r14.to_string()); @@ -2369,8 +2405,8 @@ void sl_comm_res_pool_v2x_r14_s::to_json(json_writer& j) const } if (cbr_pssch_tx_cfg_list_r14_present) { j.start_array("cbr-pssch-TxConfigList-r14"); - for (uint32_t i1 = 0; i1 < cbr_pssch_tx_cfg_list_r14.size(); ++i1) { - cbr_pssch_tx_cfg_list_r14[i1].to_json(j); + for (const auto& e1 : cbr_pssch_tx_cfg_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -2384,23 +2420,23 @@ void sl_comm_res_pool_v2x_r14_s::to_json(json_writer& j) const } if (restrict_res_reserv_period_r14_present) { j.start_array("restrictResourceReservationPeriod-r14"); - for (uint32_t i1 = 0; i1 < restrict_res_reserv_period_r14.size(); ++i1) { - j.write_str(restrict_res_reserv_period_r14[i1].to_string()); + for (const auto& e1 : restrict_res_reserv_period_r14) { + j.write_str(e1.to_string()); } j.end_array(); } if (ext) { if (sl_min_t2_value_list_r15.is_present()) { j.start_array("sl-MinT2ValueList-r15"); - for (uint32_t i1 = 0; i1 < sl_min_t2_value_list_r15->size(); ++i1) { - ((*sl_min_t2_value_list_r15)[i1]).to_json(j); + for (const auto& e1 : *sl_min_t2_value_list_r15) { + e1.to_json(j); } j.end_array(); } if (cbr_pssch_tx_cfg_list_v1530.is_present()) { j.start_array("cbr-pssch-TxConfigList-v1530"); - for (uint32_t i1 = 0; i1 < cbr_pssch_tx_cfg_list_v1530->size(); ++i1) { - ((*cbr_pssch_tx_cfg_list_v1530)[i1]).to_json(j); + for (const auto& e1 : *cbr_pssch_tx_cfg_list_v1530) { + e1.to_json(j); } j.end_array(); } @@ -2689,8 +2725,8 @@ void sib_type1_v1430_ies_s::to_json(json_writer& j) const } if (cell_access_related_info_list_r14_present) { j.start_array("cellAccessRelatedInfoList-r14"); - for (uint32_t i1 = 0; i1 < cell_access_related_info_list_r14.size(); ++i1) { - cell_access_related_info_list_r14[i1].to_json(j); + for (const auto& e1 : cell_access_related_info_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -2815,8 +2851,8 @@ void neigh_cells_per_bandclass_cdma2000_r11_s::to_json(json_writer& j) const j.start_obj(); j.write_int("arfcn", arfcn); j.start_array("physCellIdList-r11"); - for (uint32_t i1 = 0; i1 < pci_list_r11.size(); ++i1) { - j.write_int(pci_list_r11[i1]); + for (const auto& e1 : pci_list_r11) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -2873,19 +2909,19 @@ void sl_comm_tx_pool_sensing_cfg_r14_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("pssch-TxConfigList-r14"); - for (uint32_t i1 = 0; i1 < pssch_tx_cfg_list_r14.size(); ++i1) { - pssch_tx_cfg_list_r14[i1].to_json(j); + for (const auto& e1 : pssch_tx_cfg_list_r14) { + e1.to_json(j); } j.end_array(); j.start_array("thresPSSCH-RSRP-List-r14"); - for (uint32_t i1 = 0; i1 < thres_pssch_rsrp_list_r14.size(); ++i1) { - j.write_int(thres_pssch_rsrp_list_r14[i1]); + for (const auto& e1 : thres_pssch_rsrp_list_r14) { + j.write_int(e1); } j.end_array(); if (restrict_res_reserv_period_r14_present) { j.start_array("restrictResourceReservationPeriod-r14"); - for (uint32_t i1 = 0; i1 < restrict_res_reserv_period_r14.size(); ++i1) { - j.write_str(restrict_res_reserv_period_r14[i1].to_string()); + for (const auto& e1 : restrict_res_reserv_period_r14) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -3204,8 +3240,8 @@ void sl_disc_res_pool_r12_s::rx_params_add_neigh_freq_r13_c_::to_json(json_write j.write_fieldname("setup"); j.start_obj(); j.start_array("physCellId-r13"); - for (uint32_t i1 = 0; i1 < c.pci_r13.size(); ++i1) { - j.write_int(c.pci_r13[i1]); + for (const auto& e1 : c.pci_r13) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -3262,8 +3298,8 @@ void sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::to_json(json_write j.write_fieldname("setup"); j.start_obj(); j.start_array("physCellId-r13"); - for (uint32_t i1 = 0; i1 < c.pci_r13.size(); ++i1) { - j.write_int(c.pci_r13[i1]); + for (const auto& e1 : c.pci_r13) { + j.write_int(e1); } j.end_array(); if (c.p_max_present) { @@ -3546,17 +3582,17 @@ void inter_freq_carrier_freq_info_v10l0_s::to_json(json_writer& j) const j.start_obj(); if (freq_band_info_v10l0_present) { j.start_array("freqBandInfo-v10l0"); - for (uint32_t i1 = 0; i1 < freq_band_info_v10l0.size(); ++i1) { - freq_band_info_v10l0[i1].to_json(j); + for (const auto& e1 : freq_band_info_v10l0) { + e1.to_json(j); } j.end_array(); } if (multi_band_info_list_v10l0_present) { j.start_array("multiBandInfoList-v10l0"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_v10l0.size(); ++i1) { + for (const auto& e1 : multi_band_info_list_v10l0) { j.start_array(); - for (uint32_t i2 = 0; i2 < multi_band_info_list_v10l0[i1].size(); ++i2) { - multi_band_info_list_v10l0[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -3615,8 +3651,8 @@ void neigh_cell_cdma2000_r11_s::to_json(json_writer& j) const j.start_obj(); j.write_str("bandClass", band_class.to_string()); j.start_array("neighFreqInfoList-r11"); - for (uint32_t i1 = 0; i1 < neigh_freq_info_list_r11.size(); ++i1) { - neigh_freq_info_list_r11[i1].to_json(j); + for (const auto& e1 : neigh_freq_info_list_r11) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -3642,8 +3678,8 @@ void neigh_cells_per_bandclass_cdma2000_s::to_json(json_writer& j) const j.start_obj(); j.write_int("arfcn", arfcn); j.start_array("physCellIdList"); - for (uint32_t i1 = 0; i1 < pci_list.size(); ++i1) { - j.write_int(pci_list[i1]); + for (const auto& e1 : pci_list) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -3666,8 +3702,8 @@ void neigh_cells_per_bandclass_cdma2000_v920_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("physCellIdList-v920"); - for (uint32_t i1 = 0; i1 < pci_list_v920.size(); ++i1) { - j.write_int(pci_list_v920[i1]); + for (const auto& e1 : pci_list_v920) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -3786,8 +3822,8 @@ void sl_v2x_freq_sel_cfg_r15_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("priorityList-r15"); - for (uint32_t i1 = 0; i1 < prio_list_r15.size(); ++i1) { - j.write_int(prio_list_r15[i1]); + for (const auto& e1 : prio_list_r15) { + j.write_int(e1); } j.end_array(); if (thresh_cbr_freq_resel_r15_present) { @@ -3899,8 +3935,8 @@ void sl_v2x_inter_freq_ue_cfg_r14_s::to_json(json_writer& j) const j.start_obj(); if (pci_list_r14_present) { j.start_array("physCellIdList-r14"); - for (uint32_t i1 = 0; i1 < pci_list_r14.size(); ++i1) { - j.write_int(pci_list_r14[i1]); + for (const auto& e1 : pci_list_r14) { + j.write_int(e1); } j.end_array(); } @@ -3909,29 +3945,29 @@ void sl_v2x_inter_freq_ue_cfg_r14_s::to_json(json_writer& j) const } if (v2x_sync_cfg_r14_present) { j.start_array("v2x-SyncConfig-r14"); - for (uint32_t i1 = 0; i1 < v2x_sync_cfg_r14.size(); ++i1) { - v2x_sync_cfg_r14[i1].to_json(j); + for (const auto& e1 : v2x_sync_cfg_r14) { + e1.to_json(j); } j.end_array(); } if (v2x_comm_rx_pool_r14_present) { j.start_array("v2x-CommRxPool-r14"); - for (uint32_t i1 = 0; i1 < v2x_comm_rx_pool_r14.size(); ++i1) { - v2x_comm_rx_pool_r14[i1].to_json(j); + for (const auto& e1 : v2x_comm_rx_pool_r14) { + e1.to_json(j); } j.end_array(); } if (v2x_comm_tx_pool_normal_r14_present) { j.start_array("v2x-CommTxPoolNormal-r14"); - for (uint32_t i1 = 0; i1 < v2x_comm_tx_pool_normal_r14.size(); ++i1) { - v2x_comm_tx_pool_normal_r14[i1].to_json(j); + for (const auto& e1 : v2x_comm_tx_pool_normal_r14) { + e1.to_json(j); } j.end_array(); } if (p2x_comm_tx_pool_normal_r14_present) { j.start_array("p2x-CommTxPoolNormal-r14"); - for (uint32_t i1 = 0; i1 < p2x_comm_tx_pool_normal_r14.size(); ++i1) { - p2x_comm_tx_pool_normal_r14[i1].to_json(j); + for (const auto& e1 : p2x_comm_tx_pool_normal_r14) { + e1.to_json(j); } j.end_array(); } @@ -4081,8 +4117,8 @@ void sib_type5_v13a0_ies_s::to_json(json_writer& j) const } if (inter_freq_carrier_freq_list_v13a0_present) { j.start_array("interFreqCarrierFreqList-v13a0"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v13a0.size(); ++i1) { - inter_freq_carrier_freq_list_v13a0[i1].to_json(j); + for (const auto& e1 : inter_freq_carrier_freq_list_v13a0) { + e1.to_json(j); } j.end_array(); } @@ -4283,13 +4319,13 @@ void cell_resel_params_cdma2000_r11_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("bandClassList"); - for (uint32_t i1 = 0; i1 < band_class_list.size(); ++i1) { - band_class_list[i1].to_json(j); + for (const auto& e1 : band_class_list) { + e1.to_json(j); } j.end_array(); j.start_array("neighCellList-r11"); - for (uint32_t i1 = 0; i1 < neigh_cell_list_r11.size(); ++i1) { - neigh_cell_list_r11[i1].to_json(j); + for (const auto& e1 : neigh_cell_list_r11) { + e1.to_json(j); } j.end_array(); j.write_int("t-ReselectionCDMA2000", t_resel_cdma2000); @@ -4409,17 +4445,17 @@ void inter_freq_carrier_freq_info_v10j0_s::to_json(json_writer& j) const j.start_obj(); if (freq_band_info_r10_present) { j.start_array("freqBandInfo-r10"); - for (uint32_t i1 = 0; i1 < freq_band_info_r10.size(); ++i1) { - freq_band_info_r10[i1].to_json(j); + for (const auto& e1 : freq_band_info_r10) { + e1.to_json(j); } j.end_array(); } if (multi_band_info_list_v10j0_present) { j.start_array("multiBandInfoList-v10j0"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_v10j0.size(); ++i1) { + for (const auto& e1 : multi_band_info_list_v10j0) { j.start_array(); - for (uint32_t i2 = 0; i2 < multi_band_info_list_v10j0[i1].size(); ++i2) { - multi_band_info_list_v10j0[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -4653,8 +4689,8 @@ void prach_params_ce_r13_s::to_json(json_writer& j) const } j.write_str("numRepetitionPerPreambleAttempt-r13", num_repeat_per_preamb_attempt_r13.to_string()); j.start_array("mpdcch-NarrowbandsToMonitor-r13"); - for (uint32_t i1 = 0; i1 < mpdcch_nbs_to_monitor_r13.size(); ++i1) { - j.write_int(mpdcch_nbs_to_monitor_r13[i1]); + for (const auto& e1 : mpdcch_nbs_to_monitor_r13) { + j.write_int(e1); } j.end_array(); j.write_str("mpdcch-NumRepetition-RA-r13", mpdcch_num_repeat_ra_r13.to_string()); @@ -4702,8 +4738,8 @@ void pre_regist_info_hrpd_s::to_json(json_writer& j) const } if (secondary_pre_regist_zone_id_list_present) { j.start_array("secondaryPreRegistrationZoneIdList"); - for (uint32_t i1 = 0; i1 < secondary_pre_regist_zone_id_list.size(); ++i1) { - j.write_int(secondary_pre_regist_zone_id_list[i1]); + for (const auto& e1 : secondary_pre_regist_zone_id_list) { + j.write_int(e1); } j.end_array(); } @@ -4821,13 +4857,13 @@ void sl_allowed_carrier_freq_list_r15_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("allowedCarrierFreqSet1"); - for (uint32_t i1 = 0; i1 < allowed_carrier_freq_set1.size(); ++i1) { - j.write_int(allowed_carrier_freq_set1[i1]); + for (const auto& e1 : allowed_carrier_freq_set1) { + j.write_int(e1); } j.end_array(); j.start_array("allowedCarrierFreqSet2"); - for (uint32_t i1 = 0; i1 < allowed_carrier_freq_set2.size(); ++i1) { - j.write_int(allowed_carrier_freq_set2[i1]); + for (const auto& e1 : allowed_carrier_freq_set2) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -4846,8 +4882,8 @@ void sl_disc_tx_res_inter_freq_r13_c::to_json(json_writer& j) const break; case types::disc_tx_pool_common_r13: j.start_array("discTxPoolCommon-r13"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); break; @@ -5241,8 +5277,8 @@ void sib_type2_v10m0_ies_s::to_json(json_writer& j) const } if (multi_band_info_list_v10l0_present) { j.start_array("multiBandInfoList-v10l0"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_v10l0.size(); ++i1) { - j.write_int(multi_band_info_list_v10l0[i1]); + for (const auto& e1 : multi_band_info_list_v10l0) { + j.write_int(e1); } j.end_array(); } @@ -5288,8 +5324,8 @@ void sib_type5_v10l0_ies_s::to_json(json_writer& j) const j.start_obj(); if (inter_freq_carrier_freq_list_v10l0_present) { j.start_array("interFreqCarrierFreqList-v10l0"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v10l0.size(); ++i1) { - inter_freq_carrier_freq_list_v10l0[i1].to_json(j); + for (const auto& e1 : inter_freq_carrier_freq_list_v10l0) { + e1.to_json(j); } j.end_array(); } @@ -5604,8 +5640,8 @@ void carrier_freqs_geran_s::following_arfcns_c_::to_json(json_writer& j) const switch (type_) { case types::explicit_list_of_arfcns: j.start_array("explicitListOfARFCNs"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; @@ -5769,8 +5805,8 @@ void edt_prach_params_ce_r15_s::to_json(json_writer& j) const j.write_str("prach-StartingSubframe-r15", edt_prach_params_ce_r15.prach_start_sf_r15.to_string()); } j.start_array("mpdcch-NarrowbandsToMonitor-r15"); - for (uint32_t i1 = 0; i1 < edt_prach_params_ce_r15.mpdcch_nbs_to_monitor_r15.size(); ++i1) { - j.write_int(edt_prach_params_ce_r15.mpdcch_nbs_to_monitor_r15[i1]); + for (const auto& e1 : edt_prach_params_ce_r15.mpdcch_nbs_to_monitor_r15) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -5815,8 +5851,8 @@ void inter_freq_carrier_freq_info_v9e0_s::to_json(json_writer& j) const } if (multi_band_info_list_v9e0_present) { j.start_array("multiBandInfoList-v9e0"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_v9e0.size(); ++i1) { - multi_band_info_list_v9e0[i1].to_json(j); + for (const auto& e1 : multi_band_info_list_v9e0) { + e1.to_json(j); } j.end_array(); } @@ -6068,15 +6104,15 @@ void meas_idle_carrier_eutra_r15_s::to_json(json_writer& j) const j.write_str("allowedMeasBandwidth-r15", allowed_meas_bw_r15.to_string()); if (validity_area_r15_present) { j.start_array("validityArea-r15"); - for (uint32_t i1 = 0; i1 < validity_area_r15.size(); ++i1) { - validity_area_r15[i1].to_json(j); + for (const auto& e1 : validity_area_r15) { + e1.to_json(j); } j.end_array(); } if (meas_cell_list_r15_present) { j.start_array("measCellList-r15"); - for (uint32_t i1 = 0; i1 < meas_cell_list_r15.size(); ++i1) { - meas_cell_list_r15[i1].to_json(j); + for (const auto& e1 : meas_cell_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -6115,8 +6151,8 @@ void neigh_cell_cdma2000_s::to_json(json_writer& j) const j.start_obj(); j.write_str("bandClass", band_class.to_string()); j.start_array("neighCellsPerFreqList"); - for (uint32_t i1 = 0; i1 < neigh_cells_per_freq_list.size(); ++i1) { - neigh_cells_per_freq_list[i1].to_json(j); + for (const auto& e1 : neigh_cells_per_freq_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -6139,8 +6175,8 @@ void neigh_cell_cdma2000_v920_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("neighCellsPerFreqList-v920"); - for (uint32_t i1 = 0; i1 < neigh_cells_per_freq_list_v920.size(); ++i1) { - neigh_cells_per_freq_list_v920[i1].to_json(j); + for (const auto& e1 : neigh_cells_per_freq_list_v920) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -6436,8 +6472,8 @@ void redist_inter_freq_info_r13_s::to_json(json_writer& j) const } if (redist_neigh_cell_list_r13_present) { j.start_array("redistributionNeighCellList-r13"); - for (uint32_t i1 = 0; i1 < redist_neigh_cell_list_r13.size(); ++i1) { - redist_neigh_cell_list_r13[i1].to_json(j); + for (const auto& e1 : redist_neigh_cell_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -6512,8 +6548,8 @@ void sl_disc_cfg_other_inter_freq_r13_s::to_json(json_writer& j) const j.start_obj(); if (tx_pwr_info_r13_present) { j.start_array("txPowerInfo-r13"); - for (uint32_t i1 = 0; i1 < tx_pwr_info_r13.size(); ++i1) { - tx_pwr_info_r13[i1].to_json(j); + for (const auto& e1 : tx_pwr_info_r13) { + e1.to_json(j); } j.end_array(); } @@ -6522,8 +6558,8 @@ void sl_disc_cfg_other_inter_freq_r13_s::to_json(json_writer& j) const } if (disc_sync_cfg_r13_present) { j.start_array("discSyncConfig-r13"); - for (uint32_t i1 = 0; i1 < disc_sync_cfg_r13.size(); ++i1) { - disc_sync_cfg_r13[i1].to_json(j); + for (const auto& e1 : disc_sync_cfg_r13) { + e1.to_json(j); } j.end_array(); } @@ -6670,8 +6706,8 @@ void sl_inter_freq_info_v2x_r14_s::to_json(json_writer& j) const j.start_obj(); if (plmn_id_list_r14_present) { j.start_array("plmn-IdentityList-r14"); - for (uint32_t i1 = 0; i1 < plmn_id_list_r14.size(); ++i1) { - plmn_id_list_r14[i1].to_json(j); + for (const auto& e1 : plmn_id_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -6688,8 +6724,8 @@ void sl_inter_freq_info_v2x_r14_s::to_json(json_writer& j) const } if (v2x_ue_cfg_list_r14_present) { j.start_array("v2x-UE-ConfigList-r14"); - for (uint32_t i1 = 0; i1 < v2x_ue_cfg_list_r14.size(); ++i1) { - v2x_ue_cfg_list_r14[i1].to_json(j); + for (const auto& e1 : v2x_ue_cfg_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -6700,8 +6736,8 @@ void sl_inter_freq_info_v2x_r14_s::to_json(json_writer& j) const } if (v2x_freq_sel_cfg_list_r15.is_present()) { j.start_array("v2x-FreqSelectionConfigList-r15"); - for (uint32_t i1 = 0; i1 < v2x_freq_sel_cfg_list_r15->size(); ++i1) { - ((*v2x_freq_sel_cfg_list_r15)[i1]).to_json(j); + for (const auto& e1 : *v2x_freq_sel_cfg_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -6838,8 +6874,8 @@ void sl_pppr_dest_carrier_freq_s::to_json(json_writer& j) const j.start_obj(); if (dest_info_list_r15_present) { j.start_array("destinationInfoList-r15"); - for (uint32_t i1 = 0; i1 < dest_info_list_r15.size(); ++i1) { - j.write_str(dest_info_list_r15[i1].to_string()); + for (const auto& e1 : dest_info_list_r15) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -6884,8 +6920,8 @@ void sl_res_inter_freq_r13_s::to_json(json_writer& j) const j.start_obj(); if (disc_rx_res_inter_freq_r13_present) { j.start_array("discRxResourcesInterFreq-r13"); - for (uint32_t i1 = 0; i1 < disc_rx_res_inter_freq_r13.size(); ++i1) { - disc_rx_res_inter_freq_r13[i1].to_json(j); + for (const auto& e1 : disc_rx_res_inter_freq_r13) { + e1.to_json(j); } j.end_array(); } @@ -7129,17 +7165,17 @@ void sib_type1_v10l0_ies_s::to_json(json_writer& j) const j.start_obj(); if (freq_band_info_v10l0_present) { j.start_array("freqBandInfo-v10l0"); - for (uint32_t i1 = 0; i1 < freq_band_info_v10l0.size(); ++i1) { - freq_band_info_v10l0[i1].to_json(j); + for (const auto& e1 : freq_band_info_v10l0) { + e1.to_json(j); } j.end_array(); } if (multi_band_info_list_v10l0_present) { j.start_array("multiBandInfoList-v10l0"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_v10l0.size(); ++i1) { + for (const auto& e1 : multi_band_info_list_v10l0) { j.start_array(); - for (uint32_t i2 = 0; i2 < multi_band_info_list_v10l0[i1].size(); ++i2) { - multi_band_info_list_v10l0[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -7262,8 +7298,8 @@ void sib_type1_v1310_ies_s::to_json(json_writer& j) const j.write_str("si-RepetitionPattern-r13", bw_reduced_access_related_info_r13.si_repeat_pattern_r13.to_string()); if (bw_reduced_access_related_info_r13.sched_info_list_br_r13_present) { j.start_array("schedulingInfoList-BR-r13"); - for (uint32_t i1 = 0; i1 < bw_reduced_access_related_info_r13.sched_info_list_br_r13.size(); ++i1) { - bw_reduced_access_related_info_r13.sched_info_list_br_r13[i1].to_json(j); + for (const auto& e1 : bw_reduced_access_related_info_r13.sched_info_list_br_r13) { + e1.to_json(j); } j.end_array(); } @@ -7282,8 +7318,8 @@ void sib_type1_v1310_ies_s::to_json(json_writer& j) const } if (bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13_present) { j.start_array("systemInfoValueTagList-r13"); - for (uint32_t i1 = 0; i1 < bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13.size(); ++i1) { - j.write_int(bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13[i1]); + for (const auto& e1 : bw_reduced_access_related_info_r13.sys_info_value_tag_list_r13) { + j.write_int(e1); } j.end_array(); } @@ -7498,8 +7534,8 @@ void sib_type5_v10j0_ies_s::to_json(json_writer& j) const j.start_obj(); if (inter_freq_carrier_freq_list_v10j0_present) { j.start_array("interFreqCarrierFreqList-v10j0"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v10j0.size(); ++i1) { - inter_freq_carrier_freq_list_v10j0[i1].to_json(j); + for (const auto& e1 : inter_freq_carrier_freq_list_v10j0) { + e1.to_json(j); } j.end_array(); } @@ -7814,8 +7850,8 @@ void acdc_barr_per_plmn_r13_s::to_json(json_writer& j) const j.write_int("plmn-IdentityIndex-r13", plmn_id_idx_r13); j.write_bool("acdc-OnlyForHPLMN-r13", acdc_only_for_hplmn_r13); j.start_array("barringPerACDC-CategoryList-r13"); - for (uint32_t i1 = 0; i1 < barr_per_acdc_category_list_r13.size(); ++i1) { - barr_per_acdc_category_list_r13[i1].to_json(j); + for (const auto& e1 : barr_per_acdc_category_list_r13) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -7915,8 +7951,8 @@ void carrier_freq_info_utra_fdd_v8h0_s::to_json(json_writer& j) const j.start_obj(); if (multi_band_info_list_present) { j.start_array("multiBandInfoList"); - for (uint32_t i1 = 0; i1 < multi_band_info_list.size(); ++i1) { - j.write_int(multi_band_info_list[i1]); + for (const auto& e1 : multi_band_info_list) { + j.write_int(e1); } j.end_array(); } @@ -8056,15 +8092,15 @@ void carrier_freq_nr_r15_s::to_json(json_writer& j) const j.write_int("carrierFreq-r15", carrier_freq_r15); if (multi_band_info_list_r15_present) { j.start_array("multiBandInfoList-r15"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_r15.size(); ++i1) { - j.write_int(multi_band_info_list_r15[i1]); + for (const auto& e1 : multi_band_info_list_r15) { + j.write_int(e1); } j.end_array(); } if (multi_band_info_list_sul_r15_present) { j.start_array("multiBandInfoListSUL-r15"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_sul_r15.size(); ++i1) { - j.write_int(multi_band_info_list_sul_r15[i1]); + for (const auto& e1 : multi_band_info_list_sul_r15) { + j.write_int(e1); } j.end_array(); } @@ -8099,8 +8135,8 @@ void carrier_freq_nr_r15_s::to_json(json_writer& j) const j.write_int("p-MaxNR-r15", p_max_nr_r15); if (ns_pmax_list_nr_r15_present) { j.start_array("ns-PmaxListNR-r15"); - for (uint32_t i1 = 0; i1 < ns_pmax_list_nr_r15.size(); ++i1) { - ns_pmax_list_nr_r15[i1].to_json(j); + for (const auto& e1 : ns_pmax_list_nr_r15) { + e1.to_json(j); } j.end_array(); } @@ -8284,8 +8320,8 @@ void carrier_freq_utra_fdd_ext_r12_s::to_json(json_writer& j) const } if (multi_band_info_list_r12_present) { j.start_array("multiBandInfoList-r12"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_r12.size(); ++i1) { - j.write_int(multi_band_info_list_r12[i1]); + for (const auto& e1 : multi_band_info_list_r12) { + j.write_int(e1); } j.end_array(); } @@ -9171,15 +9207,15 @@ void inter_freq_carrier_freq_info_s::to_json(json_writer& j) const } if (inter_freq_neigh_cell_list_present) { j.start_array("interFreqNeighCellList"); - for (uint32_t i1 = 0; i1 < inter_freq_neigh_cell_list.size(); ++i1) { - inter_freq_neigh_cell_list[i1].to_json(j); + for (const auto& e1 : inter_freq_neigh_cell_list) { + e1.to_json(j); } j.end_array(); } if (inter_freq_black_cell_list_present) { j.start_array("interFreqBlackCellList"); - for (uint32_t i1 = 0; i1 < inter_freq_black_cell_list.size(); ++i1) { - inter_freq_black_cell_list[i1].to_json(j); + for (const auto& e1 : inter_freq_black_cell_list) { + e1.to_json(j); } j.end_array(); } @@ -9350,15 +9386,15 @@ void inter_freq_carrier_freq_info_r12_s::to_json(json_writer& j) const } if (inter_freq_neigh_cell_list_r12_present) { j.start_array("interFreqNeighCellList-r12"); - for (uint32_t i1 = 0; i1 < inter_freq_neigh_cell_list_r12.size(); ++i1) { - inter_freq_neigh_cell_list_r12[i1].to_json(j); + for (const auto& e1 : inter_freq_neigh_cell_list_r12) { + e1.to_json(j); } j.end_array(); } if (inter_freq_black_cell_list_r12_present) { j.start_array("interFreqBlackCellList-r12"); - for (uint32_t i1 = 0; i1 < inter_freq_black_cell_list_r12.size(); ++i1) { - inter_freq_black_cell_list_r12[i1].to_json(j); + for (const auto& e1 : inter_freq_black_cell_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -9377,8 +9413,8 @@ void inter_freq_carrier_freq_info_r12_s::to_json(json_writer& j) const } if (multi_band_info_list_r12_present) { j.start_array("multiBandInfoList-r12"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_r12.size(); ++i1) { - j.write_int(multi_band_info_list_r12[i1]); + for (const auto& e1 : multi_band_info_list_r12) { + j.write_int(e1); } j.end_array(); } @@ -9559,8 +9595,8 @@ void inter_freq_carrier_freq_info_v1530_s::to_json(json_writer& j) const j.write_bool("hsdn-Indication-r15", hsdn_ind_r15); if (inter_freq_neigh_hsdn_cell_list_r15_present) { j.start_array("interFreqNeighHSDN-CellList-r15"); - for (uint32_t i1 = 0; i1 < inter_freq_neigh_hsdn_cell_list_r15.size(); ++i1) { - inter_freq_neigh_hsdn_cell_list_r15[i1].to_json(j); + for (const auto& e1 : inter_freq_neigh_hsdn_cell_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -9597,8 +9633,8 @@ void inter_freq_carrier_freq_info_v8h0_s::to_json(json_writer& j) const j.start_obj(); if (multi_band_info_list_present) { j.start_array("multiBandInfoList"); - for (uint32_t i1 = 0; i1 < multi_band_info_list.size(); ++i1) { - j.write_int(multi_band_info_list[i1]); + for (const auto& e1 : multi_band_info_list) { + j.write_int(e1); } j.end_array(); } @@ -9683,8 +9719,8 @@ void mbms_sai_inter_freq_r11_s::to_json(json_writer& j) const j.start_obj(); j.write_int("dl-CarrierFreq-r11", dl_carrier_freq_r11); j.start_array("mbms-SAI-List-r11"); - for (uint32_t i1 = 0; i1 < mbms_sai_list_r11.size(); ++i1) { - j.write_int(mbms_sai_list_r11[i1]); + for (const auto& e1 : mbms_sai_list_r11) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -9716,8 +9752,8 @@ void mbms_sai_inter_freq_v1140_s::to_json(json_writer& j) const j.start_obj(); if (multi_band_info_list_r11_present) { j.start_array("multiBandInfoList-r11"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_r11.size(); ++i1) { - j.write_int(multi_band_info_list_r11[i1]); + for (const auto& e1 : multi_band_info_list_r11) { + j.write_int(e1); } j.end_array(); } @@ -10356,8 +10392,8 @@ void prach_cfg_sib_v1310_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("rsrp-ThresholdsPrachInfoList-r13"); - for (uint32_t i1 = 0; i1 < rsrp_thress_prach_info_list_r13.size(); ++i1) { - j.write_int(rsrp_thress_prach_info_list_r13[i1]); + for (const auto& e1 : rsrp_thress_prach_info_list_r13) { + j.write_int(e1); } j.end_array(); if (mpdcch_start_sf_css_ra_r13_present) { @@ -10368,8 +10404,8 @@ void prach_cfg_sib_v1310_s::to_json(json_writer& j) const j.write_int("prach-HoppingOffset-r13", prach_hop_offset_r13); } j.start_array("prach-ParametersListCE-r13"); - for (uint32_t i1 = 0; i1 < prach_params_list_ce_r13.size(); ++i1) { - prach_params_list_ce_r13[i1].to_json(j); + for (const auto& e1 : prach_params_list_ce_r13) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -10487,8 +10523,8 @@ void prach_cfg_sib_v1530_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("edt-PRACH-ParametersListCE-r15"); - for (uint32_t i1 = 0; i1 < edt_prach_params_list_ce_r15.size(); ++i1) { - edt_prach_params_list_ce_r15[i1].to_json(j); + for (const auto& e1 : edt_prach_params_list_ce_r15) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -10581,8 +10617,8 @@ void pucch_cfg_common_v1310_s::to_json(json_writer& j) const j.start_obj(); if (n1_pucch_an_info_list_r13_present) { j.start_array("n1PUCCH-AN-InfoList-r13"); - for (uint32_t i1 = 0; i1 < n1_pucch_an_info_list_r13.size(); ++i1) { - j.write_int(n1_pucch_an_info_list_r13[i1]); + for (const auto& e1 : n1_pucch_an_info_list_r13) { + j.write_int(e1); } j.end_array(); } @@ -10853,8 +10889,8 @@ void rach_cfg_common_s::to_json(json_writer& j) const } if (rach_ce_level_info_list_r13.is_present()) { j.start_array("rach-CE-LevelInfoList-r13"); - for (uint32_t i1 = 0; i1 < rach_ce_level_info_list_r13->size(); ++i1) { - ((*rach_ce_level_info_list_r13)[i1]).to_json(j); + for (const auto& e1 : *rach_ce_level_info_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -11102,17 +11138,17 @@ void sl_cbr_common_tx_cfg_list_r14_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("cbr-RangeCommonConfigList-r14"); - for (uint32_t i1 = 0; i1 < cbr_range_common_cfg_list_r14.size(); ++i1) { + for (const auto& e1 : cbr_range_common_cfg_list_r14) { j.start_array(); - for (uint32_t i2 = 0; i2 < cbr_range_common_cfg_list_r14[i1].size(); ++i2) { - j.write_int(cbr_range_common_cfg_list_r14[i1][i2]); + for (const auto& e2 : e1) { + j.write_int(e2); } j.end_array(); } j.end_array(); j.start_array("sl-CBR-PSSCH-TxConfigList-r14"); - for (uint32_t i1 = 0; i1 < sl_cbr_pssch_tx_cfg_list_r14.size(); ++i1) { - sl_cbr_pssch_tx_cfg_list_r14[i1].to_json(j); + for (const auto& e1 : sl_cbr_pssch_tx_cfg_list_r14) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -11147,8 +11183,8 @@ void sl_carrier_freq_info_r12_s::to_json(json_writer& j) const j.write_int("carrierFreq-r12", carrier_freq_r12); if (plmn_id_list_r12_present) { j.start_array("plmn-IdentityList-r12"); - for (uint32_t i1 = 0; i1 < plmn_id_list_r12.size(); ++i1) { - plmn_id_list_r12[i1].to_json(j); + for (const auto& e1 : plmn_id_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -11350,8 +11386,8 @@ void sl_comm_res_pool_r12_s::to_json(json_writer& j) const if (ext) { if (prio_list_r13.is_present()) { j.start_array("priorityList-r13"); - for (uint32_t i1 = 0; i1 < prio_list_r13->size(); ++i1) { - j.write_int(((*prio_list_r13)[i1])); + for (const auto& e1 : *prio_list_r13) { + j.write_int(e1); } j.end_array(); } @@ -11387,13 +11423,13 @@ void sl_pppp_tx_cfg_idx_r15_s::to_json(json_writer& j) const j.write_int("defaultTxConfigIndex-r15", default_tx_cfg_idx_r15); j.write_int("cbr-ConfigIndex-r15", cbr_cfg_idx_r15); j.start_array("tx-ConfigIndexList-r15"); - for (uint32_t i1 = 0; i1 < tx_cfg_idx_list_r15.size(); ++i1) { - j.write_int(tx_cfg_idx_list_r15[i1]); + for (const auto& e1 : tx_cfg_idx_list_r15) { + j.write_int(e1); } j.end_array(); j.start_array("mcs-PSSCH-RangeList-r15"); - for (uint32_t i1 = 0; i1 < mcs_pssch_range_list_r15.size(); ++i1) { - mcs_pssch_range_list_r15[i1].to_json(j); + for (const auto& e1 : mcs_pssch_range_list_r15) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -11507,17 +11543,17 @@ void sib_type1_v10j0_ies_s::to_json(json_writer& j) const j.start_obj(); if (freq_band_info_r10_present) { j.start_array("freqBandInfo-r10"); - for (uint32_t i1 = 0; i1 < freq_band_info_r10.size(); ++i1) { - freq_band_info_r10[i1].to_json(j); + for (const auto& e1 : freq_band_info_r10) { + e1.to_json(j); } j.end_array(); } if (multi_band_info_list_v10j0_present) { j.start_array("multiBandInfoList-v10j0"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_v10j0.size(); ++i1) { + for (const auto& e1 : multi_band_info_list_v10j0) { j.start_array(); - for (uint32_t i2 = 0; i2 < multi_band_info_list_v10j0[i1].size(); ++i2) { - multi_band_info_list_v10j0[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -11664,17 +11700,17 @@ void sib_type3_v10l0_ies_s::to_json(json_writer& j) const j.start_obj(); if (freq_band_info_v10l0_present) { j.start_array("freqBandInfo-v10l0"); - for (uint32_t i1 = 0; i1 < freq_band_info_v10l0.size(); ++i1) { - freq_band_info_v10l0[i1].to_json(j); + for (const auto& e1 : freq_band_info_v10l0) { + e1.to_json(j); } j.end_array(); } if (multi_band_info_list_v10l0_present) { j.start_array("multiBandInfoList-v10l0"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_v10l0.size(); ++i1) { + for (const auto& e1 : multi_band_info_list_v10l0) { j.start_array(); - for (uint32_t i2 = 0; i2 < multi_band_info_list_v10l0[i1].size(); ++i2) { - multi_band_info_list_v10l0[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -11722,8 +11758,8 @@ void sib_type5_v9e0_ies_s::to_json(json_writer& j) const j.start_obj(); if (inter_freq_carrier_freq_list_v9e0_present) { j.start_array("interFreqCarrierFreqList-v9e0"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v9e0.size(); ++i1) { - inter_freq_carrier_freq_list_v9e0[i1].to_json(j); + for (const auto& e1 : inter_freq_carrier_freq_list_v9e0) { + e1.to_json(j); } j.end_array(); } @@ -11869,15 +11905,15 @@ void uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_::to_json(json_writer& switch (type_) { case types::uac_implicit_ac_barr_list_r15: j.start_array("uac-ImplicitAC-BarringList-r15"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::uac_explicit_ac_barr_list_r15: j.start_array("uac-ExplicitAC-BarringList-r15"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -12299,8 +12335,8 @@ void acdc_barr_for_common_r13_s::to_json(json_writer& j) const j.start_obj(); j.write_bool("acdc-HPLMNonly-r13", acdc_hplm_nonly_r13); j.start_array("barringPerACDC-CategoryList-r13"); - for (uint32_t i1 = 0; i1 < barr_per_acdc_category_list_r13.size(); ++i1) { - barr_per_acdc_category_list_r13[i1].to_json(j); + for (const auto& e1 : barr_per_acdc_category_list_r13) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -12399,13 +12435,13 @@ void cell_resel_params_cdma2000_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("bandClassList"); - for (uint32_t i1 = 0; i1 < band_class_list.size(); ++i1) { - band_class_list[i1].to_json(j); + for (const auto& e1 : band_class_list) { + e1.to_json(j); } j.end_array(); j.start_array("neighCellList"); - for (uint32_t i1 = 0; i1 < neigh_cell_list.size(); ++i1) { - neigh_cell_list[i1].to_json(j); + for (const auto& e1 : neigh_cell_list) { + e1.to_json(j); } j.end_array(); j.write_int("t-ReselectionCDMA2000", t_resel_cdma2000); @@ -12433,8 +12469,8 @@ void cell_resel_params_cdma2000_v920_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("neighCellList-v920"); - for (uint32_t i1 = 0; i1 < neigh_cell_list_v920.size(); ++i1) { - neigh_cell_list_v920[i1].to_json(j); + for (const auto& e1 : neigh_cell_list_v920) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -12589,8 +12625,8 @@ void meas_idle_cfg_sib_r15_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("measIdleCarrierListEUTRA-r15"); - for (uint32_t i1 = 0; i1 < meas_idle_carrier_list_eutra_r15.size(); ++i1) { - meas_idle_carrier_list_eutra_r15[i1].to_json(j); + for (const auto& e1 : meas_idle_carrier_list_eutra_r15) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -13598,22 +13634,22 @@ void sl_v2x_cfg_common_r14_s::to_json(json_writer& j) const j.start_obj(); if (v2x_comm_rx_pool_r14_present) { j.start_array("v2x-CommRxPool-r14"); - for (uint32_t i1 = 0; i1 < v2x_comm_rx_pool_r14.size(); ++i1) { - v2x_comm_rx_pool_r14[i1].to_json(j); + for (const auto& e1 : v2x_comm_rx_pool_r14) { + e1.to_json(j); } j.end_array(); } if (v2x_comm_tx_pool_normal_common_r14_present) { j.start_array("v2x-CommTxPoolNormalCommon-r14"); - for (uint32_t i1 = 0; i1 < v2x_comm_tx_pool_normal_common_r14.size(); ++i1) { - v2x_comm_tx_pool_normal_common_r14[i1].to_json(j); + for (const auto& e1 : v2x_comm_tx_pool_normal_common_r14) { + e1.to_json(j); } j.end_array(); } if (p2x_comm_tx_pool_normal_common_r14_present) { j.start_array("p2x-CommTxPoolNormalCommon-r14"); - for (uint32_t i1 = 0; i1 < p2x_comm_tx_pool_normal_common_r14.size(); ++i1) { - p2x_comm_tx_pool_normal_common_r14[i1].to_json(j); + for (const auto& e1 : p2x_comm_tx_pool_normal_common_r14) { + e1.to_json(j); } j.end_array(); } @@ -13623,15 +13659,15 @@ void sl_v2x_cfg_common_r14_s::to_json(json_writer& j) const } if (v2x_sync_cfg_r14_present) { j.start_array("v2x-SyncConfig-r14"); - for (uint32_t i1 = 0; i1 < v2x_sync_cfg_r14.size(); ++i1) { - v2x_sync_cfg_r14[i1].to_json(j); + for (const auto& e1 : v2x_sync_cfg_r14) { + e1.to_json(j); } j.end_array(); } if (v2x_inter_freq_info_list_r14_present) { j.start_array("v2x-InterFreqInfoList-r14"); - for (uint32_t i1 = 0; i1 < v2x_inter_freq_info_list_r14.size(); ++i1) { - v2x_inter_freq_info_list_r14[i1].to_json(j); + for (const auto& e1 : v2x_inter_freq_info_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -13651,8 +13687,8 @@ void sl_v2x_cfg_common_r14_s::to_json(json_writer& j) const } if (anchor_carrier_freq_list_r14_present) { j.start_array("anchorCarrierFreqList-r14"); - for (uint32_t i1 = 0; i1 < anchor_carrier_freq_list_r14.size(); ++i1) { - j.write_int(anchor_carrier_freq_list_r14[i1]); + for (const auto& e1 : anchor_carrier_freq_list_r14) { + j.write_int(e1); } j.end_array(); } @@ -13697,8 +13733,8 @@ void sl_v2x_packet_dupl_cfg_r15_s::to_json(json_writer& j) const j.write_int("threshSL-Reliability-r15", thresh_sl_reliability_r15); if (allowed_carrier_freq_cfg_r15_present) { j.start_array("allowedCarrierFreqConfig-r15"); - for (uint32_t i1 = 0; i1 < allowed_carrier_freq_cfg_r15.size(); ++i1) { - allowed_carrier_freq_cfg_r15[i1].to_json(j); + for (const auto& e1 : allowed_carrier_freq_cfg_r15) { + e1.to_json(j); } j.end_array(); } @@ -13805,8 +13841,8 @@ void sib_type1_v9e0_ies_s::to_json(json_writer& j) const } if (multi_band_info_list_v9e0_present) { j.start_array("multiBandInfoList-v9e0"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_v9e0.size(); ++i1) { - multi_band_info_list_v9e0[i1].to_json(j); + for (const auto& e1 : multi_band_info_list_v9e0) { + e1.to_json(j); } j.end_array(); } @@ -13851,8 +13887,8 @@ void sib_type2_v8h0_ies_s::to_json(json_writer& j) const j.start_obj(); if (multi_band_info_list_present) { j.start_array("multiBandInfoList"); - for (uint32_t i1 = 0; i1 < multi_band_info_list.size(); ++i1) { - j.write_int(multi_band_info_list[i1]); + for (const auto& e1 : multi_band_info_list) { + j.write_int(e1); } j.end_array(); } @@ -13905,17 +13941,17 @@ void sib_type3_v10j0_ies_s::to_json(json_writer& j) const j.start_obj(); if (freq_band_info_r10_present) { j.start_array("freqBandInfo-r10"); - for (uint32_t i1 = 0; i1 < freq_band_info_r10.size(); ++i1) { - freq_band_info_r10[i1].to_json(j); + for (const auto& e1 : freq_band_info_r10) { + e1.to_json(j); } j.end_array(); } if (multi_band_info_list_v10j0_present) { j.start_array("multiBandInfoList-v10j0"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_v10j0.size(); ++i1) { + for (const auto& e1 : multi_band_info_list_v10j0) { j.start_array(); - for (uint32_t i2 = 0; i2 < multi_band_info_list_v10j0[i1].size(); ++i2) { - multi_band_info_list_v10j0[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -13962,8 +13998,8 @@ void sib_type5_v8h0_ies_s::to_json(json_writer& j) const j.start_obj(); if (inter_freq_carrier_freq_list_v8h0_present) { j.start_array("interFreqCarrierFreqList-v8h0"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v8h0.size(); ++i1) { - inter_freq_carrier_freq_list_v8h0[i1].to_json(j); + for (const auto& e1 : inter_freq_carrier_freq_list_v8h0) { + e1.to_json(j); } j.end_array(); } @@ -14002,8 +14038,8 @@ void sib_type6_v8h0_ies_s::to_json(json_writer& j) const j.start_obj(); if (carrier_freq_list_utra_fdd_v8h0_present) { j.start_array("carrierFreqListUTRA-FDD-v8h0"); - for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_fdd_v8h0.size(); ++i1) { - carrier_freq_list_utra_fdd_v8h0[i1].to_json(j); + for (const auto& e1 : carrier_freq_list_utra_fdd_v8h0) { + e1.to_json(j); } j.end_array(); } @@ -14226,8 +14262,8 @@ void wlan_offload_info_per_plmn_r12_s::to_json(json_writer& j) const } if (wlan_id_list_r12_present) { j.start_array("wlan-Id-List-r12"); - for (uint32_t i1 = 0; i1 < wlan_id_list_r12.size(); ++i1) { - wlan_id_list_r12[i1].to_json(j); + for (const auto& e1 : wlan_id_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -14254,8 +14290,8 @@ void sched_info_s::to_json(json_writer& j) const j.start_obj(); j.write_str("si-Periodicity", si_periodicity.to_string()); j.start_array("sib-MappingInfo"); - for (uint32_t i1 = 0; i1 < sib_map_info.size(); ++i1) { - j.write_str(sib_map_info[i1].to_string()); + for (const auto& e1 : sib_map_info) { + j.write_str(e1.to_string()); } j.end_array(); j.end_obj(); @@ -14367,8 +14403,8 @@ void sib_type1_v8h0_ies_s::to_json(json_writer& j) const j.start_obj(); if (multi_band_info_list_present) { j.start_array("multiBandInfoList"); - for (uint32_t i1 = 0; i1 < multi_band_info_list.size(); ++i1) { - j.write_int(multi_band_info_list[i1]); + for (const auto& e1 : multi_band_info_list) { + j.write_int(e1); } j.end_array(); } @@ -14703,8 +14739,8 @@ void sib_type13_r9_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("mbsfn-AreaInfoList-r9"); - for (uint32_t i1 = 0; i1 < mbsfn_area_info_list_r9.size(); ++i1) { - mbsfn_area_info_list_r9[i1].to_json(j); + for (const auto& e1 : mbsfn_area_info_list_r9) { + e1.to_json(j); } j.end_array(); j.write_fieldname("notificationConfig-r9"); @@ -14875,8 +14911,8 @@ void sib_type14_r11_s::eab_param_r11_c_::to_json(json_writer& j) const break; case types::eab_per_plmn_list_r11: j.start_array("eab-PerPLMN-List-r11"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -15023,15 +15059,15 @@ void sib_type15_r11_s::to_json(json_writer& j) const j.start_obj(); if (mbms_sai_intra_freq_r11_present) { j.start_array("mbms-SAI-IntraFreq-r11"); - for (uint32_t i1 = 0; i1 < mbms_sai_intra_freq_r11.size(); ++i1) { - j.write_int(mbms_sai_intra_freq_r11[i1]); + for (const auto& e1 : mbms_sai_intra_freq_r11) { + j.write_int(e1); } j.end_array(); } if (mbms_sai_inter_freq_list_r11_present) { j.start_array("mbms-SAI-InterFreqList-r11"); - for (uint32_t i1 = 0; i1 < mbms_sai_inter_freq_list_r11.size(); ++i1) { - mbms_sai_inter_freq_list_r11[i1].to_json(j); + for (const auto& e1 : mbms_sai_inter_freq_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -15041,8 +15077,8 @@ void sib_type15_r11_s::to_json(json_writer& j) const if (ext) { if (mbms_sai_inter_freq_list_v1140.is_present()) { j.start_array("mbms-SAI-InterFreqList-v1140"); - for (uint32_t i1 = 0; i1 < mbms_sai_inter_freq_list_v1140->size(); ++i1) { - ((*mbms_sai_inter_freq_list_v1140)[i1]).to_json(j); + for (const auto& e1 : *mbms_sai_inter_freq_list_v1140) { + e1.to_json(j); } j.end_array(); } @@ -15052,8 +15088,8 @@ void sib_type15_r11_s::to_json(json_writer& j) const } if (mbms_inter_freq_carrier_type_list_r14.is_present()) { j.start_array("mbms-InterFreqCarrierTypeList-r14"); - for (uint32_t i1 = 0; i1 < mbms_inter_freq_carrier_type_list_r14->size(); ++i1) { - ((*mbms_inter_freq_carrier_type_list_r14)[i1]).to_json(j); + for (const auto& e1 : *mbms_inter_freq_carrier_type_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -15211,8 +15247,8 @@ void sib_type17_r12_s::to_json(json_writer& j) const j.start_obj(); if (wlan_offload_info_per_plmn_list_r12_present) { j.start_array("wlan-OffloadInfoPerPLMN-List-r12"); - for (uint32_t i1 = 0; i1 < wlan_offload_info_per_plmn_list_r12.size(); ++i1) { - wlan_offload_info_per_plmn_list_r12[i1].to_json(j); + for (const auto& e1 : wlan_offload_info_per_plmn_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -15319,28 +15355,28 @@ void sib_type18_r12_s::to_json(json_writer& j) const j.write_fieldname("commConfig-r12"); j.start_obj(); j.start_array("commRxPool-r12"); - for (uint32_t i1 = 0; i1 < comm_cfg_r12.comm_rx_pool_r12.size(); ++i1) { - comm_cfg_r12.comm_rx_pool_r12[i1].to_json(j); + for (const auto& e1 : comm_cfg_r12.comm_rx_pool_r12) { + e1.to_json(j); } j.end_array(); if (comm_cfg_r12.comm_tx_pool_normal_common_r12_present) { j.start_array("commTxPoolNormalCommon-r12"); - for (uint32_t i1 = 0; i1 < comm_cfg_r12.comm_tx_pool_normal_common_r12.size(); ++i1) { - comm_cfg_r12.comm_tx_pool_normal_common_r12[i1].to_json(j); + for (const auto& e1 : comm_cfg_r12.comm_tx_pool_normal_common_r12) { + e1.to_json(j); } j.end_array(); } if (comm_cfg_r12.comm_tx_pool_exceptional_r12_present) { j.start_array("commTxPoolExceptional-r12"); - for (uint32_t i1 = 0; i1 < comm_cfg_r12.comm_tx_pool_exceptional_r12.size(); ++i1) { - comm_cfg_r12.comm_tx_pool_exceptional_r12[i1].to_json(j); + for (const auto& e1 : comm_cfg_r12.comm_tx_pool_exceptional_r12) { + e1.to_json(j); } j.end_array(); } if (comm_cfg_r12.comm_sync_cfg_r12_present) { j.start_array("commSyncConfig-r12"); - for (uint32_t i1 = 0; i1 < comm_cfg_r12.comm_sync_cfg_r12.size(); ++i1) { - comm_cfg_r12.comm_sync_cfg_r12[i1].to_json(j); + for (const auto& e1 : comm_cfg_r12.comm_sync_cfg_r12) { + e1.to_json(j); } j.end_array(); } @@ -15352,8 +15388,8 @@ void sib_type18_r12_s::to_json(json_writer& j) const if (ext) { if (comm_tx_pool_normal_common_ext_r13.is_present()) { j.start_array("commTxPoolNormalCommonExt-r13"); - for (uint32_t i1 = 0; i1 < comm_tx_pool_normal_common_ext_r13->size(); ++i1) { - ((*comm_tx_pool_normal_common_ext_r13)[i1]).to_json(j); + for (const auto& e1 : *comm_tx_pool_normal_common_ext_r13) { + e1.to_json(j); } j.end_array(); } @@ -15508,28 +15544,28 @@ void sib_type19_r12_s::to_json(json_writer& j) const j.write_fieldname("discConfig-r12"); j.start_obj(); j.start_array("discRxPool-r12"); - for (uint32_t i1 = 0; i1 < disc_cfg_r12.disc_rx_pool_r12.size(); ++i1) { - disc_cfg_r12.disc_rx_pool_r12[i1].to_json(j); + for (const auto& e1 : disc_cfg_r12.disc_rx_pool_r12) { + e1.to_json(j); } j.end_array(); if (disc_cfg_r12.disc_tx_pool_common_r12_present) { j.start_array("discTxPoolCommon-r12"); - for (uint32_t i1 = 0; i1 < disc_cfg_r12.disc_tx_pool_common_r12.size(); ++i1) { - disc_cfg_r12.disc_tx_pool_common_r12[i1].to_json(j); + for (const auto& e1 : disc_cfg_r12.disc_tx_pool_common_r12) { + e1.to_json(j); } j.end_array(); } if (disc_cfg_r12.disc_tx_pwr_info_r12_present) { j.start_array("discTxPowerInfo-r12"); - for (uint32_t i1 = 0; i1 < disc_cfg_r12.disc_tx_pwr_info_r12.size(); ++i1) { - disc_cfg_r12.disc_tx_pwr_info_r12[i1].to_json(j); + for (const auto& e1 : disc_cfg_r12.disc_tx_pwr_info_r12) { + e1.to_json(j); } j.end_array(); } if (disc_cfg_r12.disc_sync_cfg_r12_present) { j.start_array("discSyncConfig-r12"); - for (uint32_t i1 = 0; i1 < disc_cfg_r12.disc_sync_cfg_r12.size(); ++i1) { - disc_cfg_r12.disc_sync_cfg_r12[i1].to_json(j); + for (const auto& e1 : disc_cfg_r12.disc_sync_cfg_r12) { + e1.to_json(j); } j.end_array(); } @@ -15537,8 +15573,8 @@ void sib_type19_r12_s::to_json(json_writer& j) const } if (disc_inter_freq_list_r12_present) { j.start_array("discInterFreqList-r12"); - for (uint32_t i1 = 0; i1 < disc_inter_freq_list_r12.size(); ++i1) { - disc_inter_freq_list_r12[i1].to_json(j); + for (const auto& e1 : disc_inter_freq_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -15551,8 +15587,8 @@ void sib_type19_r12_s::to_json(json_writer& j) const j.start_obj(); if (disc_cfg_v1310->disc_inter_freq_list_v1310_present) { j.start_array("discInterFreqList-v1310"); - for (uint32_t i1 = 0; i1 < disc_cfg_v1310->disc_inter_freq_list_v1310.size(); ++i1) { - disc_cfg_v1310->disc_inter_freq_list_v1310[i1].to_json(j); + for (const auto& e1 : disc_cfg_v1310->disc_inter_freq_list_v1310) { + e1.to_json(j); } j.end_array(); } @@ -15574,14 +15610,14 @@ void sib_type19_r12_s::to_json(json_writer& j) const j.write_fieldname("discConfigPS-13"); j.start_obj(); j.start_array("discRxPoolPS-r13"); - for (uint32_t i1 = 0; i1 < disc_cfg_ps_minus13->disc_rx_pool_ps_r13.size(); ++i1) { - disc_cfg_ps_minus13->disc_rx_pool_ps_r13[i1].to_json(j); + for (const auto& e1 : disc_cfg_ps_minus13->disc_rx_pool_ps_r13) { + e1.to_json(j); } j.end_array(); if (disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13_present) { j.start_array("discTxPoolPS-Common-r13"); - for (uint32_t i1 = 0; i1 < disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13.size(); ++i1) { - disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13[i1].to_json(j); + for (const auto& e1 : disc_cfg_ps_minus13->disc_tx_pool_ps_common_r13) { + e1.to_json(j); } j.end_array(); } @@ -15950,8 +15986,8 @@ void sib_type2_s::to_json(json_writer& j) const j.end_obj(); if (mbsfn_sf_cfg_list_present) { j.start_array("mbsfn-SubframeConfigList"); - for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list.size(); ++i1) { - mbsfn_sf_cfg_list[i1].to_json(j); + for (const auto& e1 : mbsfn_sf_cfg_list) { + e1.to_json(j); } j.end_array(); } @@ -15983,8 +16019,8 @@ void sib_type2_s::to_json(json_writer& j) const } if (ac_barr_per_plmn_list_r12.is_present()) { j.start_array("ac-BarringPerPLMN-List-r12"); - for (uint32_t i1 = 0; i1 < ac_barr_per_plmn_list_r12->size(); ++i1) { - ((*ac_barr_per_plmn_list_r12)[i1]).to_json(j); + for (const auto& e1 : *ac_barr_per_plmn_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -15997,8 +16033,8 @@ void sib_type2_s::to_json(json_writer& j) const } if (acdc_barr_per_plmn_list_r13.is_present()) { j.start_array("acdc-BarringPerPLMN-List-r13"); - for (uint32_t i1 = 0; i1 < acdc_barr_per_plmn_list_r13->size(); ++i1) { - ((*acdc_barr_per_plmn_list_r13)[i1]).to_json(j); + for (const auto& e1 : *acdc_barr_per_plmn_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -16008,15 +16044,15 @@ void sib_type2_s::to_json(json_writer& j) const } if (udt_restricting_per_plmn_list_r13.is_present()) { j.start_array("udt-RestrictingPerPLMN-List-r13"); - for (uint32_t i1 = 0; i1 < udt_restricting_per_plmn_list_r13->size(); ++i1) { - ((*udt_restricting_per_plmn_list_r13)[i1]).to_json(j); + for (const auto& e1 : *udt_restricting_per_plmn_list_r13) { + e1.to_json(j); } j.end_array(); } if (cio_t_eps_optim_info_r13.is_present()) { j.start_array("cIoT-EPS-OptimisationInfo-r13"); - for (uint32_t i1 = 0; i1 < cio_t_eps_optim_info_r13->size(); ++i1) { - ((*cio_t_eps_optim_info_r13)[i1]).to_json(j); + for (const auto& e1 : *cio_t_eps_optim_info_r13) { + e1.to_json(j); } j.end_array(); } @@ -16028,8 +16064,8 @@ void sib_type2_s::to_json(json_writer& j) const } if (mbsfn_sf_cfg_list_v1430.is_present()) { j.start_array("mbsfn-SubframeConfigList-v1430"); - for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_v1430->size(); ++i1) { - ((*mbsfn_sf_cfg_list_v1430)[i1]).to_json(j); + for (const auto& e1 : *mbsfn_sf_cfg_list_v1430) { + e1.to_json(j); } j.end_array(); } @@ -16038,8 +16074,8 @@ void sib_type2_s::to_json(json_writer& j) const } if (plmn_info_list_r15.is_present()) { j.start_array("plmn-InfoList-r15"); - for (uint32_t i1 = 0; i1 < plmn_info_list_r15->size(); ++i1) { - ((*plmn_info_list_r15)[i1]).to_json(j); + for (const auto& e1 : *plmn_info_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -16421,8 +16457,8 @@ void sib_type24_r15_s::to_json(json_writer& j) const j.start_obj(); if (carrier_freq_list_nr_r15_present) { j.start_array("carrierFreqListNR-r15"); - for (uint32_t i1 = 0; i1 < carrier_freq_list_nr_r15.size(); ++i1) { - carrier_freq_list_nr_r15[i1].to_json(j); + for (const auto& e1 : carrier_freq_list_nr_r15) { + e1.to_json(j); } j.end_array(); } @@ -16491,21 +16527,21 @@ void sib_type25_r15_s::to_json(json_writer& j) const j.start_obj(); if (uac_barr_for_common_r15_present) { j.start_array("uac-BarringForCommon-r15"); - for (uint32_t i1 = 0; i1 < uac_barr_for_common_r15.size(); ++i1) { - uac_barr_for_common_r15[i1].to_json(j); + for (const auto& e1 : uac_barr_for_common_r15) { + e1.to_json(j); } j.end_array(); } if (uac_barr_per_plmn_list_r15_present) { j.start_array("uac-BarringPerPLMN-List-r15"); - for (uint32_t i1 = 0; i1 < uac_barr_per_plmn_list_r15.size(); ++i1) { - uac_barr_per_plmn_list_r15[i1].to_json(j); + for (const auto& e1 : uac_barr_per_plmn_list_r15) { + e1.to_json(j); } j.end_array(); } j.start_array("uac-BarringInfoSetList-r15"); - for (uint32_t i1 = 0; i1 < uac_barr_info_set_list_r15.size(); ++i1) { - uac_barr_info_set_list_r15[i1].to_json(j); + for (const auto& e1 : uac_barr_info_set_list_r15) { + e1.to_json(j); } j.end_array(); if (uac_ac1_select_assist_info_r15_present) { @@ -16592,8 +16628,8 @@ void sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_::to_json(json_writer& j break; case types::individual_plmn_list_r15: j.start_array("individualPLMNList-r15"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -16707,15 +16743,15 @@ void sib_type26_r15_s::to_json(json_writer& j) const j.start_obj(); if (v2x_inter_freq_info_list_r15_present) { j.start_array("v2x-InterFreqInfoList-r15"); - for (uint32_t i1 = 0; i1 < v2x_inter_freq_info_list_r15.size(); ++i1) { - v2x_inter_freq_info_list_r15[i1].to_json(j); + for (const auto& e1 : v2x_inter_freq_info_list_r15) { + e1.to_json(j); } j.end_array(); } if (cbr_pssch_tx_cfg_list_r15_present) { j.start_array("cbr-pssch-TxConfigList-r15"); - for (uint32_t i1 = 0; i1 < cbr_pssch_tx_cfg_list_r15.size(); ++i1) { - cbr_pssch_tx_cfg_list_r15[i1].to_json(j); + for (const auto& e1 : cbr_pssch_tx_cfg_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -16725,8 +16761,8 @@ void sib_type26_r15_s::to_json(json_writer& j) const } if (sync_freq_list_r15_present) { j.start_array("syncFreqList-r15"); - for (uint32_t i1 = 0; i1 < sync_freq_list_r15.size(); ++i1) { - j.write_int(sync_freq_list_r15[i1]); + for (const auto& e1 : sync_freq_list_r15) { + j.write_int(e1); } j.end_array(); } @@ -16735,8 +16771,8 @@ void sib_type26_r15_s::to_json(json_writer& j) const } if (v2x_freq_sel_cfg_list_r15_present) { j.start_array("v2x-FreqSelectionConfigList-r15"); - for (uint32_t i1 = 0; i1 < v2x_freq_sel_cfg_list_r15.size(); ++i1) { - v2x_freq_sel_cfg_list_r15[i1].to_json(j); + for (const auto& e1 : v2x_freq_sel_cfg_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -17275,15 +17311,15 @@ void sib_type4_s::to_json(json_writer& j) const j.start_obj(); if (intra_freq_neigh_cell_list_present) { j.start_array("intraFreqNeighCellList"); - for (uint32_t i1 = 0; i1 < intra_freq_neigh_cell_list.size(); ++i1) { - intra_freq_neigh_cell_list[i1].to_json(j); + for (const auto& e1 : intra_freq_neigh_cell_list) { + e1.to_json(j); } j.end_array(); } if (intra_freq_black_cell_list_present) { j.start_array("intraFreqBlackCellList"); - for (uint32_t i1 = 0; i1 < intra_freq_black_cell_list.size(); ++i1) { - intra_freq_black_cell_list[i1].to_json(j); + for (const auto& e1 : intra_freq_black_cell_list) { + e1.to_json(j); } j.end_array(); } @@ -17297,8 +17333,8 @@ void sib_type4_s::to_json(json_writer& j) const } if (intra_freq_neigh_hsdn_cell_list_r15.is_present()) { j.start_array("intraFreqNeighHSDN-CellList-r15"); - for (uint32_t i1 = 0; i1 < intra_freq_neigh_hsdn_cell_list_r15->size(); ++i1) { - ((*intra_freq_neigh_hsdn_cell_list_r15)[i1]).to_json(j); + for (const auto& e1 : *intra_freq_neigh_hsdn_cell_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -17532,8 +17568,8 @@ void sib_type5_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("interFreqCarrierFreqList"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list.size(); ++i1) { - inter_freq_carrier_freq_list[i1].to_json(j); + for (const auto& e1 : inter_freq_carrier_freq_list) { + e1.to_json(j); } j.end_array(); if (ext) { @@ -17542,57 +17578,57 @@ void sib_type5_s::to_json(json_writer& j) const } if (inter_freq_carrier_freq_list_v1250.is_present()) { j.start_array("interFreqCarrierFreqList-v1250"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v1250->size(); ++i1) { - ((*inter_freq_carrier_freq_list_v1250)[i1]).to_json(j); + for (const auto& e1 : *inter_freq_carrier_freq_list_v1250) { + e1.to_json(j); } j.end_array(); } if (inter_freq_carrier_freq_list_ext_r12.is_present()) { j.start_array("interFreqCarrierFreqListExt-r12"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_r12->size(); ++i1) { - ((*inter_freq_carrier_freq_list_ext_r12)[i1]).to_json(j); + for (const auto& e1 : *inter_freq_carrier_freq_list_ext_r12) { + e1.to_json(j); } j.end_array(); } if (inter_freq_carrier_freq_list_ext_v1280.is_present()) { j.start_array("interFreqCarrierFreqListExt-v1280"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_v1280->size(); ++i1) { - ((*inter_freq_carrier_freq_list_ext_v1280)[i1]).to_json(j); + for (const auto& e1 : *inter_freq_carrier_freq_list_ext_v1280) { + e1.to_json(j); } j.end_array(); } if (inter_freq_carrier_freq_list_v1310.is_present()) { j.start_array("interFreqCarrierFreqList-v1310"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v1310->size(); ++i1) { - ((*inter_freq_carrier_freq_list_v1310)[i1]).to_json(j); + for (const auto& e1 : *inter_freq_carrier_freq_list_v1310) { + e1.to_json(j); } j.end_array(); } if (inter_freq_carrier_freq_list_ext_v1310.is_present()) { j.start_array("interFreqCarrierFreqListExt-v1310"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_v1310->size(); ++i1) { - ((*inter_freq_carrier_freq_list_ext_v1310)[i1]).to_json(j); + for (const auto& e1 : *inter_freq_carrier_freq_list_ext_v1310) { + e1.to_json(j); } j.end_array(); } if (inter_freq_carrier_freq_list_v1350.is_present()) { j.start_array("interFreqCarrierFreqList-v1350"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v1350->size(); ++i1) { - ((*inter_freq_carrier_freq_list_v1350)[i1]).to_json(j); + for (const auto& e1 : *inter_freq_carrier_freq_list_v1350) { + e1.to_json(j); } j.end_array(); } if (inter_freq_carrier_freq_list_ext_v1350.is_present()) { j.start_array("interFreqCarrierFreqListExt-v1350"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_v1350->size(); ++i1) { - ((*inter_freq_carrier_freq_list_ext_v1350)[i1]).to_json(j); + for (const auto& e1 : *inter_freq_carrier_freq_list_ext_v1350) { + e1.to_json(j); } j.end_array(); } if (inter_freq_carrier_freq_list_ext_v1360.is_present()) { j.start_array("interFreqCarrierFreqListExt-v1360"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_v1360->size(); ++i1) { - ((*inter_freq_carrier_freq_list_ext_v1360)[i1]).to_json(j); + for (const auto& e1 : *inter_freq_carrier_freq_list_ext_v1360) { + e1.to_json(j); } j.end_array(); } @@ -17601,15 +17637,15 @@ void sib_type5_s::to_json(json_writer& j) const } if (inter_freq_carrier_freq_list_v1530.is_present()) { j.start_array("interFreqCarrierFreqList-v1530"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_v1530->size(); ++i1) { - ((*inter_freq_carrier_freq_list_v1530)[i1]).to_json(j); + for (const auto& e1 : *inter_freq_carrier_freq_list_v1530) { + e1.to_json(j); } j.end_array(); } if (inter_freq_carrier_freq_list_ext_v1530.is_present()) { j.start_array("interFreqCarrierFreqListExt-v1530"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list_ext_v1530->size(); ++i1) { - ((*inter_freq_carrier_freq_list_ext_v1530)[i1]).to_json(j); + for (const auto& e1 : *inter_freq_carrier_freq_list_ext_v1530) { + e1.to_json(j); } j.end_array(); } @@ -17740,15 +17776,15 @@ void sib_type6_s::to_json(json_writer& j) const j.start_obj(); if (carrier_freq_list_utra_fdd_present) { j.start_array("carrierFreqListUTRA-FDD"); - for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_fdd.size(); ++i1) { - carrier_freq_list_utra_fdd[i1].to_json(j); + for (const auto& e1 : carrier_freq_list_utra_fdd) { + e1.to_json(j); } j.end_array(); } if (carrier_freq_list_utra_tdd_present) { j.start_array("carrierFreqListUTRA-TDD"); - for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_tdd.size(); ++i1) { - carrier_freq_list_utra_tdd[i1].to_json(j); + for (const auto& e1 : carrier_freq_list_utra_tdd) { + e1.to_json(j); } j.end_array(); } @@ -17763,29 +17799,29 @@ void sib_type6_s::to_json(json_writer& j) const } if (carrier_freq_list_utra_fdd_v1250.is_present()) { j.start_array("carrierFreqListUTRA-FDD-v1250"); - for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_fdd_v1250->size(); ++i1) { - ((*carrier_freq_list_utra_fdd_v1250)[i1]).to_json(j); + for (const auto& e1 : *carrier_freq_list_utra_fdd_v1250) { + e1.to_json(j); } j.end_array(); } if (carrier_freq_list_utra_tdd_v1250.is_present()) { j.start_array("carrierFreqListUTRA-TDD-v1250"); - for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_tdd_v1250->size(); ++i1) { - ((*carrier_freq_list_utra_tdd_v1250)[i1]).to_json(j); + for (const auto& e1 : *carrier_freq_list_utra_tdd_v1250) { + e1.to_json(j); } j.end_array(); } if (carrier_freq_list_utra_fdd_ext_r12.is_present()) { j.start_array("carrierFreqListUTRA-FDD-Ext-r12"); - for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_fdd_ext_r12->size(); ++i1) { - ((*carrier_freq_list_utra_fdd_ext_r12)[i1]).to_json(j); + for (const auto& e1 : *carrier_freq_list_utra_fdd_ext_r12) { + e1.to_json(j); } j.end_array(); } if (carrier_freq_list_utra_tdd_ext_r12.is_present()) { j.start_array("carrierFreqListUTRA-TDD-Ext-r12"); - for (uint32_t i1 = 0; i1 < carrier_freq_list_utra_tdd_ext_r12->size(); ++i1) { - ((*carrier_freq_list_utra_tdd_ext_r12)[i1]).to_json(j); + for (const auto& e1 : *carrier_freq_list_utra_tdd_ext_r12) { + e1.to_json(j); } j.end_array(); } @@ -17850,8 +17886,8 @@ void sib_type7_s::to_json(json_writer& j) const } if (carrier_freqs_info_list_present) { j.start_array("carrierFreqsInfoList"); - for (uint32_t i1 = 0; i1 < carrier_freqs_info_list.size(); ++i1) { - carrier_freqs_info_list[i1].to_json(j); + for (const auto& e1 : carrier_freqs_info_list) { + e1.to_json(j); } j.end_array(); } @@ -18117,8 +18153,8 @@ void sib_type8_s::to_json(json_writer& j) const } if (sib8_per_plmn_list_r11.is_present()) { j.start_array("sib8-PerPLMN-List-r11"); - for (uint32_t i1 = 0; i1 < sib8_per_plmn_list_r11->size(); ++i1) { - ((*sib8_per_plmn_list_r11)[i1]).to_json(j); + for (const auto& e1 : *sib8_per_plmn_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -18206,8 +18242,8 @@ void pos_sys_info_r15_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("posSIB-TypeAndInfo-r15"); - for (uint32_t i1 = 0; i1 < pos_sib_type_and_info_r15.size(); ++i1) { - pos_sib_type_and_info_r15[i1].to_json(j); + for (const auto& e1 : pos_sib_type_and_info_r15) { + e1.to_json(j); } j.end_array(); if (late_non_crit_ext_present) { @@ -19526,8 +19562,8 @@ void sys_info_r8_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("sib-TypeAndInfo"); - for (uint32_t i1 = 0; i1 < sib_type_and_info.size(); ++i1) { - sib_type_and_info[i1].to_json(j); + for (const auto& e1 : sib_type_and_info) { + e1.to_json(j); } j.end_array(); if (non_crit_ext_present) { @@ -19911,8 +19947,8 @@ void sib_type1_s::to_json(json_writer& j) const j.write_fieldname("cellAccessRelatedInfo"); j.start_obj(); j.start_array("plmn-IdentityList"); - for (uint32_t i1 = 0; i1 < cell_access_related_info.plmn_id_list.size(); ++i1) { - cell_access_related_info.plmn_id_list[i1].to_json(j); + for (const auto& e1 : cell_access_related_info.plmn_id_list) { + e1.to_json(j); } j.end_array(); j.write_str("trackingAreaCode", cell_access_related_info.tac.to_string()); @@ -19936,8 +19972,8 @@ void sib_type1_s::to_json(json_writer& j) const } j.write_int("freqBandIndicator", freq_band_ind); j.start_array("schedulingInfoList"); - for (uint32_t i1 = 0; i1 < sched_info_list.size(); ++i1) { - sched_info_list[i1].to_json(j); + for (const auto& e1 : sched_info_list) { + e1.to_json(j); } j.end_array(); if (tdd_cfg_present) { @@ -20490,8 +20526,8 @@ void sched_info_mbms_r14_s::to_json(json_writer& j) const j.start_obj(); j.write_str("si-Periodicity-r14", si_periodicity_r14.to_string()); j.start_array("sib-MappingInfo-r14"); - for (uint32_t i1 = 0; i1 < sib_map_info_r14.size(); ++i1) { - j.write_str(sib_map_info_r14[i1].to_string()); + for (const auto& e1 : sib_map_info_r14) { + j.write_str(e1.to_string()); } j.end_array(); j.end_obj(); @@ -20592,8 +20628,8 @@ void sib_type1_mbms_r14_s::to_json(json_writer& j) const j.write_fieldname("cellAccessRelatedInfo-r14"); j.start_obj(); j.start_array("plmn-IdentityList-r14"); - for (uint32_t i1 = 0; i1 < cell_access_related_info_r14.plmn_id_list_r14.size(); ++i1) { - cell_access_related_info_r14.plmn_id_list_r14[i1].to_json(j); + for (const auto& e1 : cell_access_related_info_r14.plmn_id_list_r14) { + e1.to_json(j); } j.end_array(); j.write_str("trackingAreaCode-r14", cell_access_related_info_r14.tac_r14.to_string()); @@ -20602,14 +20638,14 @@ void sib_type1_mbms_r14_s::to_json(json_writer& j) const j.write_int("freqBandIndicator-r14", freq_band_ind_r14); if (multi_band_info_list_r14_present) { j.start_array("multiBandInfoList-r14"); - for (uint32_t i1 = 0; i1 < multi_band_info_list_r14.size(); ++i1) { - j.write_int(multi_band_info_list_r14[i1]); + for (const auto& e1 : multi_band_info_list_r14) { + j.write_int(e1); } j.end_array(); } j.start_array("schedulingInfoList-MBMS-r14"); - for (uint32_t i1 = 0; i1 < sched_info_list_mbms_r14.size(); ++i1) { - sched_info_list_mbms_r14[i1].to_json(j); + for (const auto& e1 : sched_info_list_mbms_r14) { + e1.to_json(j); } j.end_array(); j.write_str("si-WindowLength-r14", si_win_len_r14.to_string()); @@ -20626,8 +20662,8 @@ void sib_type1_mbms_r14_s::to_json(json_writer& j) const } if (cell_access_related_info_list_r14_present) { j.start_array("cellAccessRelatedInfoList-r14"); - for (uint32_t i1 = 0; i1 < cell_access_related_info_list_r14.size(); ++i1) { - cell_access_related_info_list_r14[i1].to_json(j); + for (const auto& e1 : cell_access_related_info_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -21308,8 +21344,8 @@ void csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::mbsfn_sf_cfg_list_r11_c_::to_jso j.write_fieldname("setup"); j.start_obj(); j.start_array("subframeConfigList"); - for (uint32_t i1 = 0; i1 < c.sf_cfg_list.size(); ++i1) { - c.sf_cfg_list[i1].to_json(j); + for (const auto& e1 : c.sf_cfg_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -21366,8 +21402,8 @@ void csi_rs_cfg_nzp_r11_s::mbsfn_sf_cfg_list_v1430_c_::to_json(json_writer& j) c j.write_fieldname("setup"); j.start_obj(); j.start_array("subframeConfigList-v1430"); - for (uint32_t i1 = 0; i1 < c.sf_cfg_list_v1430.size(); ++i1) { - c.sf_cfg_list_v1430[i1].to_json(j); + for (const auto& e1 : c.sf_cfg_list_v1430) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -21577,24 +21613,24 @@ void csi_rs_cfg_bf_r14_s::to_json(json_writer& j) const j.start_obj(); if (csi_rs_cfg_nzp_id_list_ext_r14_present) { j.start_array("csi-RS-ConfigNZPIdListExt-r14"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_id_list_ext_r14.size(); ++i1) { - j.write_int(csi_rs_cfg_nzp_id_list_ext_r14[i1]); + for (const auto& e1 : csi_rs_cfg_nzp_id_list_ext_r14) { + j.write_int(e1); } j.end_array(); } if (csi_im_cfg_id_list_r14_present) { j.start_array("csi-IM-ConfigIdList-r14"); - for (uint32_t i1 = 0; i1 < csi_im_cfg_id_list_r14.size(); ++i1) { - j.write_int(csi_im_cfg_id_list_r14[i1]); + for (const auto& e1 : csi_im_cfg_id_list_r14) { + j.write_int(e1); } j.end_array(); } if (p_c_and_cbsr_per_res_cfg_list_r14_present) { j.start_array("p-C-AndCBSR-PerResourceConfigList-r14"); - for (uint32_t i1 = 0; i1 < p_c_and_cbsr_per_res_cfg_list_r14.size(); ++i1) { + for (const auto& e1 : p_c_and_cbsr_per_res_cfg_list_r14) { j.start_array(); - for (uint32_t i2 = 0; i2 < p_c_and_cbsr_per_res_cfg_list_r14[i1].size(); ++i2) { - p_c_and_cbsr_per_res_cfg_list_r14[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -21602,8 +21638,8 @@ void csi_rs_cfg_bf_r14_s::to_json(json_writer& j) const } if (ace_for4_tx_per_res_cfg_list_r14_present) { j.start_array("ace-For4Tx-PerResourceConfigList-r14"); - for (uint32_t i1 = 0; i1 < ace_for4_tx_per_res_cfg_list_r14.size(); ++i1) { - j.write_bool(ace_for4_tx_per_res_cfg_list_r14[i1]); + for (const auto& e1 : ace_for4_tx_per_res_cfg_list_r14) { + j.write_bool(e1); } j.end_array(); } @@ -21615,8 +21651,8 @@ void csi_rs_cfg_bf_r14_s::to_json(json_writer& j) const } if (csi_rs_cfg_nzp_ap_list_r14_present) { j.start_array("csi-RS-ConfigNZP-ApList-r14"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_ap_list_r14.size(); ++i1) { - csi_rs_cfg_nzp_ap_list_r14[i1].to_json(j); + for (const auto& e1 : csi_rs_cfg_nzp_ap_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -21646,8 +21682,8 @@ void csi_rs_cfg_nzp_emimo_r13_c::to_json(json_writer& j) const j.write_fieldname("setup"); j.start_obj(); j.start_array("nzp-resourceConfigList-r13"); - for (uint32_t i1 = 0; i1 < c.nzp_res_cfg_list_r13.size(); ++i1) { - c.nzp_res_cfg_list_r13[i1].to_json(j); + for (const auto& e1 : c.nzp_res_cfg_list_r13) { + e1.to_json(j); } j.end_array(); if (c.cdm_type_r13_present) { @@ -21722,8 +21758,8 @@ void csi_rs_cfg_nzp_emimo_v1430_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("nzp-resourceConfigListExt-r14"); - for (uint32_t i1 = 0; i1 < nzp_res_cfg_list_ext_r14.size(); ++i1) { - nzp_res_cfg_list_ext_r14[i1].to_json(j); + for (const auto& e1 : nzp_res_cfg_list_ext_r14) { + e1.to_json(j); } j.end_array(); if (cdm_type_v1430_present) { @@ -21786,24 +21822,24 @@ void csi_rs_cfg_bf_r13_s::to_json(json_writer& j) const j.start_obj(); if (csi_rs_cfg_nzp_id_list_ext_r13_present) { j.start_array("csi-RS-ConfigNZPIdListExt-r13"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_id_list_ext_r13.size(); ++i1) { - j.write_int(csi_rs_cfg_nzp_id_list_ext_r13[i1]); + for (const auto& e1 : csi_rs_cfg_nzp_id_list_ext_r13) { + j.write_int(e1); } j.end_array(); } if (csi_im_cfg_id_list_r13_present) { j.start_array("csi-IM-ConfigIdList-r13"); - for (uint32_t i1 = 0; i1 < csi_im_cfg_id_list_r13.size(); ++i1) { - j.write_int(csi_im_cfg_id_list_r13[i1]); + for (const auto& e1 : csi_im_cfg_id_list_r13) { + j.write_int(e1); } j.end_array(); } if (p_c_and_cbsr_per_res_cfg_list_r13_present) { j.start_array("p-C-AndCBSR-PerResourceConfigList-r13"); - for (uint32_t i1 = 0; i1 < p_c_and_cbsr_per_res_cfg_list_r13.size(); ++i1) { + for (const auto& e1 : p_c_and_cbsr_per_res_cfg_list_r13) { j.start_array(); - for (uint32_t i2 = 0; i2 < p_c_and_cbsr_per_res_cfg_list_r13[i1].size(); ++i2) { - p_c_and_cbsr_per_res_cfg_list_r13[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -21811,8 +21847,8 @@ void csi_rs_cfg_bf_r13_s::to_json(json_writer& j) const } if (ace_for4_tx_per_res_cfg_list_r13_present) { j.start_array("ace-For4Tx-PerResourceConfigList-r13"); - for (uint32_t i1 = 0; i1 < ace_for4_tx_per_res_cfg_list_r13.size(); ++i1) { - j.write_bool(ace_for4_tx_per_res_cfg_list_r13[i1]); + for (const auto& e1 : ace_for4_tx_per_res_cfg_list_r13) { + j.write_bool(e1); } j.end_array(); } @@ -21867,8 +21903,8 @@ void csi_rs_cfg_bf_v1430_s::to_json(json_writer& j) const j.start_obj(); if (csi_rs_cfg_nzp_ap_list_r14_present) { j.start_array("csi-RS-ConfigNZP-ApList-r14"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_ap_list_r14.size(); ++i1) { - csi_rs_cfg_nzp_ap_list_r14[i1].to_json(j); + for (const auto& e1 : csi_rs_cfg_nzp_ap_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -22000,8 +22036,8 @@ void csi_rs_cfg_non_precoded_r13_s::to_json(json_writer& j) const j.start_obj(); if (p_c_and_cbsr_list_r13_present) { j.start_array("p-C-AndCBSRList-r13"); - for (uint32_t i1 = 0; i1 < p_c_and_cbsr_list_r13.size(); ++i1) { - p_c_and_cbsr_list_r13[i1].to_json(j); + for (const auto& e1 : p_c_and_cbsr_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -22016,8 +22052,8 @@ void csi_rs_cfg_non_precoded_r13_s::to_json(json_writer& j) const j.write_int("codebookConfig-r13", codebook_cfg_r13); if (csi_im_cfg_id_list_r13_present) { j.start_array("csi-IM-ConfigIdList-r13"); - for (uint32_t i1 = 0; i1 < csi_im_cfg_id_list_r13.size(); ++i1) { - j.write_int(csi_im_cfg_id_list_r13[i1]); + for (const auto& e1 : csi_im_cfg_id_list_r13) { + j.write_int(e1); } j.end_array(); } @@ -22152,8 +22188,8 @@ void csi_rs_cfg_non_precoded_v1530_s::to_json(json_writer& j) const j.start_obj(); if (p_c_and_cbsr_list_r15_present) { j.start_array("p-C-AndCBSRList-r15"); - for (uint32_t i1 = 0; i1 < p_c_and_cbsr_list_r15.size(); ++i1) { - p_c_and_cbsr_list_r15[i1].to_json(j); + for (const auto& e1 : p_c_and_cbsr_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -23683,8 +23719,8 @@ void csi_process_r11_s::to_json(json_writer& j) const j.write_int("csi-RS-ConfigNZPId-r11", csi_rs_cfg_nzp_id_r11); j.write_int("csi-IM-ConfigId-r11", csi_im_cfg_id_r11); j.start_array("p-C-AndCBSRList-r11"); - for (uint32_t i1 = 0; i1 < p_c_and_cbsr_list_r11.size(); ++i1) { - p_c_and_cbsr_list_r11[i1].to_json(j); + for (const auto& e1 : p_c_and_cbsr_list_r11) { + e1.to_json(j); } j.end_array(); if (cqi_report_both_proc_r11_present) { @@ -23760,8 +23796,8 @@ void csi_process_r11_s::csi_im_cfg_id_list_r12_c_::to_json(json_writer& j) const break; case types::setup: j.start_array("setup"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - j.write_int(c[i1]); + for (const auto& e1 : c) { + j.write_int(e1); } j.end_array(); break; @@ -24559,29 +24595,29 @@ void cqi_report_both_r11_s::to_json(json_writer& j) const j.start_obj(); if (csi_im_cfg_to_release_list_r11_present) { j.start_array("csi-IM-ConfigToReleaseList-r11"); - for (uint32_t i1 = 0; i1 < csi_im_cfg_to_release_list_r11.size(); ++i1) { - j.write_int(csi_im_cfg_to_release_list_r11[i1]); + for (const auto& e1 : csi_im_cfg_to_release_list_r11) { + j.write_int(e1); } j.end_array(); } if (csi_im_cfg_to_add_mod_list_r11_present) { j.start_array("csi-IM-ConfigToAddModList-r11"); - for (uint32_t i1 = 0; i1 < csi_im_cfg_to_add_mod_list_r11.size(); ++i1) { - csi_im_cfg_to_add_mod_list_r11[i1].to_json(j); + for (const auto& e1 : csi_im_cfg_to_add_mod_list_r11) { + e1.to_json(j); } j.end_array(); } if (csi_process_to_release_list_r11_present) { j.start_array("csi-ProcessToReleaseList-r11"); - for (uint32_t i1 = 0; i1 < csi_process_to_release_list_r11.size(); ++i1) { - j.write_int(csi_process_to_release_list_r11[i1]); + for (const auto& e1 : csi_process_to_release_list_r11) { + j.write_int(e1); } j.end_array(); } if (csi_process_to_add_mod_list_r11_present) { j.start_array("csi-ProcessToAddModList-r11"); - for (uint32_t i1 = 0; i1 < csi_process_to_add_mod_list_r11.size(); ++i1) { - csi_process_to_add_mod_list_r11[i1].to_json(j); + for (const auto& e1 : csi_process_to_add_mod_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -24664,15 +24700,15 @@ void cqi_report_both_v1310_s::to_json(json_writer& j) const j.start_obj(); if (csi_im_cfg_to_release_list_ext_r13_present) { j.start_array("csi-IM-ConfigToReleaseListExt-r13"); - for (uint32_t i1 = 0; i1 < csi_im_cfg_to_release_list_ext_r13.size(); ++i1) { - j.write_int(csi_im_cfg_to_release_list_ext_r13[i1]); + for (const auto& e1 : csi_im_cfg_to_release_list_ext_r13) { + j.write_int(e1); } j.end_array(); } if (csi_im_cfg_to_add_mod_list_ext_r13_present) { j.start_array("csi-IM-ConfigToAddModListExt-r13"); - for (uint32_t i1 = 0; i1 < csi_im_cfg_to_add_mod_list_ext_r13.size(); ++i1) { - csi_im_cfg_to_add_mod_list_ext_r13[i1].to_json(j); + for (const auto& e1 : csi_im_cfg_to_add_mod_list_ext_r13) { + e1.to_json(j); } j.end_array(); } @@ -25026,15 +25062,15 @@ void cqi_report_periodic_v1130_s::to_json(json_writer& j) const } if (cqi_report_periodic_proc_ext_to_release_list_r11_present) { j.start_array("cqi-ReportPeriodicProcExtToReleaseList-r11"); - for (uint32_t i1 = 0; i1 < cqi_report_periodic_proc_ext_to_release_list_r11.size(); ++i1) { - j.write_int(cqi_report_periodic_proc_ext_to_release_list_r11[i1]); + for (const auto& e1 : cqi_report_periodic_proc_ext_to_release_list_r11) { + j.write_int(e1); } j.end_array(); } if (cqi_report_periodic_proc_ext_to_add_mod_list_r11_present) { j.start_array("cqi-ReportPeriodicProcExtToAddModList-r11"); - for (uint32_t i1 = 0; i1 < cqi_report_periodic_proc_ext_to_add_mod_list_r11.size(); ++i1) { - cqi_report_periodic_proc_ext_to_add_mod_list_r11[i1].to_json(j); + for (const auto& e1 : cqi_report_periodic_proc_ext_to_add_mod_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -25446,17 +25482,17 @@ void spdcch_elems_r15_c::to_json(json_writer& j) const } if (c.dci7_candidates_per_al_pdcch_r15_present) { j.start_array("dci7-CandidatesPerAL-PDCCH-r15"); - for (uint32_t i1 = 0; i1 < c.dci7_candidates_per_al_pdcch_r15.size(); ++i1) { - j.write_int(c.dci7_candidates_per_al_pdcch_r15[i1]); + for (const auto& e1 : c.dci7_candidates_per_al_pdcch_r15) { + j.write_int(e1); } j.end_array(); } if (c.dci7_candidate_sets_per_al_spdcch_r15_present) { j.start_array("dci7-CandidateSetsPerAL-SPDCCH-r15"); - for (uint32_t i1 = 0; i1 < c.dci7_candidate_sets_per_al_spdcch_r15.size(); ++i1) { + for (const auto& e1 : c.dci7_candidate_sets_per_al_spdcch_r15) { j.start_array(); - for (uint32_t i2 = 0; i2 < c.dci7_candidate_sets_per_al_spdcch_r15[i1].size(); ++i2) { - j.write_int(c.dci7_candidate_sets_per_al_spdcch_r15[i1][i2]); + for (const auto& e2 : e1) { + j.write_int(e2); } j.end_array(); } @@ -25474,8 +25510,8 @@ void spdcch_elems_r15_c::to_json(json_writer& j) const } if (c.al_start_point_spdcch_r15_present) { j.start_array("al-StartingPointSPDCCH-r15"); - for (uint32_t i1 = 0; i1 < c.al_start_point_spdcch_r15.size(); ++i1) { - j.write_int(c.al_start_point_spdcch_r15[i1]); + for (const auto& e1 : c.al_start_point_spdcch_r15) { + j.write_int(e1); } j.end_array(); } @@ -25647,8 +25683,8 @@ void spucch_elems_r15_c::to_json(json_writer& j) const j.start_obj(); if (c.n1_subslot_spucch_an_list_r15_present) { j.start_array("n1SubslotSPUCCH-AN-List-r15"); - for (uint32_t i1 = 0; i1 < c.n1_subslot_spucch_an_list_r15.size(); ++i1) { - j.write_int(c.n1_subslot_spucch_an_list_r15[i1]); + for (const auto& e1 : c.n1_subslot_spucch_an_list_r15) { + j.write_int(e1); } j.end_array(); } @@ -25663,15 +25699,15 @@ void spucch_elems_r15_c::to_json(json_writer& j) const } if (c.n4_spucch_slot_res_r15_present) { j.start_array("n4SPUCCHSlot-Resource-r15"); - for (uint32_t i1 = 0; i1 < c.n4_spucch_slot_res_r15.size(); ++i1) { - c.n4_spucch_slot_res_r15[i1].to_json(j); + for (const auto& e1 : c.n4_spucch_slot_res_r15) { + e1.to_json(j); } j.end_array(); } if (c.n4_spucch_subslot_res_r15_present) { j.start_array("n4SPUCCHSubslot-Resource-r15"); - for (uint32_t i1 = 0; i1 < c.n4_spucch_subslot_res_r15.size(); ++i1) { - c.n4_spucch_subslot_res_r15[i1].to_json(j); + for (const auto& e1 : c.n4_spucch_subslot_res_r15) { + e1.to_json(j); } j.end_array(); } @@ -26551,8 +26587,8 @@ void csi_rs_cfg_v1250_s::ds_zero_tx_pwr_csi_rs_r12_c_::to_json(json_writer& j) c j.write_fieldname("setup"); j.start_obj(); j.start_array("zeroTxPowerCSI-RS-List-r12"); - for (uint32_t i1 = 0; i1 < c.zero_tx_pwr_csi_rs_list_r12.size(); ++i1) { - c.zero_tx_pwr_csi_rs_list_r12[i1].to_json(j); + for (const auto& e1 : c.zero_tx_pwr_csi_rs_list_r12) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -27831,8 +27867,8 @@ void pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::mbsfn_sf_cfg_lis j.write_fieldname("setup"); j.start_obj(); j.start_array("subframeConfigList"); - for (uint32_t i1 = 0; i1 < c.sf_cfg_list.size(); ++i1) { - c.sf_cfg_list[i1].to_json(j); + for (const auto& e1 : c.sf_cfg_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -27893,8 +27929,8 @@ void pdsch_re_map_qcl_cfg_r11_s::mbsfn_sf_cfg_list_v1430_c_::to_json(json_writer j.write_fieldname("setup"); j.start_obj(); j.start_array("subframeConfigList-v1430"); - for (uint32_t i1 = 0; i1 < c.sf_cfg_list_v1430.size(); ++i1) { - c.sf_cfg_list_v1430[i1].to_json(j); + for (const auto& e1 : c.sf_cfg_list_v1430) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -27954,15 +27990,15 @@ void pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::to_json(json_writer& j.write_int("crs-FreqShift-v1530", c.crs_freq_shift_v1530); if (c.mbsfn_sf_cfg_list_v1530_present) { j.start_array("mbsfn-SubframeConfigList-v1530"); - for (uint32_t i1 = 0; i1 < c.mbsfn_sf_cfg_list_v1530.size(); ++i1) { - c.mbsfn_sf_cfg_list_v1530[i1].to_json(j); + for (const auto& e1 : c.mbsfn_sf_cfg_list_v1530) { + e1.to_json(j); } j.end_array(); } if (c.mbsfn_sf_cfg_list_ext_v1530_present) { j.start_array("mbsfn-SubframeConfigListExt-v1530"); - for (uint32_t i1 = 0; i1 < c.mbsfn_sf_cfg_list_ext_v1530.size(); ++i1) { - c.mbsfn_sf_cfg_list_ext_v1530[i1].to_json(j); + for (const auto& e1 : c.mbsfn_sf_cfg_list_ext_v1530) { + e1.to_json(j); } j.end_array(); } @@ -29150,15 +29186,15 @@ void crs_assist_info_r11_s::to_json(json_writer& j) const j.write_int("physCellId-r11", pci_r11); j.write_str("antennaPortsCount-r11", ant_ports_count_r11.to_string()); j.start_array("mbsfn-SubframeConfigList-r11"); - for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_r11.size(); ++i1) { - mbsfn_sf_cfg_list_r11[i1].to_json(j); + for (const auto& e1 : mbsfn_sf_cfg_list_r11) { + e1.to_json(j); } j.end_array(); if (ext) { if (mbsfn_sf_cfg_list_v1430.is_present()) { j.start_array("mbsfn-SubframeConfigList-v1430"); - for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_v1430->size(); ++i1) { - ((*mbsfn_sf_cfg_list_v1430)[i1]).to_json(j); + for (const auto& e1 : *mbsfn_sf_cfg_list_v1430) { + e1.to_json(j); } j.end_array(); } @@ -29229,16 +29265,16 @@ void crs_assist_info_r13_s::to_json(json_writer& j) const j.write_str("antennaPortsCount-r13", ant_ports_count_r13.to_string()); if (mbsfn_sf_cfg_list_r13_present) { j.start_array("mbsfn-SubframeConfigList-r13"); - for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_r13.size(); ++i1) { - mbsfn_sf_cfg_list_r13[i1].to_json(j); + for (const auto& e1 : mbsfn_sf_cfg_list_r13) { + e1.to_json(j); } j.end_array(); } if (ext) { if (mbsfn_sf_cfg_list_v1430.is_present()) { j.start_array("mbsfn-SubframeConfigList-v1430"); - for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_v1430->size(); ++i1) { - ((*mbsfn_sf_cfg_list_v1430)[i1]).to_json(j); + for (const auto& e1 : *mbsfn_sf_cfg_list_v1430) { + e1.to_json(j); } j.end_array(); } @@ -29386,8 +29422,8 @@ void csi_rs_cfg_zp_ap_list_r14_c::to_json(json_writer& j) const break; case types::setup: j.start_array("setup"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); break; @@ -29697,8 +29733,8 @@ void eimta_main_cfg_serv_cell_r12_c::setup_s_::mbsfn_sf_cfg_list_v1250_c_::to_js j.write_fieldname("setup"); j.start_obj(); j.start_array("subframeConfigList-r12"); - for (uint32_t i1 = 0; i1 < c.sf_cfg_list_r12.size(); ++i1) { - c.sf_cfg_list_r12[i1].to_json(j); + for (const auto& e1 : c.sf_cfg_list_r12) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -29830,14 +29866,14 @@ void neigh_cells_info_r12_s::to_json(json_writer& j) const j.write_str("crs-PortsCount-r12", crs_ports_count_r12.to_string()); if (mbsfn_sf_cfg_r12_present) { j.start_array("mbsfn-SubframeConfig-r12"); - for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_r12.size(); ++i1) { - mbsfn_sf_cfg_r12[i1].to_json(j); + for (const auto& e1 : mbsfn_sf_cfg_r12) { + e1.to_json(j); } j.end_array(); } j.start_array("p-aList-r12"); - for (uint32_t i1 = 0; i1 < p_a_list_r12.size(); ++i1) { - j.write_str(p_a_list_r12[i1].to_string()); + for (const auto& e1 : p_a_list_r12) { + j.write_str(e1.to_string()); } j.end_array(); j.write_str("transmissionModeList-r12", tx_mode_list_r12.to_string()); @@ -30620,8 +30656,8 @@ void pucch_format3_conf_r13_s::to_json(json_writer& j) const j.start_obj(); if (n3_pucch_an_list_r13_present) { j.start_array("n3PUCCH-AN-List-r13"); - for (uint32_t i1 = 0; i1 < n3_pucch_an_list_r13.size(); ++i1) { - j.write_int(n3_pucch_an_list_r13[i1]); + for (const auto& e1 : n3_pucch_an_list_r13) { + j.write_int(e1); } j.end_array(); } @@ -30646,8 +30682,8 @@ void pucch_format3_conf_r13_s::two_ant_port_activ_pucch_format3_r13_c_::to_json( j.write_fieldname("setup"); j.start_obj(); j.start_array("n3PUCCH-AN-ListP1-r13"); - for (uint32_t i1 = 0; i1 < c.n3_pucch_an_list_p1_r13.size(); ++i1) { - j.write_int(c.n3_pucch_an_list_p1_r13[i1]); + for (const auto& e1 : c.n3_pucch_an_list_p1_r13) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -31280,8 +31316,8 @@ void spdcch_cfg_r15_c::to_json(json_writer& j) const } if (c.spdcch_set_cfg_r15_present) { j.start_array("spdcch-SetConfig-r15"); - for (uint32_t i1 = 0; i1 < c.spdcch_set_cfg_r15.size(); ++i1) { - c.spdcch_set_cfg_r15[i1].to_json(j); + for (const auto& e1 : c.spdcch_set_cfg_r15) { + e1.to_json(j); } j.end_array(); } @@ -31969,8 +32005,8 @@ void spucch_cfg_r15_c::to_json(json_writer& j) const j.start_obj(); if (c.spucch_set_r15_present) { j.start_array("spucch-Set-r15"); - for (uint32_t i1 = 0; i1 < c.spucch_set_r15.size(); ++i1) { - c.spucch_set_r15[i1].to_json(j); + for (const auto& e1 : c.spucch_set_r15) { + e1.to_json(j); } j.end_array(); } @@ -31980,8 +32016,8 @@ void spucch_cfg_r15_c::to_json(json_writer& j) const j.write_fieldname("twoAntennaPortActivatedSPUCCH-Format3-r15"); j.start_obj(); j.start_array("n3SPUCCH-AN-List-r15"); - for (uint32_t i1 = 0; i1 < c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15.size(); ++i1) { - j.write_int(c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15[i1]); + for (const auto& e1 : c.two_ant_port_activ_spucch_format3_r15.n3_spucch_an_list_r15) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -32226,8 +32262,8 @@ void sched_request_cfg_v1530_c::to_json(json_writer& j) const } if (c.sr_subslot_spucch_res_list_r15_present) { j.start_array("sr-SubslotSPUCCH-ResourceList-r15"); - for (uint32_t i1 = 0; i1 < c.sr_subslot_spucch_res_list_r15.size(); ++i1) { - j.write_int(c.sr_subslot_spucch_res_list_r15[i1]); + for (const auto& e1 : c.sr_subslot_spucch_res_list_r15) { + j.write_int(e1); } j.end_array(); } @@ -32483,15 +32519,15 @@ void slot_or_subslot_pusch_cfg_r15_c::to_json(json_writer& j) const } if (c.beta_offset_subslot_ack_idx_r15_present) { j.start_array("betaOffsetSubslot-ACK-Index-r15"); - for (uint32_t i1 = 0; i1 < c.beta_offset_subslot_ack_idx_r15.size(); ++i1) { - j.write_int(c.beta_offset_subslot_ack_idx_r15[i1]); + for (const auto& e1 : c.beta_offset_subslot_ack_idx_r15) { + j.write_int(e1); } j.end_array(); } if (c.beta_offset2_subslot_ack_idx_r15_present) { j.start_array("betaOffset2Subslot-ACK-Index-r15"); - for (uint32_t i1 = 0; i1 < c.beta_offset2_subslot_ack_idx_r15.size(); ++i1) { - j.write_int(c.beta_offset2_subslot_ack_idx_r15[i1]); + for (const auto& e1 : c.beta_offset2_subslot_ack_idx_r15) { + j.write_int(e1); } j.end_array(); } @@ -32500,8 +32536,8 @@ void slot_or_subslot_pusch_cfg_r15_c::to_json(json_writer& j) const } if (c.beta_offset_subslot_ri_idx_r15_present) { j.start_array("betaOffsetSubslot-RI-Index-r15"); - for (uint32_t i1 = 0; i1 < c.beta_offset_subslot_ri_idx_r15.size(); ++i1) { - j.write_int(c.beta_offset_subslot_ri_idx_r15[i1]); + for (const auto& e1 : c.beta_offset_subslot_ri_idx_r15) { + j.write_int(e1); } j.end_array(); } @@ -33646,15 +33682,15 @@ void cfi_pattern_cfg_r15_s::to_json(json_writer& j) const j.start_obj(); if (cfi_pattern_sf_r15_present) { j.start_array("cfi-PatternSubframe-r15"); - for (uint32_t i1 = 0; i1 < cfi_pattern_sf_r15.size(); ++i1) { - j.write_int(cfi_pattern_sf_r15[i1]); + for (const auto& e1 : cfi_pattern_sf_r15) { + j.write_int(e1); } j.end_array(); } if (cfi_pattern_slot_subslot_r15_present) { j.start_array("cfi-PatternSlotSubslot-r15"); - for (uint32_t i1 = 0; i1 < cfi_pattern_slot_subslot_r15.size(); ++i1) { - j.write_int(cfi_pattern_slot_subslot_r15[i1]); + for (const auto& e1 : cfi_pattern_slot_subslot_r15) { + j.write_int(e1); } j.end_array(); } @@ -34819,15 +34855,15 @@ void epdcch_cfg_r11_s::cfg_r11_c_::to_json(json_writer& j) const } if (c.set_cfg_to_release_list_r11_present) { j.start_array("setConfigToReleaseList-r11"); - for (uint32_t i1 = 0; i1 < c.set_cfg_to_release_list_r11.size(); ++i1) { - j.write_int(c.set_cfg_to_release_list_r11[i1]); + for (const auto& e1 : c.set_cfg_to_release_list_r11) { + j.write_int(e1); } j.end_array(); } if (c.set_cfg_to_add_mod_list_r11_present) { j.start_array("setConfigToAddModList-r11"); - for (uint32_t i1 = 0; i1 < c.set_cfg_to_add_mod_list_r11.size(); ++i1) { - c.set_cfg_to_add_mod_list_r11[i1].to_json(j); + for (const auto& e1 : c.set_cfg_to_add_mod_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -35282,15 +35318,15 @@ void pdsch_cfg_ded_v1130_s::to_json(json_writer& j) const } if (re_map_qcl_cfg_to_release_list_r11_present) { j.start_array("re-MappingQCLConfigToReleaseList-r11"); - for (uint32_t i1 = 0; i1 < re_map_qcl_cfg_to_release_list_r11.size(); ++i1) { - j.write_int(re_map_qcl_cfg_to_release_list_r11[i1]); + for (const auto& e1 : re_map_qcl_cfg_to_release_list_r11) { + j.write_int(e1); } j.end_array(); } if (re_map_qcl_cfg_to_add_mod_list_r11_present) { j.start_array("re-MappingQCLConfigToAddModList-r11"); - for (uint32_t i1 = 0; i1 < re_map_qcl_cfg_to_add_mod_list_r11.size(); ++i1) { - re_map_qcl_cfg_to_add_mod_list_r11[i1].to_json(j); + for (const auto& e1 : re_map_qcl_cfg_to_add_mod_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -35852,8 +35888,8 @@ void pucch_cfg_ded_r13_s::pucch_format_r13_c_::to_json(json_writer& j) const j.start_obj(); if (c.get().n3_pucch_an_list_r13_present) { j.start_array("n3PUCCH-AN-List-r13"); - for (uint32_t i1 = 0; i1 < c.get().n3_pucch_an_list_r13.size(); ++i1) { - j.write_int(c.get().n3_pucch_an_list_r13[i1]); + for (const auto& e1 : c.get().n3_pucch_an_list_r13) { + j.write_int(e1); } j.end_array(); } @@ -35876,14 +35912,14 @@ void pucch_cfg_ded_r13_s::pucch_format_r13_c_::to_json(json_writer& j) const j.write_fieldname("format4-r13"); j.start_obj(); j.start_array("format4-resourceConfiguration-r13"); - for (uint32_t i1 = 0; i1 < c.get().format4_res_cfg_r13.size(); ++i1) { - c.get().format4_res_cfg_r13[i1].to_json(j); + for (const auto& e1 : c.get().format4_res_cfg_r13) { + e1.to_json(j); } j.end_array(); if (c.get().format4_multi_csi_res_cfg_r13_present) { j.start_array("format4-MultiCSI-resourceConfiguration-r13"); - for (uint32_t i1 = 0; i1 < c.get().format4_multi_csi_res_cfg_r13.size(); ++i1) { - c.get().format4_multi_csi_res_cfg_r13[i1].to_json(j); + for (const auto& e1 : c.get().format4_multi_csi_res_cfg_r13) { + e1.to_json(j); } j.end_array(); } @@ -35893,8 +35929,8 @@ void pucch_cfg_ded_r13_s::pucch_format_r13_c_::to_json(json_writer& j) const j.write_fieldname("format5-r13"); j.start_obj(); j.start_array("format5-resourceConfiguration-r13"); - for (uint32_t i1 = 0; i1 < c.get().format5_res_cfg_r13.size(); ++i1) { - c.get().format5_res_cfg_r13[i1].to_json(j); + for (const auto& e1 : c.get().format5_res_cfg_r13) { + e1.to_json(j); } j.end_array(); if (c.get().format5_multi_csi_res_cfg_r13_present) { @@ -36013,8 +36049,8 @@ void pucch_cfg_ded_r13_s::pucch_format_r13_c_::format3_r13_s_::two_ant_port_acti j.write_fieldname("setup"); j.start_obj(); j.start_array("n3PUCCH-AN-ListP1-r13"); - for (uint32_t i1 = 0; i1 < c.n3_pucch_an_list_p1_r13.size(); ++i1) { - j.write_int(c.n3_pucch_an_list_p1_r13[i1]); + for (const auto& e1 : c.n3_pucch_an_list_p1_r13) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -36076,17 +36112,17 @@ void pucch_cfg_ded_r13_s::pucch_format_r13_c_::ch_sel_r13_s_::n1_pucch_an_cs_r13 j.write_fieldname("setup"); j.start_obj(); j.start_array("n1PUCCH-AN-CS-List-r13"); - for (uint32_t i1 = 0; i1 < c.n1_pucch_an_cs_list_r13.size(); ++i1) { + for (const auto& e1 : c.n1_pucch_an_cs_list_r13) { j.start_array(); - for (uint32_t i2 = 0; i2 < c.n1_pucch_an_cs_list_r13[i1].size(); ++i2) { - j.write_int(c.n1_pucch_an_cs_list_r13[i1][i2]); + for (const auto& e2 : e1) { + j.write_int(e2); } j.end_array(); } j.end_array(); j.start_array("n1PUCCH-AN-CS-ListP1-r13"); - for (uint32_t i1 = 0; i1 < c.n1_pucch_an_cs_list_p1_r13.size(); ++i1) { - j.write_int(c.n1_pucch_an_cs_list_p1_r13[i1]); + for (const auto& e1 : c.n1_pucch_an_cs_list_p1_r13) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -36630,10 +36666,10 @@ void pucch_cfg_ded_v1020_s::pucch_format_r10_c_::ch_sel_r10_s_::n1_pucch_an_cs_r j.write_fieldname("setup"); j.start_obj(); j.start_array("n1PUCCH-AN-CS-List-r10"); - for (uint32_t i1 = 0; i1 < c.n1_pucch_an_cs_list_r10.size(); ++i1) { + for (const auto& e1 : c.n1_pucch_an_cs_list_r10) { j.start_array(); - for (uint32_t i2 = 0; i2 < c.n1_pucch_an_cs_list_r10[i1].size(); ++i2) { - j.write_int(c.n1_pucch_an_cs_list_r10[i1][i2]); + for (const auto& e2 : e1) { + j.write_int(e2); } j.end_array(); } @@ -36743,8 +36779,8 @@ void pucch_cfg_ded_v1130_s::n1_pucch_an_cs_v1130_c_::to_json(json_writer& j) con j.write_fieldname("setup"); j.start_obj(); j.start_array("n1PUCCH-AN-CS-ListP1-r11"); - for (uint32_t i1 = 0; i1 < c.n1_pucch_an_cs_list_p1_r11.size(); ++i1) { - j.write_int(c.n1_pucch_an_cs_list_p1_r11[i1]); + for (const auto& e1 : c.n1_pucch_an_cs_list_p1_r11) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -37926,29 +37962,29 @@ void phys_cfg_ded_stti_r15_c::to_json(json_writer& j) const } if (c.csi_rs_cfg_nzp_to_release_list_r15_present) { j.start_array("csi-RS-ConfigNZPToReleaseList-r15"); - for (uint32_t i1 = 0; i1 < c.csi_rs_cfg_nzp_to_release_list_r15.size(); ++i1) { - j.write_int(c.csi_rs_cfg_nzp_to_release_list_r15[i1]); + for (const auto& e1 : c.csi_rs_cfg_nzp_to_release_list_r15) { + j.write_int(e1); } j.end_array(); } if (c.csi_rs_cfg_nzp_to_add_mod_list_r15_present) { j.start_array("csi-RS-ConfigNZPToAddModList-r15"); - for (uint32_t i1 = 0; i1 < c.csi_rs_cfg_nzp_to_add_mod_list_r15.size(); ++i1) { - c.csi_rs_cfg_nzp_to_add_mod_list_r15[i1].to_json(j); + for (const auto& e1 : c.csi_rs_cfg_nzp_to_add_mod_list_r15) { + e1.to_json(j); } j.end_array(); } if (c.csi_rs_cfg_zp_to_release_list_r15_present) { j.start_array("csi-RS-ConfigZPToReleaseList-r15"); - for (uint32_t i1 = 0; i1 < c.csi_rs_cfg_zp_to_release_list_r15.size(); ++i1) { - j.write_int(c.csi_rs_cfg_zp_to_release_list_r15[i1]); + for (const auto& e1 : c.csi_rs_cfg_zp_to_release_list_r15) { + j.write_int(e1); } j.end_array(); } if (c.csi_rs_cfg_zp_to_add_mod_list_r11_present) { j.start_array("csi-RS-ConfigZPToAddModList-r11"); - for (uint32_t i1 = 0; i1 < c.csi_rs_cfg_zp_to_add_mod_list_r11.size(); ++i1) { - c.csi_rs_cfg_zp_to_add_mod_list_r11[i1].to_json(j); + for (const auto& e1 : c.csi_rs_cfg_zp_to_add_mod_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -38338,8 +38374,8 @@ void sps_cfg_dl_c::setup_s_::to_json(json_writer& j) const j.write_str("semiPersistSchedIntervalDL", semi_persist_sched_interv_dl.to_string()); j.write_int("numberOfConfSPS-Processes", nof_conf_sps_processes); j.start_array("n1PUCCH-AN-PersistentList"); - for (uint32_t i1 = 0; i1 < n1_pucch_an_persistent_list.size(); ++i1) { - j.write_int(n1_pucch_an_persistent_list[i1]); + for (const auto& e1 : n1_pucch_an_persistent_list) { + j.write_int(e1); } j.end_array(); if (ext) { @@ -38365,8 +38401,8 @@ void sps_cfg_dl_c::setup_s_::two_ant_port_activ_r10_c_::to_json(json_writer& j) j.write_fieldname("setup"); j.start_obj(); j.start_array("n1PUCCH-AN-PersistentListP1-r10"); - for (uint32_t i1 = 0; i1 < c.n1_pucch_an_persistent_list_p1_r10.size(); ++i1) { - j.write_int(c.n1_pucch_an_persistent_list_p1_r10[i1]); + for (const auto& e1 : c.n1_pucch_an_persistent_list_p1_r10) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -38649,8 +38685,8 @@ void srs_tpc_pdcch_cfg_r14_c::to_json(json_writer& j) const j.write_int("fieldTypeFormat3B-r14", c.field_type_format3_b_r14); if (c.srs_cc_set_idxlist_r14_present) { j.start_array("srs-CC-SetIndexlist-r14"); - for (uint32_t i1 = 0; i1 < c.srs_cc_set_idxlist_r14.size(); ++i1) { - c.srs_cc_set_idxlist_r14[i1].to_json(j); + for (const auto& e1 : c.srs_cc_set_idxlist_r14) { + e1.to_json(j); } j.end_array(); } @@ -38992,8 +39028,8 @@ void srs_ul_cfg_ded_aperiodic_r10_c::to_json(json_writer& j) const j.write_int("srs-ConfigIndexAp-r10", c.srs_cfg_idx_ap_r10); if (c.srs_cfg_ap_dci_format4_r10_present) { j.start_array("srs-ConfigApDCI-Format4-r10"); - for (uint32_t i1 = 0; i1 < c.srs_cfg_ap_dci_format4_r10.size(); ++i1) { - c.srs_cfg_ap_dci_format4_r10[i1].to_json(j); + for (const auto& e1 : c.srs_cfg_ap_dci_format4_r10) { + e1.to_json(j); } j.end_array(); } @@ -39134,8 +39170,8 @@ void srs_ul_cfg_ded_aperiodic_v1310_c::to_json(json_writer& j) const j.start_obj(); if (c.srs_cfg_ap_dci_format4_v1310_present) { j.start_array("srs-ConfigApDCI-Format4-v1310"); - for (uint32_t i1 = 0; i1 < c.srs_cfg_ap_dci_format4_v1310.size(); ++i1) { - c.srs_cfg_ap_dci_format4_v1310[i1].to_json(j); + for (const auto& e1 : c.srs_cfg_ap_dci_format4_v1310) { + e1.to_json(j); } j.end_array(); } @@ -39290,8 +39326,8 @@ void srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::to_json(json_writer& j) const j.write_int("srs-ConfigIndexAp-r13", c.srs_cfg_idx_ap_r13); if (c.srs_cfg_ap_dci_format4_r13_present) { j.start_array("srs-ConfigApDCI-Format4-r13"); - for (uint32_t i1 = 0; i1 < c.srs_cfg_ap_dci_format4_r13.size(); ++i1) { - c.srs_cfg_ap_dci_format4_r13[i1].to_json(j); + for (const auto& e1 : c.srs_cfg_ap_dci_format4_r13) { + e1.to_json(j); } j.end_array(); } @@ -40194,15 +40230,15 @@ void mac_main_cfg_s::to_json(json_writer& j) const } if (stag_to_release_list_r11.is_present()) { j.start_array("stag-ToReleaseList-r11"); - for (uint32_t i1 = 0; i1 < stag_to_release_list_r11->size(); ++i1) { - j.write_int(((*stag_to_release_list_r11)[i1])); + for (const auto& e1 : *stag_to_release_list_r11) { + j.write_int(e1); } j.end_array(); } if (stag_to_add_mod_list_r11.is_present()) { j.start_array("stag-ToAddModList-r11"); - for (uint32_t i1 = 0; i1 < stag_to_add_mod_list_r11->size(); ++i1) { - ((*stag_to_add_mod_list_r11)[i1]).to_json(j); + for (const auto& e1 : *stag_to_add_mod_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -40983,15 +41019,15 @@ void naics_assist_info_r12_c::to_json(json_writer& j) const j.start_obj(); if (c.neigh_cells_to_release_list_r12_present) { j.start_array("neighCellsToReleaseList-r12"); - for (uint32_t i1 = 0; i1 < c.neigh_cells_to_release_list_r12.size(); ++i1) { - j.write_int(c.neigh_cells_to_release_list_r12[i1]); + for (const auto& e1 : c.neigh_cells_to_release_list_r12) { + j.write_int(e1); } j.end_array(); } if (c.neigh_cells_to_add_mod_list_r12_present) { j.start_array("neighCellsToAddModList-r12"); - for (uint32_t i1 = 0; i1 < c.neigh_cells_to_add_mod_list_r12.size(); ++i1) { - c.neigh_cells_to_add_mod_list_r12[i1].to_json(j); + for (const auto& e1 : c.neigh_cells_to_add_mod_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -41073,8 +41109,8 @@ void neigh_cells_crs_info_r11_c::to_json(json_writer& j) const break; case types::setup: j.start_array("setup"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); break; @@ -41129,8 +41165,8 @@ void neigh_cells_crs_info_r13_c::to_json(json_writer& j) const break; case types::setup: j.start_array("setup"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); break; @@ -41185,8 +41221,8 @@ void neigh_cells_crs_info_r15_c::to_json(json_writer& j) const break; case types::setup: j.start_array("setup"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); break; @@ -42315,29 +42351,29 @@ void phys_cfg_ded_s::to_json(json_writer& j) const } if (csi_rs_cfg_nzp_to_release_list_r11.is_present()) { j.start_array("csi-RS-ConfigNZPToReleaseList-r11"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_release_list_r11->size(); ++i1) { - j.write_int(((*csi_rs_cfg_nzp_to_release_list_r11)[i1])); + for (const auto& e1 : *csi_rs_cfg_nzp_to_release_list_r11) { + j.write_int(e1); } j.end_array(); } if (csi_rs_cfg_nzp_to_add_mod_list_r11.is_present()) { j.start_array("csi-RS-ConfigNZPToAddModList-r11"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_add_mod_list_r11->size(); ++i1) { - ((*csi_rs_cfg_nzp_to_add_mod_list_r11)[i1]).to_json(j); + for (const auto& e1 : *csi_rs_cfg_nzp_to_add_mod_list_r11) { + e1.to_json(j); } j.end_array(); } if (csi_rs_cfg_zp_to_release_list_r11.is_present()) { j.start_array("csi-RS-ConfigZPToReleaseList-r11"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_zp_to_release_list_r11->size(); ++i1) { - j.write_int(((*csi_rs_cfg_zp_to_release_list_r11)[i1])); + for (const auto& e1 : *csi_rs_cfg_zp_to_release_list_r11) { + j.write_int(e1); } j.end_array(); } if (csi_rs_cfg_zp_to_add_mod_list_r11.is_present()) { j.start_array("csi-RS-ConfigZPToAddModList-r11"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_zp_to_add_mod_list_r11->size(); ++i1) { - ((*csi_rs_cfg_zp_to_add_mod_list_r11)[i1]).to_json(j); + for (const auto& e1 : *csi_rs_cfg_zp_to_add_mod_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -42447,15 +42483,15 @@ void phys_cfg_ded_s::to_json(json_writer& j) const } if (csi_rs_cfg_nzp_to_add_mod_list_ext_r13.is_present()) { j.start_array("csi-RS-ConfigNZPToAddModListExt-r13"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_add_mod_list_ext_r13->size(); ++i1) { - ((*csi_rs_cfg_nzp_to_add_mod_list_ext_r13)[i1]).to_json(j); + for (const auto& e1 : *csi_rs_cfg_nzp_to_add_mod_list_ext_r13) { + e1.to_json(j); } j.end_array(); } if (csi_rs_cfg_nzp_to_release_list_ext_r13.is_present()) { j.start_array("csi-RS-ConfigNZPToReleaseListExt-r13"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_release_list_ext_r13->size(); ++i1) { - j.write_int(((*csi_rs_cfg_nzp_to_release_list_ext_r13)[i1])); + for (const auto& e1 : *csi_rs_cfg_nzp_to_release_list_ext_r13) { + j.write_int(e1); } j.end_array(); } @@ -42496,29 +42532,29 @@ void phys_cfg_ded_s::to_json(json_writer& j) const } if (srs_ul_periodic_cfg_ded_list_r14.is_present()) { j.start_array("soundingRS-UL-PeriodicConfigDedicatedList-r14"); - for (uint32_t i1 = 0; i1 < srs_ul_periodic_cfg_ded_list_r14->size(); ++i1) { - ((*srs_ul_periodic_cfg_ded_list_r14)[i1]).to_json(j); + for (const auto& e1 : *srs_ul_periodic_cfg_ded_list_r14) { + e1.to_json(j); } j.end_array(); } if (srs_ul_periodic_cfg_ded_up_pts_ext_list_r14.is_present()) { j.start_array("soundingRS-UL-PeriodicConfigDedicatedUpPTsExtList-r14"); - for (uint32_t i1 = 0; i1 < srs_ul_periodic_cfg_ded_up_pts_ext_list_r14->size(); ++i1) { - ((*srs_ul_periodic_cfg_ded_up_pts_ext_list_r14)[i1]).to_json(j); + for (const auto& e1 : *srs_ul_periodic_cfg_ded_up_pts_ext_list_r14) { + e1.to_json(j); } j.end_array(); } if (srs_ul_aperiodic_cfg_ded_list_r14.is_present()) { j.start_array("soundingRS-UL-AperiodicConfigDedicatedList-r14"); - for (uint32_t i1 = 0; i1 < srs_ul_aperiodic_cfg_ded_list_r14->size(); ++i1) { - ((*srs_ul_aperiodic_cfg_ded_list_r14)[i1]).to_json(j); + for (const auto& e1 : *srs_ul_aperiodic_cfg_ded_list_r14) { + e1.to_json(j); } j.end_array(); } if (srs_ul_cfg_ded_ap_up_pts_ext_list_r14.is_present()) { j.start_array("soundingRS-UL-ConfigDedicatedApUpPTsExtList-r14"); - for (uint32_t i1 = 0; i1 < srs_ul_cfg_ded_ap_up_pts_ext_list_r14->size(); ++i1) { - ((*srs_ul_cfg_ded_ap_up_pts_ext_list_r14)[i1]).to_json(j); + for (const auto& e1 : *srs_ul_cfg_ded_ap_up_pts_ext_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -42802,8 +42838,8 @@ void phys_cfg_ded_s::type_a_srs_tpc_pdcch_group_r14_c_::to_json(json_writer& j) break; case types::setup: j.start_array("setup"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); break; @@ -43573,29 +43609,29 @@ void sps_cfg_v1430_s::to_json(json_writer& j) const } if (sps_cfg_ul_to_add_mod_list_r14_present) { j.start_array("sps-ConfigUL-ToAddModList-r14"); - for (uint32_t i1 = 0; i1 < sps_cfg_ul_to_add_mod_list_r14.size(); ++i1) { - sps_cfg_ul_to_add_mod_list_r14[i1].to_json(j); + for (const auto& e1 : sps_cfg_ul_to_add_mod_list_r14) { + e1.to_json(j); } j.end_array(); } if (sps_cfg_ul_to_release_list_r14_present) { j.start_array("sps-ConfigUL-ToReleaseList-r14"); - for (uint32_t i1 = 0; i1 < sps_cfg_ul_to_release_list_r14.size(); ++i1) { - j.write_int(sps_cfg_ul_to_release_list_r14[i1]); + for (const auto& e1 : sps_cfg_ul_to_release_list_r14) { + j.write_int(e1); } j.end_array(); } if (sps_cfg_sl_to_add_mod_list_r14_present) { j.start_array("sps-ConfigSL-ToAddModList-r14"); - for (uint32_t i1 = 0; i1 < sps_cfg_sl_to_add_mod_list_r14.size(); ++i1) { - sps_cfg_sl_to_add_mod_list_r14[i1].to_json(j); + for (const auto& e1 : sps_cfg_sl_to_add_mod_list_r14) { + e1.to_json(j); } j.end_array(); } if (sps_cfg_sl_to_release_list_r14_present) { j.start_array("sps-ConfigSL-ToReleaseList-r14"); - for (uint32_t i1 = 0; i1 < sps_cfg_sl_to_release_list_r14.size(); ++i1) { - j.write_int(sps_cfg_sl_to_release_list_r14[i1]); + for (const auto& e1 : sps_cfg_sl_to_release_list_r14) { + j.write_int(e1); } j.end_array(); } @@ -43675,29 +43711,29 @@ void sps_cfg_v1530_s::to_json(json_writer& j) const } if (sps_cfg_ul_stti_to_add_mod_list_r15_present) { j.start_array("sps-ConfigUL-STTI-ToAddModList-r15"); - for (uint32_t i1 = 0; i1 < sps_cfg_ul_stti_to_add_mod_list_r15.size(); ++i1) { - sps_cfg_ul_stti_to_add_mod_list_r15[i1].to_json(j); + for (const auto& e1 : sps_cfg_ul_stti_to_add_mod_list_r15) { + e1.to_json(j); } j.end_array(); } if (sps_cfg_ul_stti_to_release_list_r15_present) { j.start_array("sps-ConfigUL-STTI-ToReleaseList-r15"); - for (uint32_t i1 = 0; i1 < sps_cfg_ul_stti_to_release_list_r15.size(); ++i1) { - j.write_int(sps_cfg_ul_stti_to_release_list_r15[i1]); + for (const auto& e1 : sps_cfg_ul_stti_to_release_list_r15) { + j.write_int(e1); } j.end_array(); } if (sps_cfg_ul_to_add_mod_list_r15_present) { j.start_array("sps-ConfigUL-ToAddModList-r15"); - for (uint32_t i1 = 0; i1 < sps_cfg_ul_to_add_mod_list_r15.size(); ++i1) { - sps_cfg_ul_to_add_mod_list_r15[i1].to_json(j); + for (const auto& e1 : sps_cfg_ul_to_add_mod_list_r15) { + e1.to_json(j); } j.end_array(); } if (sps_cfg_ul_to_release_list_r15_present) { j.start_array("sps-ConfigUL-ToReleaseList-r15"); - for (uint32_t i1 = 0; i1 < sps_cfg_ul_to_release_list_r15.size(); ++i1) { - j.write_int(sps_cfg_ul_to_release_list_r15[i1]); + for (const auto& e1 : sps_cfg_ul_to_release_list_r15) { + j.write_int(e1); } j.end_array(); } @@ -43858,43 +43894,43 @@ void idle_mode_mob_ctrl_info_s::to_json(json_writer& j) const j.start_obj(); if (freq_prio_list_eutra_present) { j.start_array("freqPriorityListEUTRA"); - for (uint32_t i1 = 0; i1 < freq_prio_list_eutra.size(); ++i1) { - freq_prio_list_eutra[i1].to_json(j); + for (const auto& e1 : freq_prio_list_eutra) { + e1.to_json(j); } j.end_array(); } if (freq_prio_list_geran_present) { j.start_array("freqPriorityListGERAN"); - for (uint32_t i1 = 0; i1 < freq_prio_list_geran.size(); ++i1) { - freq_prio_list_geran[i1].to_json(j); + for (const auto& e1 : freq_prio_list_geran) { + e1.to_json(j); } j.end_array(); } if (freq_prio_list_utra_fdd_present) { j.start_array("freqPriorityListUTRA-FDD"); - for (uint32_t i1 = 0; i1 < freq_prio_list_utra_fdd.size(); ++i1) { - freq_prio_list_utra_fdd[i1].to_json(j); + for (const auto& e1 : freq_prio_list_utra_fdd) { + e1.to_json(j); } j.end_array(); } if (freq_prio_list_utra_tdd_present) { j.start_array("freqPriorityListUTRA-TDD"); - for (uint32_t i1 = 0; i1 < freq_prio_list_utra_tdd.size(); ++i1) { - freq_prio_list_utra_tdd[i1].to_json(j); + for (const auto& e1 : freq_prio_list_utra_tdd) { + e1.to_json(j); } j.end_array(); } if (band_class_prio_list_hrpd_present) { j.start_array("bandClassPriorityListHRPD"); - for (uint32_t i1 = 0; i1 < band_class_prio_list_hrpd.size(); ++i1) { - band_class_prio_list_hrpd[i1].to_json(j); + for (const auto& e1 : band_class_prio_list_hrpd) { + e1.to_json(j); } j.end_array(); } if (band_class_prio_list1_xrtt_present) { j.start_array("bandClassPriorityList1XRTT"); - for (uint32_t i1 = 0; i1 < band_class_prio_list1_xrtt.size(); ++i1) { - band_class_prio_list1_xrtt[i1].to_json(j); + for (const auto& e1 : band_class_prio_list1_xrtt) { + e1.to_json(j); } j.end_array(); } @@ -43904,29 +43940,29 @@ void idle_mode_mob_ctrl_info_s::to_json(json_writer& j) const if (ext) { if (freq_prio_list_ext_eutra_r12.is_present()) { j.start_array("freqPriorityListExtEUTRA-r12"); - for (uint32_t i1 = 0; i1 < freq_prio_list_ext_eutra_r12->size(); ++i1) { - ((*freq_prio_list_ext_eutra_r12)[i1]).to_json(j); + for (const auto& e1 : *freq_prio_list_ext_eutra_r12) { + e1.to_json(j); } j.end_array(); } if (freq_prio_list_eutra_v1310.is_present()) { j.start_array("freqPriorityListEUTRA-v1310"); - for (uint32_t i1 = 0; i1 < freq_prio_list_eutra_v1310->size(); ++i1) { - ((*freq_prio_list_eutra_v1310)[i1]).to_json(j); + for (const auto& e1 : *freq_prio_list_eutra_v1310) { + e1.to_json(j); } j.end_array(); } if (freq_prio_list_ext_eutra_v1310.is_present()) { j.start_array("freqPriorityListExtEUTRA-v1310"); - for (uint32_t i1 = 0; i1 < freq_prio_list_ext_eutra_v1310->size(); ++i1) { - ((*freq_prio_list_ext_eutra_v1310)[i1]).to_json(j); + for (const auto& e1 : *freq_prio_list_ext_eutra_v1310) { + e1.to_json(j); } j.end_array(); } if (freq_prio_list_nr_r15.is_present()) { j.start_array("freqPriorityListNR-r15"); - for (uint32_t i1 = 0; i1 < freq_prio_list_nr_r15->size(); ++i1) { - ((*freq_prio_list_nr_r15)[i1]).to_json(j); + for (const auto& e1 : *freq_prio_list_nr_r15) { + e1.to_json(j); } j.end_array(); } @@ -43951,8 +43987,8 @@ void idle_mode_mob_ctrl_info_v9e0_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("freqPriorityListEUTRA-v9e0"); - for (uint32_t i1 = 0; i1 < freq_prio_list_eutra_v9e0.size(); ++i1) { - freq_prio_list_eutra_v9e0[i1].to_json(j); + for (const auto& e1 : freq_prio_list_eutra_v9e0) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -44408,22 +44444,22 @@ void rr_cfg_ded_s::to_json(json_writer& j) const j.start_obj(); if (srb_to_add_mod_list_present) { j.start_array("srb-ToAddModList"); - for (uint32_t i1 = 0; i1 < srb_to_add_mod_list.size(); ++i1) { - srb_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : srb_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (drb_to_add_mod_list_present) { j.start_array("drb-ToAddModList"); - for (uint32_t i1 = 0; i1 < drb_to_add_mod_list.size(); ++i1) { - drb_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : drb_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (drb_to_release_list_present) { j.start_array("drb-ToReleaseList"); - for (uint32_t i1 = 0; i1 < drb_to_release_list.size(); ++i1) { - j.write_int(drb_to_release_list[i1]); + for (const auto& e1 : drb_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -44470,8 +44506,8 @@ void rr_cfg_ded_s::to_json(json_writer& j) const } if (srb_to_add_mod_ext_list_r15.is_present()) { j.start_array("srb-ToAddModExtList-r15"); - for (uint32_t i1 = 0; i1 < srb_to_add_mod_ext_list_r15->size(); ++i1) { - ((*srb_to_add_mod_ext_list_r15)[i1]).to_json(j); + for (const auto& e1 : *srb_to_add_mod_ext_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -44492,22 +44528,22 @@ void rr_cfg_ded_s::to_json(json_writer& j) const } if (drb_to_add_mod_list_r15.is_present()) { j.start_array("drb-ToAddModList-r15"); - for (uint32_t i1 = 0; i1 < drb_to_add_mod_list_r15->size(); ++i1) { - ((*drb_to_add_mod_list_r15)[i1]).to_json(j); + for (const auto& e1 : *drb_to_add_mod_list_r15) { + e1.to_json(j); } j.end_array(); } if (drb_to_release_list_r15.is_present()) { j.start_array("drb-ToReleaseList-r15"); - for (uint32_t i1 = 0; i1 < drb_to_release_list_r15->size(); ++i1) { - j.write_int(((*drb_to_release_list_r15)[i1])); + for (const auto& e1 : *drb_to_release_list_r15) { + j.write_int(e1); } j.end_array(); } if (srb_to_release_list_dupl_r15.is_present()) { j.start_array("srb-ToReleaseListDupl-r15"); - for (uint32_t i1 = 0; i1 < srb_to_release_list_dupl_r15->size(); ++i1) { - j.write_int(((*srb_to_release_list_dupl_r15)[i1])); + for (const auto& e1 : *srb_to_release_list_dupl_r15) { + j.write_int(e1); } j.end_array(); } @@ -44803,8 +44839,8 @@ void redirected_carrier_info_r15_ies_c::to_json(json_writer& j) const break; case types::utra_tdd_r15: j.start_array("utra-TDD-r15"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; @@ -48543,8 +48579,8 @@ void srs_aperiodic_set_r14_s::to_json(json_writer& j) const j.start_obj(); if (srs_cc_set_idx_list_r14_present) { j.start_array("srs-CC-SetIndexList-r14"); - for (uint32_t i1 = 0; i1 < srs_cc_set_idx_list_r14.size(); ++i1) { - srs_cc_set_idx_list_r14[i1].to_json(j); + for (const auto& e1 : srs_cc_set_idx_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -48581,8 +48617,8 @@ void srs_aperiodic_set_up_pts_ext_r14_s::to_json(json_writer& j) const j.start_obj(); if (srs_cc_set_idx_list_r14_present) { j.start_array("srs-CC-SetIndexList-r14"); - for (uint32_t i1 = 0; i1 < srs_cc_set_idx_list_r14.size(); ++i1) { - srs_cc_set_idx_list_r14[i1].to_json(j); + for (const auto& e1 : srs_cc_set_idx_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -49766,29 +49802,29 @@ void phys_cfg_ded_scell_r10_s::to_json(json_writer& j) const if (ext) { if (csi_rs_cfg_nzp_to_release_list_r11.is_present()) { j.start_array("csi-RS-ConfigNZPToReleaseList-r11"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_release_list_r11->size(); ++i1) { - j.write_int(((*csi_rs_cfg_nzp_to_release_list_r11)[i1])); + for (const auto& e1 : *csi_rs_cfg_nzp_to_release_list_r11) { + j.write_int(e1); } j.end_array(); } if (csi_rs_cfg_nzp_to_add_mod_list_r11.is_present()) { j.start_array("csi-RS-ConfigNZPToAddModList-r11"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_add_mod_list_r11->size(); ++i1) { - ((*csi_rs_cfg_nzp_to_add_mod_list_r11)[i1]).to_json(j); + for (const auto& e1 : *csi_rs_cfg_nzp_to_add_mod_list_r11) { + e1.to_json(j); } j.end_array(); } if (csi_rs_cfg_zp_to_release_list_r11.is_present()) { j.start_array("csi-RS-ConfigZPToReleaseList-r11"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_zp_to_release_list_r11->size(); ++i1) { - j.write_int(((*csi_rs_cfg_zp_to_release_list_r11)[i1])); + for (const auto& e1 : *csi_rs_cfg_zp_to_release_list_r11) { + j.write_int(e1); } j.end_array(); } if (csi_rs_cfg_zp_to_add_mod_list_r11.is_present()) { j.start_array("csi-RS-ConfigZPToAddModList-r11"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_zp_to_add_mod_list_r11->size(); ++i1) { - ((*csi_rs_cfg_zp_to_add_mod_list_r11)[i1]).to_json(j); + for (const auto& e1 : *csi_rs_cfg_zp_to_add_mod_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -49885,15 +49921,15 @@ void phys_cfg_ded_scell_r10_s::to_json(json_writer& j) const } if (csi_rs_cfg_nzp_to_add_mod_list_ext_r13.is_present()) { j.start_array("csi-RS-ConfigNZPToAddModListExt-r13"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_add_mod_list_ext_r13->size(); ++i1) { - ((*csi_rs_cfg_nzp_to_add_mod_list_ext_r13)[i1]).to_json(j); + for (const auto& e1 : *csi_rs_cfg_nzp_to_add_mod_list_ext_r13) { + e1.to_json(j); } j.end_array(); } if (csi_rs_cfg_nzp_to_release_list_ext_r13.is_present()) { j.start_array("csi-RS-ConfigNZPToReleaseListExt-r13"); - for (uint32_t i1 = 0; i1 < csi_rs_cfg_nzp_to_release_list_ext_r13->size(); ++i1) { - j.write_int(((*csi_rs_cfg_nzp_to_release_list_ext_r13)[i1])); + for (const auto& e1 : *csi_rs_cfg_nzp_to_release_list_ext_r13) { + j.write_int(e1); } j.end_array(); } @@ -49915,29 +49951,29 @@ void phys_cfg_ded_scell_r10_s::to_json(json_writer& j) const } if (srs_ul_periodic_cfg_ded_list_r14.is_present()) { j.start_array("soundingRS-UL-PeriodicConfigDedicatedList-r14"); - for (uint32_t i1 = 0; i1 < srs_ul_periodic_cfg_ded_list_r14->size(); ++i1) { - ((*srs_ul_periodic_cfg_ded_list_r14)[i1]).to_json(j); + for (const auto& e1 : *srs_ul_periodic_cfg_ded_list_r14) { + e1.to_json(j); } j.end_array(); } if (srs_ul_periodic_cfg_ded_up_pts_ext_list_r14.is_present()) { j.start_array("soundingRS-UL-PeriodicConfigDedicatedUpPTsExtList-r14"); - for (uint32_t i1 = 0; i1 < srs_ul_periodic_cfg_ded_up_pts_ext_list_r14->size(); ++i1) { - ((*srs_ul_periodic_cfg_ded_up_pts_ext_list_r14)[i1]).to_json(j); + for (const auto& e1 : *srs_ul_periodic_cfg_ded_up_pts_ext_list_r14) { + e1.to_json(j); } j.end_array(); } if (srs_ul_aperiodic_cfg_ded_list_r14.is_present()) { j.start_array("soundingRS-UL-AperiodicConfigDedicatedList-r14"); - for (uint32_t i1 = 0; i1 < srs_ul_aperiodic_cfg_ded_list_r14->size(); ++i1) { - ((*srs_ul_aperiodic_cfg_ded_list_r14)[i1]).to_json(j); + for (const auto& e1 : *srs_ul_aperiodic_cfg_ded_list_r14) { + e1.to_json(j); } j.end_array(); } if (srs_ul_cfg_ded_ap_up_pts_ext_list_r14.is_present()) { j.start_array("soundingRS-UL-ConfigDedicatedApUpPTsExtList-r14"); - for (uint32_t i1 = 0; i1 < srs_ul_cfg_ded_ap_up_pts_ext_list_r14->size(); ++i1) { - ((*srs_ul_cfg_ded_ap_up_pts_ext_list_r14)[i1]).to_json(j); + for (const auto& e1 : *srs_ul_cfg_ded_ap_up_pts_ext_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -51212,8 +51248,8 @@ void rr_cfg_common_scell_r10_s::to_json(json_writer& j) const non_ul_cfg_r10.ant_info_common_r10.to_json(j); if (non_ul_cfg_r10.mbsfn_sf_cfg_list_r10_present) { j.start_array("mbsfn-SubframeConfigList-r10"); - for (uint32_t i1 = 0; i1 < non_ul_cfg_r10.mbsfn_sf_cfg_list_r10.size(); ++i1) { - non_ul_cfg_r10.mbsfn_sf_cfg_list_r10[i1].to_json(j); + for (const auto& e1 : non_ul_cfg_r10.mbsfn_sf_cfg_list_r10) { + e1.to_json(j); } j.end_array(); } @@ -51332,8 +51368,8 @@ void rr_cfg_common_scell_r10_s::to_json(json_writer& j) const } if (mbsfn_sf_cfg_list_v1430.is_present()) { j.start_array("mbsfn-SubframeConfigList-v1430"); - for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list_v1430->size(); ++i1) { - ((*mbsfn_sf_cfg_list_v1430)[i1]).to_json(j); + for (const auto& e1 : *mbsfn_sf_cfg_list_v1430) { + e1.to_json(j); } j.end_array(); } @@ -51776,15 +51812,15 @@ void scell_group_to_add_mod_r15_s::to_json(json_writer& j) const } if (scell_to_release_list_r15_present) { j.start_array("sCellToReleaseList-r15"); - for (uint32_t i1 = 0; i1 < scell_to_release_list_r15.size(); ++i1) { - j.write_int(scell_to_release_list_r15[i1]); + for (const auto& e1 : scell_to_release_list_r15) { + j.write_int(e1); } j.end_array(); } if (scell_to_add_mod_list_r15_present) { j.start_array("sCellToAddModList-r15"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_r15.size(); ++i1) { - scell_to_add_mod_list_r15[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -52280,8 +52316,8 @@ void ran_area_cfg_r15_s::to_json(json_writer& j) const j.write_str("trackingAreaCode-5GC-r15", tac_minus5_gc_r15.to_string()); if (ran_area_code_list_r15_present) { j.start_array("ran-AreaCodeList-r15"); - for (uint32_t i1 = 0; i1 < ran_area_code_list_r15.size(); ++i1) { - j.write_int(ran_area_code_list_r15[i1]); + for (const auto& e1 : ran_area_code_list_r15) { + j.write_int(e1); } j.end_array(); } @@ -52387,8 +52423,8 @@ void sl_disc_tx_cfg_sched_r13_s::to_json(json_writer& j) const } if (disc_tf_idx_list_r13_present) { j.start_array("discTF-IndexList-r13"); - for (uint32_t i1 = 0; i1 < disc_tf_idx_list_r13.size(); ++i1) { - disc_tf_idx_list_r13[i1].to_json(j); + for (const auto& e1 : disc_tf_idx_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -52433,15 +52469,15 @@ void sl_disc_tx_pool_ded_r13_s::to_json(json_writer& j) const j.start_obj(); if (pool_to_release_list_r13_present) { j.start_array("poolToReleaseList-r13"); - for (uint32_t i1 = 0; i1 < pool_to_release_list_r13.size(); ++i1) { - j.write_int(pool_to_release_list_r13[i1]); + for (const auto& e1 : pool_to_release_list_r13) { + j.write_int(e1); } j.end_array(); } if (pool_to_add_mod_list_r13_present) { j.start_array("poolToAddModList-r13"); - for (uint32_t i1 = 0; i1 < pool_to_add_mod_list_r13.size(); ++i1) { - pool_to_add_mod_list_r13[i1].to_json(j); + for (const auto& e1 : pool_to_add_mod_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -52856,8 +52892,8 @@ void plmn_ran_area_cell_r15_s::to_json(json_writer& j) const plmn_id_r15.to_json(j); } j.start_array("ran-AreaCells-r15"); - for (uint32_t i1 = 0; i1 < ran_area_cells_r15.size(); ++i1) { - j.write_str(ran_area_cells_r15[i1].to_string()); + for (const auto& e1 : ran_area_cells_r15) { + j.write_str(e1.to_string()); } j.end_array(); j.end_obj(); @@ -52894,8 +52930,8 @@ void plmn_ran_area_cfg_r15_s::to_json(json_writer& j) const plmn_id_r15.to_json(j); } j.start_array("ran-Area-r15"); - for (uint32_t i1 = 0; i1 < ran_area_r15.size(); ++i1) { - ran_area_r15[i1].to_json(j); + for (const auto& e1 : ran_area_r15) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -53229,22 +53265,22 @@ void rrc_conn_recfg_v1530_ies_s::to_json(json_writer& j) const } if (scell_group_to_release_list_r15_present) { j.start_array("sCellGroupToReleaseList-r15"); - for (uint32_t i1 = 0; i1 < scell_group_to_release_list_r15.size(); ++i1) { - j.write_int(scell_group_to_release_list_r15[i1]); + for (const auto& e1 : scell_group_to_release_list_r15) { + j.write_int(e1); } j.end_array(); } if (scell_group_to_add_mod_list_r15_present) { j.start_array("sCellGroupToAddModList-r15"); - for (uint32_t i1 = 0; i1 < scell_group_to_add_mod_list_r15.size(); ++i1) { - scell_group_to_add_mod_list_r15[i1].to_json(j); + for (const auto& e1 : scell_group_to_add_mod_list_r15) { + e1.to_json(j); } j.end_array(); } if (ded_info_nas_list_r15_present) { j.start_array("dedicatedInfoNASList-r15"); - for (uint32_t i1 = 0; i1 < ded_info_nas_list_r15.size(); ++i1) { - j.write_str(ded_info_nas_list_r15[i1].to_string()); + for (const auto& e1 : ded_info_nas_list_r15) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -54267,15 +54303,15 @@ void wlan_mob_cfg_r13_s::to_json(json_writer& j) const j.start_obj(); if (wlan_to_release_list_r13_present) { j.start_array("wlan-ToReleaseList-r13"); - for (uint32_t i1 = 0; i1 < wlan_to_release_list_r13.size(); ++i1) { - wlan_to_release_list_r13[i1].to_json(j); + for (const auto& e1 : wlan_to_release_list_r13) { + e1.to_json(j); } j.end_array(); } if (wlan_to_add_list_r13_present) { j.start_array("wlan-ToAddList-r13"); - for (uint32_t i1 = 0; i1 < wlan_to_add_list_r13.size(); ++i1) { - wlan_to_add_list_r13[i1].to_json(j); + for (const auto& e1 : wlan_to_add_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -54754,8 +54790,8 @@ void rclwi_cfg_r13_s::cmd_c_::to_json(json_writer& j) const j.write_fieldname("steerToWLAN-r13"); j.start_obj(); j.start_array("mobilityConfig-r13"); - for (uint32_t i1 = 0; i1 < c.mob_cfg_r13.size(); ++i1) { - c.mob_cfg_r13[i1].to_json(j); + for (const auto& e1 : c.mob_cfg_r13) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -55094,8 +55130,8 @@ void rr_cfg_ded_scg_r12_s::to_json(json_writer& j) const j.start_obj(); if (drb_to_add_mod_list_scg_r12_present) { j.start_array("drb-ToAddModListSCG-r12"); - for (uint32_t i1 = 0; i1 < drb_to_add_mod_list_scg_r12.size(); ++i1) { - drb_to_add_mod_list_scg_r12[i1].to_json(j); + for (const auto& e1 : drb_to_add_mod_list_scg_r12) { + e1.to_json(j); } j.end_array(); } @@ -55110,8 +55146,8 @@ void rr_cfg_ded_scg_r12_s::to_json(json_writer& j) const if (ext) { if (drb_to_add_mod_list_scg_r15.is_present()) { j.start_array("drb-ToAddModListSCG-r15"); - for (uint32_t i1 = 0; i1 < drb_to_add_mod_list_scg_r15->size(); ++i1) { - ((*drb_to_add_mod_list_scg_r15)[i1]).to_json(j); + for (const auto& e1 : *drb_to_add_mod_list_scg_r15) { + e1.to_json(j); } j.end_array(); } @@ -55398,8 +55434,8 @@ void sl_v2x_cfg_ded_r14_s::to_json(json_writer& j) const } if (v2x_inter_freq_info_list_r14_present) { j.start_array("v2x-InterFreqInfoList-r14"); - for (uint32_t i1 = 0; i1 < v2x_inter_freq_info_list_r14.size(); ++i1) { - v2x_inter_freq_info_list_r14[i1].to_json(j); + for (const auto& e1 : v2x_inter_freq_info_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -55424,8 +55460,8 @@ void sl_v2x_cfg_ded_r14_s::to_json(json_writer& j) const } if (sync_freq_list_r15.is_present()) { j.start_array("syncFreqList-r15"); - for (uint32_t i1 = 0; i1 < sync_freq_list_r15->size(); ++i1) { - j.write_int(((*sync_freq_list_r15)[i1])); + for (const auto& e1 : *sync_freq_list_r15) { + j.write_int(e1); } j.end_array(); } @@ -55575,10 +55611,10 @@ void sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::to_json(json_writer& j) j.write_int("mcs-r14", c.get().mcs_r14); } j.start_array("logicalChGroupInfoList-r14"); - for (uint32_t i1 = 0; i1 < c.get().lc_ch_group_info_list_r14.size(); ++i1) { + for (const auto& e1 : c.get().lc_ch_group_info_list_r14) { j.start_array(); - for (uint32_t i2 = 0; i2 < c.get().lc_ch_group_info_list_r14[i1].size(); ++i2) { - j.write_int(c.get().lc_ch_group_info_list_r14[i1][i2]); + for (const auto& e2 : e1) { + j.write_int(e2); } j.end_array(); } @@ -55592,19 +55628,15 @@ void sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::to_json(json_writer& j) j.start_obj(); if (c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14_present) { j.start_array("poolToReleaseList-r14"); - for (uint32_t i1 = 0; - i1 < c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14.size(); - ++i1) { - j.write_int(c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14[i1]); + for (const auto& e1 : c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_release_list_r14) { + j.write_int(e1); } j.end_array(); } if (c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14_present) { j.start_array("poolToAddModList-r14"); - for (uint32_t i1 = 0; - i1 < c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14.size(); - ++i1) { - c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14[i1].to_json(j); + for (const auto& e1 : c.get().v2x_comm_tx_pool_normal_ded_r14.pool_to_add_mod_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -55852,10 +55884,10 @@ void sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::to_json(json_writer& j.start_obj(); if (c.get().lc_ch_group_info_list_v1530_present) { j.start_array("logicalChGroupInfoList-v1530"); - for (uint32_t i1 = 0; i1 < c.get().lc_ch_group_info_list_v1530.size(); ++i1) { + for (const auto& e1 : c.get().lc_ch_group_info_list_v1530) { j.start_array(); - for (uint32_t i2 = 0; i2 < c.get().lc_ch_group_info_list_v1530[i1].size(); ++i2) { - j.write_int(c.get().lc_ch_group_info_list_v1530[i1][i2]); + for (const auto& e2 : e1) { + j.write_int(e2); } j.end_array(); } @@ -55871,8 +55903,8 @@ void sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::to_json(json_writer& j.start_obj(); if (c.get().v2x_freq_sel_cfg_list_r15_present) { j.start_array("v2x-FreqSelectionConfigList-r15"); - for (uint32_t i1 = 0; i1 < c.get().v2x_freq_sel_cfg_list_r15.size(); ++i1) { - c.get().v2x_freq_sel_cfg_list_r15[i1].to_json(j); + for (const auto& e1 : c.get().v2x_freq_sel_cfg_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -56264,15 +56296,15 @@ void ran_notif_area_info_r15_c::to_json(json_writer& j) const switch (type_) { case types::cell_list_r15: j.start_array("cellList-r15"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::ran_area_cfg_list_r15: j.start_array("ran-AreaConfigList-r15"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -56428,8 +56460,8 @@ void rrc_conn_recfg_v1430_ies_s::to_json(json_writer& j) const } if (scell_to_add_mod_list_ext_v1430_present) { j.start_array("sCellToAddModListExt-v1430"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_ext_v1430.size(); ++i1) { - scell_to_add_mod_list_ext_v1430[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_ext_v1430) { + e1.to_json(j); } j.end_array(); } @@ -56649,8 +56681,8 @@ void scg_cfg_part_scg_r12_s::to_json(json_writer& j) const } if (scell_to_release_list_scg_r12_present) { j.start_array("sCellToReleaseListSCG-r12"); - for (uint32_t i1 = 0; i1 < scell_to_release_list_scg_r12.size(); ++i1) { - j.write_int(scell_to_release_list_scg_r12[i1]); + for (const auto& e1 : scell_to_release_list_scg_r12) { + j.write_int(e1); } j.end_array(); } @@ -56660,8 +56692,8 @@ void scg_cfg_part_scg_r12_s::to_json(json_writer& j) const } if (scell_to_add_mod_list_scg_r12_present) { j.start_array("sCellToAddModListSCG-r12"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_scg_r12.size(); ++i1) { - scell_to_add_mod_list_scg_r12[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_scg_r12) { + e1.to_json(j); } j.end_array(); } @@ -56672,22 +56704,22 @@ void scg_cfg_part_scg_r12_s::to_json(json_writer& j) const if (ext) { if (scell_to_release_list_scg_ext_r13.is_present()) { j.start_array("sCellToReleaseListSCG-Ext-r13"); - for (uint32_t i1 = 0; i1 < scell_to_release_list_scg_ext_r13->size(); ++i1) { - j.write_int(((*scell_to_release_list_scg_ext_r13)[i1])); + for (const auto& e1 : *scell_to_release_list_scg_ext_r13) { + j.write_int(e1); } j.end_array(); } if (scell_to_add_mod_list_scg_ext_r13.is_present()) { j.start_array("sCellToAddModListSCG-Ext-r13"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_scg_ext_r13->size(); ++i1) { - ((*scell_to_add_mod_list_scg_ext_r13)[i1]).to_json(j); + for (const auto& e1 : *scell_to_add_mod_list_scg_ext_r13) { + e1.to_json(j); } j.end_array(); } if (scell_to_add_mod_list_scg_ext_v1370.is_present()) { j.start_array("sCellToAddModListSCG-Ext-v1370"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_scg_ext_v1370->size(); ++i1) { - ((*scell_to_add_mod_list_scg_ext_v1370)[i1]).to_json(j); + for (const auto& e1 : *scell_to_add_mod_list_scg_ext_v1370) { + e1.to_json(j); } j.end_array(); } @@ -56697,15 +56729,15 @@ void scg_cfg_part_scg_r12_s::to_json(json_writer& j) const } if (scell_group_to_release_list_scg_r15.is_present()) { j.start_array("sCellGroupToReleaseListSCG-r15"); - for (uint32_t i1 = 0; i1 < scell_group_to_release_list_scg_r15->size(); ++i1) { - j.write_int(((*scell_group_to_release_list_scg_r15)[i1])); + for (const auto& e1 : *scell_group_to_release_list_scg_r15) { + j.write_int(e1); } j.end_array(); } if (scell_group_to_add_mod_list_scg_r15.is_present()) { j.start_array("sCellGroupToAddModListSCG-r15"); - for (uint32_t i1 = 0; i1 < scell_group_to_add_mod_list_scg_r15->size(); ++i1) { - ((*scell_group_to_add_mod_list_scg_r15)[i1]).to_json(j); + for (const auto& e1 : *scell_group_to_add_mod_list_scg_r15) { + e1.to_json(j); } j.end_array(); } @@ -56751,8 +56783,8 @@ void scg_cfg_part_scg_v12f0_s::to_json(json_writer& j) const } if (scell_to_add_mod_list_scg_v12f0_present) { j.start_array("sCellToAddModListSCG-v12f0"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_scg_v12f0.size(); ++i1) { - scell_to_add_mod_list_scg_v12f0[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_scg_v12f0) { + e1.to_json(j); } j.end_array(); } @@ -56795,15 +56827,15 @@ void sl_disc_tx_info_inter_freq_list_add_r13_s::to_json(json_writer& j) const j.start_obj(); if (disc_tx_freq_to_add_mod_list_r13_present) { j.start_array("discTxFreqToAddModList-r13"); - for (uint32_t i1 = 0; i1 < disc_tx_freq_to_add_mod_list_r13.size(); ++i1) { - disc_tx_freq_to_add_mod_list_r13[i1].to_json(j); + for (const auto& e1 : disc_tx_freq_to_add_mod_list_r13) { + e1.to_json(j); } j.end_array(); } if (disc_tx_freq_to_release_list_r13_present) { j.start_array("discTxFreqToReleaseList-r13"); - for (uint32_t i1 = 0; i1 < disc_tx_freq_to_release_list_r13.size(); ++i1) { - j.write_int(disc_tx_freq_to_release_list_r13[i1]); + for (const auto& e1 : disc_tx_freq_to_release_list_r13) { + j.write_int(e1); } j.end_array(); } @@ -56827,8 +56859,8 @@ void sl_gap_cfg_r13_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("gapPatternList-r13"); - for (uint32_t i1 = 0; i1 < gap_pattern_list_r13.size(); ++i1) { - gap_pattern_list_r13[i1].to_json(j); + for (const auto& e1 : gap_pattern_list_r13) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -57057,8 +57089,8 @@ void meas_idle_cfg_ded_r15_s::to_json(json_writer& j) const j.start_obj(); if (meas_idle_carrier_list_eutra_r15_present) { j.start_array("measIdleCarrierListEUTRA-r15"); - for (uint32_t i1 = 0; i1 < meas_idle_carrier_list_eutra_r15.size(); ++i1) { - meas_idle_carrier_list_eutra_r15[i1].to_json(j); + for (const auto& e1 : meas_idle_carrier_list_eutra_r15) { + e1.to_json(j); } j.end_array(); } @@ -57209,15 +57241,15 @@ void rrc_conn_recfg_v1310_ies_s::to_json(json_writer& j) const j.start_obj(); if (scell_to_release_list_ext_r13_present) { j.start_array("sCellToReleaseListExt-r13"); - for (uint32_t i1 = 0; i1 < scell_to_release_list_ext_r13.size(); ++i1) { - j.write_int(scell_to_release_list_ext_r13[i1]); + for (const auto& e1 : scell_to_release_list_ext_r13) { + j.write_int(e1); } j.end_array(); } if (scell_to_add_mod_list_ext_r13_present) { j.start_array("sCellToAddModListExt-r13"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_ext_r13.size(); ++i1) { - scell_to_add_mod_list_ext_r13[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_ext_r13) { + e1.to_json(j); } j.end_array(); } @@ -57280,8 +57312,8 @@ void rrc_conn_recfg_v1370_ies_s::to_json(json_writer& j) const } if (scell_to_add_mod_list_ext_v1370_present) { j.start_array("sCellToAddModListExt-v1370"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_ext_v1370.size(); ++i1) { - scell_to_add_mod_list_ext_v1370[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_ext_v1370) { + e1.to_json(j); } j.end_array(); } @@ -57681,17 +57713,15 @@ void sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::to_json(json_writer& j) co j.start_obj(); if (c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12_present) { j.start_array("poolToReleaseList-r12"); - for (uint32_t i1 = 0; i1 < c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12.size(); - ++i1) { - j.write_int(c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12[i1]); + for (const auto& e1 : c.get().comm_tx_pool_normal_ded_r12.pool_to_release_list_r12) { + j.write_int(e1); } j.end_array(); } if (c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12_present) { j.start_array("poolToAddModList-r12"); - for (uint32_t i1 = 0; i1 < c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12.size(); - ++i1) { - c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12[i1].to_json(j); + for (const auto& e1 : c.get().comm_tx_pool_normal_ded_r12.pool_to_add_mod_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -57903,10 +57933,10 @@ void sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::to_json(json_writer& j) j.write_fieldname("scheduled-v1310"); j.start_obj(); j.start_array("logicalChGroupInfoList-r13"); - for (uint32_t i1 = 0; i1 < c.get().lc_ch_group_info_list_r13.size(); ++i1) { + for (const auto& e1 : c.get().lc_ch_group_info_list_r13) { j.start_array(); - for (uint32_t i2 = 0; i2 < c.get().lc_ch_group_info_list_r13[i1].size(); ++i2) { - j.write_int(c.get().lc_ch_group_info_list_r13[i1][i2]); + for (const auto& e2 : e1) { + j.write_int(e2); } j.end_array(); } @@ -57921,19 +57951,15 @@ void sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::to_json(json_writer& j) j.start_obj(); if (c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13_present) { j.start_array("poolToReleaseListExt-r13"); - for (uint32_t i1 = 0; - i1 < c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13.size(); - ++i1) { - j.write_int(c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13[i1]); + for (const auto& e1 : c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_release_list_ext_r13) { + j.write_int(e1); } j.end_array(); } if (c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13_present) { j.start_array("poolToAddModListExt-r13"); - for (uint32_t i1 = 0; - i1 < c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13.size(); - ++i1) { - c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13[i1].to_json(j); + for (const auto& e1 : c.get().comm_tx_pool_normal_ded_ext_r13.pool_to_add_mod_list_ext_r13) { + e1.to_json(j); } j.end_array(); } @@ -58316,8 +58342,8 @@ void sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::to_json(json_writer& j) co } if (c.get().disc_tf_idx_list_r12_present) { j.start_array("discTF-IndexList-r12"); - for (uint32_t i1 = 0; i1 < c.get().disc_tf_idx_list_r12.size(); ++i1) { - c.get().disc_tf_idx_list_r12[i1].to_json(j); + for (const auto& e1 : c.get().disc_tf_idx_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -58335,17 +58361,15 @@ void sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::to_json(json_writer& j) co j.start_obj(); if (c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12_present) { j.start_array("poolToReleaseList-r12"); - for (uint32_t i1 = 0; i1 < c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12.size(); - ++i1) { - j.write_int(c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12[i1]); + for (const auto& e1 : c.get().disc_tx_pool_ded_r12.pool_to_release_list_r12) { + j.write_int(e1); } j.end_array(); } if (c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12_present) { j.start_array("poolToAddModList-r12"); - for (uint32_t i1 = 0; i1 < c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12.size(); - ++i1) { - c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12[i1].to_json(j); + for (const auto& e1 : c.get().disc_tx_pool_ded_r12.pool_to_add_mod_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -58459,8 +58483,8 @@ void sl_disc_cfg_r12_s::disc_tf_idx_list_v1260_c_::to_json(json_writer& j) const j.write_fieldname("setup"); j.start_obj(); j.start_array("discTF-IndexList-r12b"); - for (uint32_t i1 = 0; i1 < c.disc_tf_idx_list_r12b.size(); ++i1) { - c.disc_tf_idx_list_r12b[i1].to_json(j); + for (const auto& e1 : c.disc_tf_idx_list_r12b) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -58881,8 +58905,8 @@ void sl_disc_cfg_r12_s::disc_sys_info_to_report_cfg_r13_c_::to_json(json_writer& break; case types::setup: j.start_array("setup"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - j.write_int(c[i1]); + for (const auto& e1 : c) { + j.write_int(e1); } j.end_array(); break; @@ -59025,8 +59049,8 @@ void bt_name_list_cfg_r15_c::to_json(json_writer& j) const break; case types::setup: j.start_array("setup"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - j.write_str(c[i1].to_string()); + for (const auto& e1 : c) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -59094,8 +59118,8 @@ void csg_allowed_report_cells_r9_s::to_json(json_writer& j) const j.start_obj(); if (pci_range_utra_fdd_list_r9_present) { j.start_array("physCellIdRangeUTRA-FDDList-r9"); - for (uint32_t i1 = 0; i1 < pci_range_utra_fdd_list_r9.size(); ++i1) { - pci_range_utra_fdd_list_r9[i1].to_json(j); + for (const auto& e1 : pci_range_utra_fdd_list_r9) { + e1.to_json(j); } j.end_array(); } @@ -59145,15 +59169,15 @@ void meas_ds_cfg_r12_c::to_json(json_writer& j) const c.ds_occasion_dur_r12.to_json(j); if (c.meas_csi_rs_to_rem_list_r12_present) { j.start_array("measCSI-RS-ToRemoveList-r12"); - for (uint32_t i1 = 0; i1 < c.meas_csi_rs_to_rem_list_r12.size(); ++i1) { - j.write_int(c.meas_csi_rs_to_rem_list_r12[i1]); + for (const auto& e1 : c.meas_csi_rs_to_rem_list_r12) { + j.write_int(e1); } j.end_array(); } if (c.meas_csi_rs_to_add_mod_list_r12_present) { j.start_array("measCSI-RS-ToAddModList-r12"); - for (uint32_t i1 = 0; i1 < c.meas_csi_rs_to_add_mod_list_r12.size(); ++i1) { - c.meas_csi_rs_to_add_mod_list_r12[i1].to_json(j); + for (const auto& e1 : c.meas_csi_rs_to_add_mod_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -59955,8 +59979,8 @@ void meas_sf_pattern_cfg_neigh_r10_c::to_json(json_writer& j) const c.meas_sf_pattern_neigh_r10.to_json(j); if (c.meas_sf_cell_list_r10_present) { j.start_array("measSubframeCellList-r10"); - for (uint32_t i1 = 0; i1 < c.meas_sf_cell_list_r10.size(); ++i1) { - c.meas_sf_cell_list_r10[i1].to_json(j); + for (const auto& e1 : c.meas_sf_cell_list_r10) { + e1.to_json(j); } j.end_array(); } @@ -61152,8 +61176,8 @@ void wlan_carrier_info_r13_s::to_json(json_writer& j) const } if (ch_nums_r13_present) { j.start_array("channelNumbers-r13"); - for (uint32_t i1 = 0; i1 < ch_nums_r13.size(); ++i1) { - j.write_int(ch_nums_r13[i1]); + for (const auto& e1 : ch_nums_r13) { + j.write_int(e1); } j.end_array(); } @@ -61173,8 +61197,8 @@ void wlan_name_list_cfg_r15_c::to_json(json_writer& j) const break; case types::setup: j.start_array("setup"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - j.write_str(c[i1].to_string()); + for (const auto& e1 : c) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -61241,8 +61265,8 @@ void cell_info_geran_r9_s::to_json(json_writer& j) const j.write_fieldname("carrierFreq-r9"); carrier_freq_r9.to_json(j); j.start_array("systemInformation-r9"); - for (uint32_t i1 = 0; i1 < sys_info_r9.size(); ++i1) { - j.write_str(sys_info_r9[i1].to_string()); + for (const auto& e1 : sys_info_r9) { + j.write_str(e1.to_string()); } j.end_array(); j.end_obj(); @@ -61465,8 +61489,8 @@ void idc_cfg_r11_s::idc_ind_mrdc_r15_c_::to_json(json_writer& j) const break; case types::setup: j.start_array("setup"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - j.write_int(c[i1]); + for (const auto& e1 : c) { + j.write_int(e1); } j.end_array(); break; @@ -61544,15 +61568,15 @@ void logged_meas_cfg_v1530_ies_s::to_json(json_writer& j) const j.start_obj(); if (bt_name_list_r15_present) { j.start_array("bt-NameList-r15"); - for (uint32_t i1 = 0; i1 < bt_name_list_r15.size(); ++i1) { - j.write_str(bt_name_list_r15[i1].to_string()); + for (const auto& e1 : bt_name_list_r15) { + j.write_str(e1.to_string()); } j.end_array(); } if (wlan_name_list_r15_present) { j.start_array("wlan-NameList-r15"); - for (uint32_t i1 = 0; i1 < wlan_name_list_r15.size(); ++i1) { - j.write_str(wlan_name_list_r15[i1].to_string()); + for (const auto& e1 : wlan_name_list_r15) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -61661,15 +61685,15 @@ void meas_obj_cdma2000_s::to_json(json_writer& j) const } if (cells_to_rem_list_present) { j.start_array("cellsToRemoveList"); - for (uint32_t i1 = 0; i1 < cells_to_rem_list.size(); ++i1) { - j.write_int(cells_to_rem_list[i1]); + for (const auto& e1 : cells_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (cells_to_add_mod_list_present) { j.start_array("cellsToAddModList"); - for (uint32_t i1 = 0; i1 < cells_to_add_mod_list.size(); ++i1) { - cells_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : cells_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } @@ -61986,29 +62010,29 @@ void meas_obj_eutra_s::to_json(json_writer& j) const } if (cells_to_rem_list_present) { j.start_array("cellsToRemoveList"); - for (uint32_t i1 = 0; i1 < cells_to_rem_list.size(); ++i1) { - j.write_int(cells_to_rem_list[i1]); + for (const auto& e1 : cells_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (cells_to_add_mod_list_present) { j.start_array("cellsToAddModList"); - for (uint32_t i1 = 0; i1 < cells_to_add_mod_list.size(); ++i1) { - cells_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : cells_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (black_cells_to_rem_list_present) { j.start_array("blackCellsToRemoveList"); - for (uint32_t i1 = 0; i1 < black_cells_to_rem_list.size(); ++i1) { - j.write_int(black_cells_to_rem_list[i1]); + for (const auto& e1 : black_cells_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (black_cells_to_add_mod_list_present) { j.start_array("blackCellsToAddModList"); - for (uint32_t i1 = 0; i1 < black_cells_to_add_mod_list.size(); ++i1) { - black_cells_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : black_cells_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } @@ -62028,15 +62052,15 @@ void meas_obj_eutra_s::to_json(json_writer& j) const } if (alt_ttt_cells_to_rem_list_r12.is_present()) { j.start_array("altTTT-CellsToRemoveList-r12"); - for (uint32_t i1 = 0; i1 < alt_ttt_cells_to_rem_list_r12->size(); ++i1) { - j.write_int(((*alt_ttt_cells_to_rem_list_r12)[i1])); + for (const auto& e1 : *alt_ttt_cells_to_rem_list_r12) { + j.write_int(e1); } j.end_array(); } if (alt_ttt_cells_to_add_mod_list_r12.is_present()) { j.start_array("altTTT-CellsToAddModList-r12"); - for (uint32_t i1 = 0; i1 < alt_ttt_cells_to_add_mod_list_r12->size(); ++i1) { - ((*alt_ttt_cells_to_add_mod_list_r12)[i1]).to_json(j); + for (const auto& e1 : *alt_ttt_cells_to_add_mod_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -62053,15 +62077,15 @@ void meas_obj_eutra_s::to_json(json_writer& j) const } if (white_cells_to_rem_list_r13.is_present()) { j.start_array("whiteCellsToRemoveList-r13"); - for (uint32_t i1 = 0; i1 < white_cells_to_rem_list_r13->size(); ++i1) { - j.write_int(((*white_cells_to_rem_list_r13)[i1])); + for (const auto& e1 : *white_cells_to_rem_list_r13) { + j.write_int(e1); } j.end_array(); } if (white_cells_to_add_mod_list_r13.is_present()) { j.start_array("whiteCellsToAddModList-r13"); - for (uint32_t i1 = 0; i1 < white_cells_to_add_mod_list_r13->size(); ++i1) { - ((*white_cells_to_add_mod_list_r13)[i1]).to_json(j); + for (const auto& e1 : *white_cells_to_add_mod_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -62074,15 +62098,15 @@ void meas_obj_eutra_s::to_json(json_writer& j) const } if (tx_res_pool_to_rem_list_r14.is_present()) { j.start_array("tx-ResourcePoolToRemoveList-r14"); - for (uint32_t i1 = 0; i1 < tx_res_pool_to_rem_list_r14->size(); ++i1) { - j.write_int(((*tx_res_pool_to_rem_list_r14)[i1])); + for (const auto& e1 : *tx_res_pool_to_rem_list_r14) { + j.write_int(e1); } j.end_array(); } if (tx_res_pool_to_add_list_r14.is_present()) { j.start_array("tx-ResourcePoolToAddList-r14"); - for (uint32_t i1 = 0; i1 < tx_res_pool_to_add_list_r14->size(); ++i1) { - j.write_int(((*tx_res_pool_to_add_list_r14)[i1])); + for (const auto& e1 : *tx_res_pool_to_add_list_r14) { + j.write_int(e1); } j.end_array(); } @@ -62372,23 +62396,23 @@ void meas_obj_nr_r15_s::to_json(json_writer& j) const } if (black_cells_to_rem_list_r15_present) { j.start_array("blackCellsToRemoveList-r15"); - for (uint32_t i1 = 0; i1 < black_cells_to_rem_list_r15.size(); ++i1) { - j.write_int(black_cells_to_rem_list_r15[i1]); + for (const auto& e1 : black_cells_to_rem_list_r15) { + j.write_int(e1); } j.end_array(); } if (black_cells_to_add_mod_list_r15_present) { j.start_array("blackCellsToAddModList-r15"); - for (uint32_t i1 = 0; i1 < black_cells_to_add_mod_list_r15.size(); ++i1) { - black_cells_to_add_mod_list_r15[i1].to_json(j); + for (const auto& e1 : black_cells_to_add_mod_list_r15) { + e1.to_json(j); } j.end_array(); } j.write_int("quantityConfigSet-r15", quant_cfg_set_r15); if (cells_for_which_to_report_sftd_r15_present) { j.start_array("cellsForWhichToReportSFTD-r15"); - for (uint32_t i1 = 0; i1 < cells_for_which_to_report_sftd_r15.size(); ++i1) { - j.write_int(cells_for_which_to_report_sftd_r15[i1]); + for (const auto& e1 : cells_for_which_to_report_sftd_r15) { + j.write_int(e1); } j.end_array(); } @@ -62566,8 +62590,8 @@ void meas_obj_utra_s::to_json(json_writer& j) const } if (cells_to_rem_list_present) { j.start_array("cellsToRemoveList"); - for (uint32_t i1 = 0; i1 < cells_to_rem_list.size(); ++i1) { - j.write_int(cells_to_rem_list[i1]); + for (const auto& e1 : cells_to_rem_list) { + j.write_int(e1); } j.end_array(); } @@ -62666,15 +62690,15 @@ void meas_obj_utra_s::cells_to_add_mod_list_c_::to_json(json_writer& j) const switch (type_) { case types::cells_to_add_mod_list_utra_fdd: j.start_array("cellsToAddModListUTRA-FDD"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::cells_to_add_mod_list_utra_tdd: j.start_array("cellsToAddModListUTRA-TDD"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -62861,15 +62885,15 @@ void meas_obj_wlan_r13_s::to_json(json_writer& j) const } if (wlan_to_add_mod_list_r13_present) { j.start_array("wlan-ToAddModList-r13"); - for (uint32_t i1 = 0; i1 < wlan_to_add_mod_list_r13.size(); ++i1) { - wlan_to_add_mod_list_r13[i1].to_json(j); + for (const auto& e1 : wlan_to_add_mod_list_r13) { + e1.to_json(j); } j.end_array(); } if (wlan_to_rem_list_r13_present) { j.start_array("wlan-ToRemoveList-r13"); - for (uint32_t i1 = 0; i1 < wlan_to_rem_list_r13.size(); ++i1) { - wlan_to_rem_list_r13[i1].to_json(j); + for (const auto& e1 : wlan_to_rem_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -62950,15 +62974,15 @@ void meas_obj_wlan_r13_s::carrier_freq_r13_c_::to_json(json_writer& j) const switch (type_) { case types::band_ind_list_wlan_r13: j.start_array("bandIndicatorListWLAN-r13"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; case types::carrier_info_list_wlan_r13: j.start_array("carrierInfoListWLAN-r13"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -63168,8 +63192,8 @@ void rrc_conn_recfg_v10l0_ies_s::to_json(json_writer& j) const } if (scell_to_add_mod_list_v10l0_present) { j.start_array("sCellToAddModList-v10l0"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_v10l0.size(); ++i1) { - scell_to_add_mod_list_v10l0[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_v10l0) { + e1.to_json(j); } j.end_array(); } @@ -65388,8 +65412,8 @@ void tac_list_v1130_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("plmn-Identity-perTAC-List-r11"); - for (uint32_t i1 = 0; i1 < plmn_id_per_tac_list_r11.size(); ++i1) { - plmn_id_per_tac_list_r11[i1].to_json(j); + for (const auto& e1 : plmn_id_per_tac_list_r11) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -65431,10 +65455,10 @@ void ue_cap_enquiry_v1430_ies_s::to_json(json_writer& j) const j.start_obj(); if (request_diff_fallback_comb_list_r14_present) { j.start_array("requestDiffFallbackCombList-r14"); - for (uint32_t i1 = 0; i1 < request_diff_fallback_comb_list_r14.size(); ++i1) { + for (const auto& e1 : request_diff_fallback_comb_list_r14) { j.start_array(); - for (uint32_t i2 = 0; i2 < request_diff_fallback_comb_list_r14[i1].size(); ++i2) { - request_diff_fallback_comb_list_r14[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -65605,8 +65629,8 @@ void logged_meas_cfg_v1250_ies_s::to_json(json_writer& j) const j.start_obj(); if (target_mbsfn_area_list_r12_present) { j.start_array("targetMBSFN-AreaList-r12"); - for (uint32_t i1 = 0; i1 < target_mbsfn_area_list_r12.size(); ++i1) { - target_mbsfn_area_list_r12[i1].to_json(j); + for (const auto& e1 : target_mbsfn_area_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -66771,8 +66795,8 @@ void prach_cfg_v1310_s::to_json(json_writer& j) const j.start_obj(); if (rsrp_thress_prach_info_list_r13_present) { j.start_array("rsrp-ThresholdsPrachInfoList-r13"); - for (uint32_t i1 = 0; i1 < rsrp_thress_prach_info_list_r13.size(); ++i1) { - j.write_int(rsrp_thress_prach_info_list_r13[i1]); + for (const auto& e1 : rsrp_thress_prach_info_list_r13) { + j.write_int(e1); } j.end_array(); } @@ -66785,8 +66809,8 @@ void prach_cfg_v1310_s::to_json(json_writer& j) const } if (prach_params_list_ce_r13_present) { j.start_array("prach-ParametersListCE-r13"); - for (uint32_t i1 = 0; i1 < prach_params_list_ce_r13.size(); ++i1) { - prach_params_list_ce_r13[i1].to_json(j); + for (const auto& e1 : prach_params_list_ce_r13) { + e1.to_json(j); } j.end_array(); } @@ -67180,15 +67204,15 @@ void rrc_conn_recfg_v1020_ies_s::to_json(json_writer& j) const j.start_obj(); if (scell_to_release_list_r10_present) { j.start_array("sCellToReleaseList-r10"); - for (uint32_t i1 = 0; i1 < scell_to_release_list_r10.size(); ++i1) { - j.write_int(scell_to_release_list_r10[i1]); + for (const auto& e1 : scell_to_release_list_r10) { + j.write_int(e1); } j.end_array(); } if (scell_to_add_mod_list_r10_present) { j.start_array("sCellToAddModList-r10"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_r10.size(); ++i1) { - scell_to_add_mod_list_r10[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_r10) { + e1.to_json(j); } j.end_array(); } @@ -67745,8 +67769,8 @@ void counter_check_v1530_ies_s::to_json(json_writer& j) const j.start_obj(); if (drb_count_msb_info_list_ext_r15_present) { j.start_array("drb-CountMSB-InfoListExt-r15"); - for (uint32_t i1 = 0; i1 < drb_count_msb_info_list_ext_r15.size(); ++i1) { - drb_count_msb_info_list_ext_r15[i1].to_json(j); + for (const auto& e1 : drb_count_msb_info_list_ext_r15) { + e1.to_json(j); } j.end_array(); } @@ -67842,8 +67866,8 @@ void logged_meas_cfg_v1130_ies_s::to_json(json_writer& j) const j.start_obj(); if (plmn_id_list_r11_present) { j.start_array("plmn-IdentityList-r11"); - for (uint32_t i1 = 0; i1 < plmn_id_list_r11.size(); ++i1) { - plmn_id_list_r11[i1].to_json(j); + for (const auto& e1 : plmn_id_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -68311,15 +68335,15 @@ void meas_gap_cfg_per_cc_list_r14_c::to_json(json_writer& j) const j.start_obj(); if (c.meas_gap_cfg_to_rem_list_r14_present) { j.start_array("measGapConfigToRemoveList-r14"); - for (uint32_t i1 = 0; i1 < c.meas_gap_cfg_to_rem_list_r14.size(); ++i1) { - j.write_int(c.meas_gap_cfg_to_rem_list_r14[i1]); + for (const auto& e1 : c.meas_gap_cfg_to_rem_list_r14) { + j.write_int(e1); } j.end_array(); } if (c.meas_gap_cfg_to_add_mod_list_r14_present) { j.start_array("measGapConfigToAddModList-r14"); - for (uint32_t i1 = 0; i1 < c.meas_gap_cfg_to_add_mod_list_r14.size(); ++i1) { - c.meas_gap_cfg_to_add_mod_list_r14[i1].to_json(j); + for (const auto& e1 : c.meas_gap_cfg_to_add_mod_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -68486,15 +68510,15 @@ void mob_ctrl_info_v2x_r14_s::to_json(json_writer& j) const } if (v2x_comm_rx_pool_r14_present) { j.start_array("v2x-CommRxPool-r14"); - for (uint32_t i1 = 0; i1 < v2x_comm_rx_pool_r14.size(); ++i1) { - v2x_comm_rx_pool_r14[i1].to_json(j); + for (const auto& e1 : v2x_comm_rx_pool_r14) { + e1.to_json(j); } j.end_array(); } if (v2x_comm_sync_cfg_r14_present) { j.start_array("v2x-CommSyncConfig-r14"); - for (uint32_t i1 = 0; i1 < v2x_comm_sync_cfg_r14.size(); ++i1) { - v2x_comm_sync_cfg_r14[i1].to_json(j); + for (const auto& e1 : v2x_comm_sync_cfg_r14) { + e1.to_json(j); } j.end_array(); } @@ -68766,8 +68790,8 @@ void quant_cfg_s::to_json(json_writer& j) const } if (quant_cfg_nr_list_r15.is_present()) { j.start_array("quantityConfigNRList-r15"); - for (uint32_t i1 = 0; i1 < quant_cfg_nr_list_r15->size(); ++i1) { - ((*quant_cfg_nr_list_r15)[i1]).to_json(j); + for (const auto& e1 : *quant_cfg_nr_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -69007,29 +69031,29 @@ void rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::to_json(json_writer& j) switch (type_) { case types::geran_r9: j.start_array("geran-r9"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::utra_fdd_r9: j.start_array("utra-FDD-r9"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::utra_tdd_r9: j.start_array("utra-TDD-r9"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::utra_tdd_r10: j.start_array("utra-TDD-r10"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -69722,15 +69746,15 @@ void si_or_psi_geran_c::to_json(json_writer& j) const switch (type_) { case types::si: j.start_array("si"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; case types::psi: j.start_array("psi"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -69808,8 +69832,8 @@ void ue_cap_enquiry_v1180_ies_s::to_json(json_writer& j) const j.start_obj(); if (requested_freq_bands_r11_present) { j.start_array("requestedFrequencyBands-r11"); - for (uint32_t i1 = 0; i1 < requested_freq_bands_r11.size(); ++i1) { - j.write_int(requested_freq_bands_r11[i1]); + for (const auto& e1 : requested_freq_bands_r11) { + j.write_int(e1); } j.end_array(); } @@ -69930,15 +69954,15 @@ void area_cfg_r10_c::to_json(json_writer& j) const switch (type_) { case types::cell_global_id_list_r10: j.start_array("cellGlobalIdList-r10"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::tac_list_r10: j.start_array("trackingAreaCodeList-r10"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -70715,43 +70739,43 @@ void meas_cfg_s::to_json(json_writer& j) const j.start_obj(); if (meas_obj_to_rem_list_present) { j.start_array("measObjectToRemoveList"); - for (uint32_t i1 = 0; i1 < meas_obj_to_rem_list.size(); ++i1) { - j.write_int(meas_obj_to_rem_list[i1]); + for (const auto& e1 : meas_obj_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (meas_obj_to_add_mod_list_present) { j.start_array("measObjectToAddModList"); - for (uint32_t i1 = 0; i1 < meas_obj_to_add_mod_list.size(); ++i1) { - meas_obj_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : meas_obj_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (report_cfg_to_rem_list_present) { j.start_array("reportConfigToRemoveList"); - for (uint32_t i1 = 0; i1 < report_cfg_to_rem_list.size(); ++i1) { - j.write_int(report_cfg_to_rem_list[i1]); + for (const auto& e1 : report_cfg_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (report_cfg_to_add_mod_list_present) { j.start_array("reportConfigToAddModList"); - for (uint32_t i1 = 0; i1 < report_cfg_to_add_mod_list.size(); ++i1) { - report_cfg_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : report_cfg_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (meas_id_to_rem_list_present) { j.start_array("measIdToRemoveList"); - for (uint32_t i1 = 0; i1 < meas_id_to_rem_list.size(); ++i1) { - j.write_int(meas_id_to_rem_list[i1]); + for (const auto& e1 : meas_id_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (meas_id_to_add_mod_list_present) { j.start_array("measIdToAddModList"); - for (uint32_t i1 = 0; i1 < meas_id_to_add_mod_list.size(); ++i1) { - meas_id_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : meas_id_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } @@ -70777,8 +70801,8 @@ void meas_cfg_s::to_json(json_writer& j) const if (ext) { if (meas_obj_to_add_mod_list_v9e0.is_present()) { j.start_array("measObjectToAddModList-v9e0"); - for (uint32_t i1 = 0; i1 < meas_obj_to_add_mod_list_v9e0->size(); ++i1) { - ((*meas_obj_to_add_mod_list_v9e0)[i1]).to_json(j); + for (const auto& e1 : *meas_obj_to_add_mod_list_v9e0) { + e1.to_json(j); } j.end_array(); } @@ -70791,15 +70815,15 @@ void meas_cfg_s::to_json(json_writer& j) const } if (meas_id_to_rem_list_ext_r12.is_present()) { j.start_array("measIdToRemoveListExt-r12"); - for (uint32_t i1 = 0; i1 < meas_id_to_rem_list_ext_r12->size(); ++i1) { - j.write_int(((*meas_id_to_rem_list_ext_r12)[i1])); + for (const auto& e1 : *meas_id_to_rem_list_ext_r12) { + j.write_int(e1); } j.end_array(); } if (meas_id_to_add_mod_list_ext_r12.is_present()) { j.start_array("measIdToAddModListExt-r12"); - for (uint32_t i1 = 0; i1 < meas_id_to_add_mod_list_ext_r12->size(); ++i1) { - ((*meas_id_to_add_mod_list_ext_r12)[i1]).to_json(j); + for (const auto& e1 : *meas_id_to_add_mod_list_ext_r12) { + e1.to_json(j); } j.end_array(); } @@ -70808,29 +70832,29 @@ void meas_cfg_s::to_json(json_writer& j) const } if (meas_obj_to_rem_list_ext_r13.is_present()) { j.start_array("measObjectToRemoveListExt-r13"); - for (uint32_t i1 = 0; i1 < meas_obj_to_rem_list_ext_r13->size(); ++i1) { - j.write_int(((*meas_obj_to_rem_list_ext_r13)[i1])); + for (const auto& e1 : *meas_obj_to_rem_list_ext_r13) { + j.write_int(e1); } j.end_array(); } if (meas_obj_to_add_mod_list_ext_r13.is_present()) { j.start_array("measObjectToAddModListExt-r13"); - for (uint32_t i1 = 0; i1 < meas_obj_to_add_mod_list_ext_r13->size(); ++i1) { - ((*meas_obj_to_add_mod_list_ext_r13)[i1]).to_json(j); + for (const auto& e1 : *meas_obj_to_add_mod_list_ext_r13) { + e1.to_json(j); } j.end_array(); } if (meas_id_to_add_mod_list_v1310.is_present()) { j.start_array("measIdToAddModList-v1310"); - for (uint32_t i1 = 0; i1 < meas_id_to_add_mod_list_v1310->size(); ++i1) { - ((*meas_id_to_add_mod_list_v1310)[i1]).to_json(j); + for (const auto& e1 : *meas_id_to_add_mod_list_v1310) { + e1.to_json(j); } j.end_array(); } if (meas_id_to_add_mod_list_ext_v1310.is_present()) { j.start_array("measIdToAddModListExt-v1310"); - for (uint32_t i1 = 0; i1 < meas_id_to_add_mod_list_ext_v1310->size(); ++i1) { - ((*meas_id_to_add_mod_list_ext_v1310)[i1]).to_json(j); + for (const auto& e1 : *meas_id_to_add_mod_list_ext_v1310) { + e1.to_json(j); } j.end_array(); } @@ -72339,8 +72363,8 @@ void rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::to_json(json_ j.write_fieldname("channelSelectionMultiplexingBundling"); j.start_obj(); j.start_array("n1PUCCH-AN-List-r10"); - for (uint32_t i1 = 0; i1 < c.get().n1_pucch_an_list_r10.size(); ++i1) { - j.write_int(c.get().n1_pucch_an_list_r10[i1]); + for (const auto& e1 : c.get().n1_pucch_an_list_r10) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -72734,8 +72758,8 @@ void redirected_carrier_info_c::to_json(json_writer& j) const break; case types::utra_tdd_r10: j.start_array("utra-TDD-r10"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; @@ -73223,8 +73247,8 @@ void counter_check_r8_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("drb-CountMSB-InfoList"); - for (uint32_t i1 = 0; i1 < drb_count_msb_info_list.size(); ++i1) { - drb_count_msb_info_list[i1].to_json(j); + for (const auto& e1 : drb_count_msb_info_list) { + e1.to_json(j); } j.end_array(); if (non_crit_ext_present) { @@ -74194,8 +74218,8 @@ void rrc_conn_recfg_r8_ies_s::to_json(json_writer& j) const } if (ded_info_nas_list_present) { j.start_array("dedicatedInfoNASList"); - for (uint32_t i1 = 0; i1 < ded_info_nas_list.size(); ++i1) { - j.write_str(ded_info_nas_list[i1].to_string()); + for (const auto& e1 : ded_info_nas_list) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -74420,8 +74444,8 @@ void ue_cap_enquiry_r8_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("ue-CapabilityRequest"); - for (uint32_t i1 = 0; i1 < ue_cap_request.size(); ++i1) { - j.write_str(ue_cap_request[i1].to_string()); + for (const auto& e1 : ue_cap_request) { + j.write_str(e1.to_string()); } j.end_array(); if (non_crit_ext_present) { @@ -78046,8 +78070,8 @@ void pmch_info_ext_r12_s::to_json(json_writer& j) const j.write_fieldname("pmch-Config-r12"); pmch_cfg_r12.to_json(j); j.start_array("mbms-SessionInfoList-r12"); - for (uint32_t i1 = 0; i1 < mbms_session_info_list_r12.size(); ++i1) { - mbms_session_info_list_r12[i1].to_json(j); + for (const auto& e1 : mbms_session_info_list_r12) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -78074,8 +78098,8 @@ void mbsfn_area_cfg_v1430_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("commonSF-Alloc-r14"); - for (uint32_t i1 = 0; i1 < common_sf_alloc_r14.size(); ++i1) { - common_sf_alloc_r14[i1].to_json(j); + for (const auto& e1 : common_sf_alloc_r14) { + e1.to_json(j); } j.end_array(); if (non_crit_ext_present) { @@ -78171,8 +78195,8 @@ void mbsfn_area_cfg_v1250_ies_s::to_json(json_writer& j) const j.start_obj(); if (pmch_info_list_ext_r12_present) { j.start_array("pmch-InfoListExt-r12"); - for (uint32_t i1 = 0; i1 < pmch_info_list_ext_r12.size(); ++i1) { - pmch_info_list_ext_r12[i1].to_json(j); + for (const auto& e1 : pmch_info_list_ext_r12) { + e1.to_json(j); } j.end_array(); } @@ -78206,8 +78230,8 @@ void pmch_info_r9_s::to_json(json_writer& j) const j.write_fieldname("pmch-Config-r9"); pmch_cfg_r9.to_json(j); j.start_array("mbms-SessionInfoList-r9"); - for (uint32_t i1 = 0; i1 < mbms_session_info_list_r9.size(); ++i1) { - mbms_session_info_list_r9[i1].to_json(j); + for (const auto& e1 : mbms_session_info_list_r9) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -78284,8 +78308,8 @@ void mbms_count_request_r10_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("countingRequestList-r10"); - for (uint32_t i1 = 0; i1 < count_request_list_r10.size(); ++i1) { - count_request_list_r10[i1].to_json(j); + for (const auto& e1 : count_request_list_r10) { + e1.to_json(j); } j.end_array(); if (late_non_crit_ext_present) { @@ -78330,14 +78354,14 @@ void mbsfn_area_cfg_r9_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("commonSF-Alloc-r9"); - for (uint32_t i1 = 0; i1 < common_sf_alloc_r9.size(); ++i1) { - common_sf_alloc_r9[i1].to_json(j); + for (const auto& e1 : common_sf_alloc_r9) { + e1.to_json(j); } j.end_array(); j.write_str("commonSF-AllocPeriod-r9", common_sf_alloc_period_r9.to_string()); j.start_array("pmch-InfoList-r9"); - for (uint32_t i1 = 0; i1 < pmch_info_list_r9.size(); ++i1) { - pmch_info_list_r9[i1].to_json(j); + for (const auto& e1 : pmch_info_list_r9) { + e1.to_json(j); } j.end_array(); if (non_crit_ext_present) { @@ -78872,8 +78896,8 @@ void paging_ue_id_c::to_json(json_writer& j) const break; case types::imsi: j.start_array("imsi"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; @@ -79081,8 +79105,8 @@ void paging_s::to_json(json_writer& j) const j.start_obj(); if (paging_record_list_present) { j.start_array("pagingRecordList"); - for (uint32_t i1 = 0; i1 < paging_record_list.size(); ++i1) { - paging_record_list[i1].to_json(j); + for (const auto& e1 : paging_record_list) { + e1.to_json(j); } j.end_array(); } @@ -80340,14 +80364,14 @@ void scptm_cfg_br_r14_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("sc-mtch-InfoList-r14"); - for (uint32_t i1 = 0; i1 < sc_mtch_info_list_r14.size(); ++i1) { - sc_mtch_info_list_r14[i1].to_json(j); + for (const auto& e1 : sc_mtch_info_list_r14) { + e1.to_json(j); } j.end_array(); if (scptm_neighbour_cell_list_r14_present) { j.start_array("scptm-NeighbourCellList-r14"); - for (uint32_t i1 = 0; i1 < scptm_neighbour_cell_list_r14.size(); ++i1) { - scptm_neighbour_cell_list_r14[i1].to_json(j); + for (const auto& e1 : scptm_neighbour_cell_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -80408,14 +80432,14 @@ void scptm_cfg_r13_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("sc-mtch-InfoList-r13"); - for (uint32_t i1 = 0; i1 < sc_mtch_info_list_r13.size(); ++i1) { - sc_mtch_info_list_r13[i1].to_json(j); + for (const auto& e1 : sc_mtch_info_list_r13) { + e1.to_json(j); } j.end_array(); if (scptm_neighbour_cell_list_r13_present) { j.start_array("scptm-NeighbourCellList-r13"); - for (uint32_t i1 = 0; i1 < scptm_neighbour_cell_list_r13.size(); ++i1) { - scptm_neighbour_cell_list_r13[i1].to_json(j); + for (const auto& e1 : scptm_neighbour_cell_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -82765,8 +82789,8 @@ void meas_result_eutra_s::to_json(json_writer& j) const j.write_str("trackingAreaCode", cgi_info.tac.to_string()); if (cgi_info.plmn_id_list_present) { j.start_array("plmn-IdentityList"); - for (uint32_t i1 = 0; i1 < cgi_info.plmn_id_list.size(); ++i1) { - cgi_info.plmn_id_list[i1].to_json(j); + for (const auto& e1 : cgi_info.plmn_id_list) { + e1.to_json(j); } j.end_array(); } @@ -82969,8 +82993,8 @@ void meas_result_eutra_s::meas_result_s_::to_json(json_writer& j) const } if (cgi_info_v1310->multi_band_info_list_r13_present) { j.start_array("multiBandInfoList-r13"); - for (uint32_t i1 = 0; i1 < cgi_info_v1310->multi_band_info_list_r13.size(); ++i1) { - j.write_int(cgi_info_v1310->multi_band_info_list_r13[i1]); + for (const auto& e1 : cgi_info_v1310->multi_band_info_list_r13) { + j.write_int(e1); } j.end_array(); } @@ -82984,8 +83008,8 @@ void meas_result_eutra_s::meas_result_s_::to_json(json_writer& j) const } if (cgi_info_minus5_gc_r15.is_present()) { j.start_array("cgi-Info-5GC-r15"); - for (uint32_t i1 = 0; i1 < cgi_info_minus5_gc_r15->size(); ++i1) { - ((*cgi_info_minus5_gc_r15)[i1]).to_json(j); + for (const auto& e1 : *cgi_info_minus5_gc_r15) { + e1.to_json(j); } j.end_array(); } @@ -83094,8 +83118,8 @@ void meas_result_utra_s::to_json(json_writer& j) const } if (cgi_info.plmn_id_list_present) { j.start_array("plmn-IdentityList"); - for (uint32_t i1 = 0; i1 < cgi_info.plmn_id_list.size(); ++i1) { - cgi_info.plmn_id_list[i1].to_json(j); + for (const auto& e1 : cgi_info.plmn_id_list) { + e1.to_json(j); } j.end_array(); } @@ -84012,8 +84036,8 @@ void meas_results_cdma2000_s::to_json(json_writer& j) const j.start_obj(); j.write_bool("preRegistrationStatusHRPD", pre_regist_status_hrpd); j.start_array("measResultListCDMA2000"); - for (uint32_t i1 = 0; i1 < meas_result_list_cdma2000.size(); ++i1) { - meas_result_list_cdma2000[i1].to_json(j); + for (const auto& e1 : meas_result_list_cdma2000) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -84056,8 +84080,8 @@ void plmn_id_info_nr_r15_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("plmn-IdentityList-r15"); - for (uint32_t i1 = 0; i1 < plmn_id_list_r15.size(); ++i1) { - plmn_id_list_r15[i1].to_json(j); + for (const auto& e1 : plmn_id_list_r15) { + e1.to_json(j); } j.end_array(); if (tac_r15_present) { @@ -84143,8 +84167,8 @@ void rrc_conn_setup_complete_v1530_ies_s::to_json(json_writer& j) const } if (s_nssai_list_r15_present) { j.start_array("s-NSSAI-list-r15"); - for (uint32_t i1 = 0; i1 < s_nssai_list_r15.size(); ++i1) { - s_nssai_list_r15[i1].to_json(j); + for (const auto& e1 : s_nssai_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -84469,8 +84493,8 @@ void meas_result2_eutra_r9_s::to_json(json_writer& j) const j.start_obj(); j.write_int("carrierFreq-r9", carrier_freq_r9); j.start_array("measResultList-r9"); - for (uint32_t i1 = 0; i1 < meas_result_list_r9.size(); ++i1) { - meas_result_list_r9[i1].to_json(j); + for (const auto& e1 : meas_result_list_r9) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -84557,8 +84581,8 @@ void meas_result2_utra_r9_s::to_json(json_writer& j) const j.start_obj(); j.write_int("carrierFreq-r9", carrier_freq_r9); j.start_array("measResultList-r9"); - for (uint32_t i1 = 0; i1 < meas_result_list_r9.size(); ++i1) { - meas_result_list_r9[i1].to_json(j); + for (const auto& e1 : meas_result_list_r9) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -84610,8 +84634,8 @@ void meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_::to_json(json_writer { j.start_obj(); j.start_array("measResultIdleListEUTRA-r15"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -84689,8 +84713,8 @@ void meas_result_mbsfn_r12_s::to_json(json_writer& j) const } if (data_bler_mch_result_list_r12_present) { j.start_array("dataBLER-MCH-ResultList-r12"); - for (uint32_t i1 = 0; i1 < data_bler_mch_result_list_r12.size(); ++i1) { - data_bler_mch_result_list_r12[i1].to_json(j); + for (const auto& e1 : data_bler_mch_result_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -85140,15 +85164,14 @@ void affected_carrier_freq_comb_info_mrdc_r15_s::to_json(json_writer& j) const j.start_obj(); if (affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15_present) { j.start_array("affectedCarrierFreqCombEUTRA-r15"); - for (uint32_t i1 = 0; i1 < affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15.size(); - ++i1) { - j.write_int(affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15[i1]); + for (const auto& e1 : affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_eutra_r15) { + j.write_int(e1); } j.end_array(); } j.start_array("affectedCarrierFreqCombNR-r15"); - for (uint32_t i1 = 0; i1 < affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_nr_r15.size(); ++i1) { - j.write_int(affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_nr_r15[i1]); + for (const auto& e1 : affected_carrier_freq_comb_mrdc_r15.affected_carrier_freq_comb_nr_r15) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -85202,15 +85225,15 @@ void cgi_info_nr_r15_s::to_json(json_writer& j) const j.start_obj(); if (plmn_id_info_list_r15_present) { j.start_array("plmn-IdentityInfoList-r15"); - for (uint32_t i1 = 0; i1 < plmn_id_info_list_r15.size(); ++i1) { - plmn_id_info_list_r15[i1].to_json(j); + for (const auto& e1 : plmn_id_info_list_r15) { + e1.to_json(j); } j.end_array(); } if (freq_band_list_minus15_present) { j.start_array("frequencyBandList-15"); - for (uint32_t i1 = 0; i1 < freq_band_list_minus15.size(); ++i1) { - j.write_int(freq_band_list_minus15[i1]); + for (const auto& e1 : freq_band_list_minus15) { + j.write_int(e1); } j.end_array(); } @@ -85252,8 +85275,8 @@ void flight_path_info_report_r15_s::to_json(json_writer& j) const j.start_obj(); if (flight_path_r15_present) { j.start_array("flightPath-r15"); - for (uint32_t i1 = 0; i1 < flight_path_r15.size(); ++i1) { - flight_path_r15[i1].to_json(j); + for (const auto& e1 : flight_path_r15) { + e1.to_json(j); } j.end_array(); } @@ -85610,24 +85633,24 @@ void log_meas_info_r10_s::to_json(json_writer& j) const j.start_obj(); if (meas_result_neigh_cells_r10.meas_result_list_eutra_r10_present) { j.start_array("measResultListEUTRA-r10"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r10.meas_result_list_eutra_r10.size(); ++i1) { - meas_result_neigh_cells_r10.meas_result_list_eutra_r10[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r10.meas_result_list_eutra_r10) { + e1.to_json(j); } j.end_array(); } if (meas_result_neigh_cells_r10.meas_result_list_utra_r10_present) { j.start_array("measResultListUTRA-r10"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r10.meas_result_list_utra_r10.size(); ++i1) { - meas_result_neigh_cells_r10.meas_result_list_utra_r10[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r10.meas_result_list_utra_r10) { + e1.to_json(j); } j.end_array(); } if (meas_result_neigh_cells_r10.meas_result_list_geran_r10_present) { j.start_array("measResultListGERAN-r10"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r10.meas_result_list_geran_r10.size(); ++i1) { + for (const auto& e1 : meas_result_neigh_cells_r10.meas_result_list_geran_r10) { j.start_array(); - for (uint32_t i2 = 0; i2 < meas_result_neigh_cells_r10.meas_result_list_geran_r10[i1].size(); ++i2) { - meas_result_neigh_cells_r10.meas_result_list_geran_r10[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -85635,8 +85658,8 @@ void log_meas_info_r10_s::to_json(json_writer& j) const } if (meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10_present) { j.start_array("measResultListCDMA2000-r10"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10.size(); ++i1) { - meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r10.meas_result_list_cdma2000_r10) { + e1.to_json(j); } j.end_array(); } @@ -85645,15 +85668,15 @@ void log_meas_info_r10_s::to_json(json_writer& j) const if (ext) { if (meas_result_list_eutra_v1090.is_present()) { j.start_array("measResultListEUTRA-v1090"); - for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v1090->size(); ++i1) { - ((*meas_result_list_eutra_v1090)[i1]).to_json(j); + for (const auto& e1 : *meas_result_list_eutra_v1090) { + e1.to_json(j); } j.end_array(); } if (meas_result_list_mbsfn_r12.is_present()) { j.start_array("measResultListMBSFN-r12"); - for (uint32_t i1 = 0; i1 < meas_result_list_mbsfn_r12->size(); ++i1) { - ((*meas_result_list_mbsfn_r12)[i1]).to_json(j); + for (const auto& e1 : *meas_result_list_mbsfn_r12) { + e1.to_json(j); } j.end_array(); } @@ -85666,8 +85689,8 @@ void log_meas_info_r10_s::to_json(json_writer& j) const } if (meas_result_list_eutra_v1250.is_present()) { j.start_array("measResultListEUTRA-v1250"); - for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v1250->size(); ++i1) { - ((*meas_result_list_eutra_v1250)[i1]).to_json(j); + for (const auto& e1 : *meas_result_list_eutra_v1250) { + e1.to_json(j); } j.end_array(); } @@ -85679,15 +85702,15 @@ void log_meas_info_r10_s::to_json(json_writer& j) const } if (log_meas_result_list_bt_r15.is_present()) { j.start_array("logMeasResultListBT-r15"); - for (uint32_t i1 = 0; i1 < log_meas_result_list_bt_r15->size(); ++i1) { - ((*log_meas_result_list_bt_r15)[i1]).to_json(j); + for (const auto& e1 : *log_meas_result_list_bt_r15) { + e1.to_json(j); } j.end_array(); } if (log_meas_result_list_wlan_r15.is_present()) { j.start_array("logMeasResultListWLAN-r15"); - for (uint32_t i1 = 0; i1 < log_meas_result_list_wlan_r15->size(); ++i1) { - ((*log_meas_result_list_wlan_r15)[i1]).to_json(j); + for (const auto& e1 : *log_meas_result_list_wlan_r15) { + e1.to_json(j); } j.end_array(); } @@ -85714,8 +85737,8 @@ void mrdc_assist_info_r15_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("affectedCarrierFreqCombInfoListMRDC-r15"); - for (uint32_t i1 = 0; i1 < affected_carrier_freq_comb_info_list_mrdc_r15.size(); ++i1) { - affected_carrier_freq_comb_info_list_mrdc_r15[i1].to_json(j); + for (const auto& e1 : affected_carrier_freq_comb_info_list_mrdc_r15) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -85785,8 +85808,8 @@ void meas_result_cell_nr_r15_s::to_json(json_writer& j) const meas_result_cell_r15.to_json(j); if (meas_result_rs_idx_list_r15_present) { j.start_array("measResultRS-IndexList-r15"); - for (uint32_t i1 = 0; i1 < meas_result_rs_idx_list_r15.size(); ++i1) { - meas_result_rs_idx_list_r15[i1].to_json(j); + for (const auto& e1 : meas_result_rs_idx_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -85849,8 +85872,8 @@ void rrc_conn_recfg_complete_v1430_ies_s::to_json(json_writer& j) const j.start_obj(); if (per_cc_gap_ind_list_r14_present) { j.start_array("perCC-GapIndicationList-r14"); - for (uint32_t i1 = 0; i1 < per_cc_gap_ind_list_r14.size(); ++i1) { - per_cc_gap_ind_list_r14[i1].to_json(j); + for (const auto& e1 : per_cc_gap_ind_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -86043,8 +86066,8 @@ void ue_info_resp_v1530_ies_s::to_json(json_writer& j) const j.start_obj(); if (meas_result_list_idle_r15_present) { j.start_array("measResultListIdle-r15"); - for (uint32_t i1 = 0; i1 < meas_result_list_idle_r15.size(); ++i1) { - meas_result_list_idle_r15[i1].to_json(j); + for (const auto& e1 : meas_result_list_idle_r15) { + e1.to_json(j); } j.end_array(); } @@ -86296,29 +86319,29 @@ void conn_est_fail_report_r11_s::to_json(json_writer& j) const j.start_obj(); if (meas_result_neigh_cells_r11.meas_result_list_eutra_r11_present) { j.start_array("measResultListEUTRA-r11"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r11.meas_result_list_eutra_r11.size(); ++i1) { - meas_result_neigh_cells_r11.meas_result_list_eutra_r11[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r11.meas_result_list_eutra_r11) { + e1.to_json(j); } j.end_array(); } if (meas_result_neigh_cells_r11.meas_result_list_utra_r11_present) { j.start_array("measResultListUTRA-r11"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r11.meas_result_list_utra_r11.size(); ++i1) { - meas_result_neigh_cells_r11.meas_result_list_utra_r11[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r11.meas_result_list_utra_r11) { + e1.to_json(j); } j.end_array(); } if (meas_result_neigh_cells_r11.meas_result_list_geran_r11_present) { j.start_array("measResultListGERAN-r11"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r11.meas_result_list_geran_r11.size(); ++i1) { - meas_result_neigh_cells_r11.meas_result_list_geran_r11[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r11.meas_result_list_geran_r11) { + e1.to_json(j); } j.end_array(); } if (meas_result_neigh_cells_r11.meas_results_cdma2000_r11_present) { j.start_array("measResultsCDMA2000-r11"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r11.meas_results_cdma2000_r11.size(); ++i1) { - meas_result_neigh_cells_r11.meas_results_cdma2000_r11[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r11.meas_results_cdma2000_r11) { + e1.to_json(j); } j.end_array(); } @@ -86330,8 +86353,8 @@ void conn_est_fail_report_r11_s::to_json(json_writer& j) const j.write_int("timeSinceFailure-r11", time_since_fail_r11); if (meas_result_list_eutra_v1130_present) { j.start_array("measResultListEUTRA-v1130"); - for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v1130.size(); ++i1) { - meas_result_list_eutra_v1130[i1].to_json(j); + for (const auto& e1 : meas_result_list_eutra_v1130) { + e1.to_json(j); } j.end_array(); } @@ -86345,8 +86368,8 @@ void conn_est_fail_report_r11_s::to_json(json_writer& j) const } if (meas_result_list_eutra_v1250.is_present()) { j.start_array("measResultListEUTRA-v1250"); - for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v1250->size(); ++i1) { - ((*meas_result_list_eutra_v1250)[i1]).to_json(j); + for (const auto& e1 : *meas_result_list_eutra_v1250) { + e1.to_json(j); } j.end_array(); } @@ -86355,15 +86378,15 @@ void conn_est_fail_report_r11_s::to_json(json_writer& j) const } if (log_meas_result_list_bt_r15.is_present()) { j.start_array("logMeasResultListBT-r15"); - for (uint32_t i1 = 0; i1 < log_meas_result_list_bt_r15->size(); ++i1) { - ((*log_meas_result_list_bt_r15)[i1]).to_json(j); + for (const auto& e1 : *log_meas_result_list_bt_r15) { + e1.to_json(j); } j.end_array(); } if (log_meas_result_list_wlan_r15.is_present()) { j.start_array("logMeasResultListWLAN-r15"); - for (uint32_t i1 = 0; i1 < log_meas_result_list_wlan_r15->size(); ++i1) { - ((*log_meas_result_list_wlan_r15)[i1]).to_json(j); + for (const auto& e1 : *log_meas_result_list_wlan_r15) { + e1.to_json(j); } j.end_array(); } @@ -86607,8 +86630,8 @@ void sl_v2x_comm_tx_res_req_r14_s::to_json(json_writer& j) const } if (v2x_dest_info_list_r14_present) { j.start_array("v2x-DestinationInfoList-r14"); - for (uint32_t i1 = 0; i1 < v2x_dest_info_list_r14.size(); ++i1) { - j.write_str(v2x_dest_info_list_r14[i1].to_string()); + for (const auto& e1 : v2x_dest_info_list_r14) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -86649,8 +86672,8 @@ void ue_info_resp_v1250_ies_s::to_json(json_writer& j) const j.start_obj(); if (mob_history_report_r12_present) { j.start_array("mobilityHistoryReport-r12"); - for (uint32_t i1 = 0; i1 < mob_history_report_r12.size(); ++i1) { - mob_history_report_r12[i1].to_json(j); + for (const auto& e1 : mob_history_report_r12) { + e1.to_json(j); } j.end_array(); } @@ -86687,8 +86710,8 @@ void fail_report_scg_v12d0_s::to_json(json_writer& j) const j.start_obj(); if (meas_result_neigh_cells_v12d0_present) { j.start_array("measResultNeighCells-v12d0"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_v12d0.size(); ++i1) { - meas_result_neigh_cells_v12d0[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_v12d0) { + e1.to_json(j); } j.end_array(); } @@ -87050,8 +87073,8 @@ void log_meas_report_r10_s::to_json(json_writer& j) const j.write_str("traceRecordingSessionRef-r10", trace_recording_session_ref_r10.to_string()); j.write_str("tce-Id-r10", tce_id_r10.to_string()); j.start_array("logMeasInfoList-r10"); - for (uint32_t i1 = 0; i1 < log_meas_info_list_r10.size(); ++i1) { - log_meas_info_list_r10[i1].to_json(j); + for (const auto& e1 : log_meas_info_list_r10) { + e1.to_json(j); } j.end_array(); if (log_meas_available_r10_present) { @@ -87220,8 +87243,8 @@ void meas_result_freq_fail_nr_r15_s::to_json(json_writer& j) const j.write_int("carrierFreq-r15", carrier_freq_r15); if (meas_result_cell_list_r15_present) { j.start_array("measResultCellList-r15"); - for (uint32_t i1 = 0; i1 < meas_result_cell_list_r15.size(); ++i1) { - meas_result_cell_list_r15[i1].to_json(j); + for (const auto& e1 : meas_result_cell_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -87728,8 +87751,8 @@ void rlf_report_v9e0_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("measResultListEUTRA-v9e0"); - for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v9e0.size(); ++i1) { - meas_result_list_eutra_v9e0[i1].to_json(j); + for (const auto& e1 : meas_result_list_eutra_v9e0) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -88030,8 +88053,8 @@ void sl_disc_sys_info_report_r13_s::to_json(json_writer& j) const j.start_obj(); if (plmn_id_list_r13_present) { j.start_array("plmn-IdentityList-r13"); - for (uint32_t i1 = 0; i1 < plmn_id_list_r13.size(); ++i1) { - plmn_id_list_r13[i1].to_json(j); + for (const auto& e1 : plmn_id_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -88043,22 +88066,22 @@ void sl_disc_sys_info_report_r13_s::to_json(json_writer& j) const } if (disc_rx_res_r13_present) { j.start_array("discRxResources-r13"); - for (uint32_t i1 = 0; i1 < disc_rx_res_r13.size(); ++i1) { - disc_rx_res_r13[i1].to_json(j); + for (const auto& e1 : disc_rx_res_r13) { + e1.to_json(j); } j.end_array(); } if (disc_tx_pool_common_r13_present) { j.start_array("discTxPoolCommon-r13"); - for (uint32_t i1 = 0; i1 < disc_tx_pool_common_r13.size(); ++i1) { - disc_tx_pool_common_r13[i1].to_json(j); + for (const auto& e1 : disc_tx_pool_common_r13) { + e1.to_json(j); } j.end_array(); } if (disc_tx_pwr_info_r13_present) { j.start_array("discTxPowerInfo-r13"); - for (uint32_t i1 = 0; i1 < disc_tx_pwr_info_r13.size(); ++i1) { - disc_tx_pwr_info_r13[i1].to_json(j); + for (const auto& e1 : disc_tx_pwr_info_r13) { + e1.to_json(j); } j.end_array(); } @@ -88181,8 +88204,8 @@ void sl_gap_freq_info_r13_s::to_json(json_writer& j) const j.write_int("carrierFreq-r13", carrier_freq_r13); } j.start_array("gapPatternList-r13"); - for (uint32_t i1 = 0; i1 < gap_pattern_list_r13.size(); ++i1) { - gap_pattern_list_r13[i1].to_json(j); + for (const auto& e1 : gap_pattern_list_r13) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -88236,8 +88259,8 @@ void sidelink_ue_info_v1530_ies_s::to_json(json_writer& j) const j.start_obj(); if (reliability_info_list_sl_r15_present) { j.start_array("reliabilityInfoListSL-r15"); - for (uint32_t i1 = 0; i1 < reliability_info_list_sl_r15.size(); ++i1) { - j.write_int(reliability_info_list_sl_r15[i1]); + for (const auto& e1 : reliability_info_list_sl_r15) { + j.write_int(e1); } j.end_array(); } @@ -88443,8 +88466,8 @@ void ueassist_info_v1530_ies_s::to_json(json_writer& j) const j.write_fieldname("sps-AssistanceInformation-v1530"); j.start_obj(); j.start_array("trafficPatternInfoListSL-v1530"); - for (uint32_t i1 = 0; i1 < sps_assist_info_v1530.traffic_pattern_info_list_sl_v1530.size(); ++i1) { - sps_assist_info_v1530.traffic_pattern_info_list_sl_v1530[i1].to_json(j); + for (const auto& e1 : sps_assist_info_v1530.traffic_pattern_info_list_sl_v1530) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -88617,8 +88640,8 @@ void counter_check_resp_v1530_ies_s::to_json(json_writer& j) const j.start_obj(); if (drb_count_info_list_ext_r15_present) { j.start_array("drb-CountInfoListExt-r15"); - for (uint32_t i1 = 0; i1 < drb_count_info_list_ext_r15.size(); ++i1) { - drb_count_info_list_ext_r15[i1].to_json(j); + for (const auto& e1 : drb_count_info_list_ext_r15) { + e1.to_json(j); } j.end_array(); } @@ -88796,17 +88819,17 @@ void in_dev_coex_ind_v1310_ies_s::to_json(json_writer& j) const j.start_obj(); if (affected_carrier_freq_list_v1310_present) { j.start_array("affectedCarrierFreqList-v1310"); - for (uint32_t i1 = 0; i1 < affected_carrier_freq_list_v1310.size(); ++i1) { - affected_carrier_freq_list_v1310[i1].to_json(j); + for (const auto& e1 : affected_carrier_freq_list_v1310) { + e1.to_json(j); } j.end_array(); } if (affected_carrier_freq_comb_list_r13_present) { j.start_array("affectedCarrierFreqCombList-r13"); - for (uint32_t i1 = 0; i1 < affected_carrier_freq_comb_list_r13.size(); ++i1) { + for (const auto& e1 : affected_carrier_freq_comb_list_r13) { j.start_array(); - for (uint32_t i2 = 0; i2 < affected_carrier_freq_comb_list_r13[i1].size(); ++i2) { - j.write_int(affected_carrier_freq_comb_list_r13[i1][i2]); + for (const auto& e2 : e1) { + j.write_int(e2); } j.end_array(); } @@ -88913,8 +88936,8 @@ void meas_result_sensing_r15_s::to_json(json_writer& j) const j.start_obj(); j.write_int("sl-SubframeRef-r15", sl_sf_ref_r15); j.start_array("sensingResult-r15"); - for (uint32_t i1 = 0; i1 < sensing_result_r15.size(); ++i1) { - sensing_result_r15[i1].to_json(j); + for (const auto& e1 : sensing_result_r15) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -89594,8 +89617,8 @@ void sl_comm_tx_res_req_r12_s::to_json(json_writer& j) const j.write_int("carrierFreq-r12", carrier_freq_r12); } j.start_array("destinationInfoList-r12"); - for (uint32_t i1 = 0; i1 < dest_info_list_r12.size(); ++i1) { - j.write_str(dest_info_list_r12[i1].to_string()); + for (const auto& e1 : dest_info_list_r12) { + j.write_str(e1.to_string()); } j.end_array(); j.end_obj(); @@ -89645,8 +89668,8 @@ void sidelink_ue_info_v1430_ies_s::to_json(json_writer& j) const j.start_obj(); if (v2x_comm_rx_interested_freq_list_r14_present) { j.start_array("v2x-CommRxInterestedFreqList-r14"); - for (uint32_t i1 = 0; i1 < v2x_comm_rx_interested_freq_list_r14.size(); ++i1) { - j.write_int(v2x_comm_rx_interested_freq_list_r14[i1]); + for (const auto& e1 : v2x_comm_rx_interested_freq_list_r14) { + j.write_int(e1); } j.end_array(); } @@ -89655,8 +89678,8 @@ void sidelink_ue_info_v1430_ies_s::to_json(json_writer& j) const } if (v2x_comm_tx_res_req_r14_present) { j.start_array("v2x-CommTxResourceReq-r14"); - for (uint32_t i1 = 0; i1 < v2x_comm_tx_res_req_r14.size(); ++i1) { - v2x_comm_tx_res_req_r14[i1].to_json(j); + for (const auto& e1 : v2x_comm_tx_res_req_r14) { + e1.to_json(j); } j.end_array(); } @@ -89970,8 +89993,8 @@ void fail_report_scg_nr_r15_s::to_json(json_writer& j) const j.write_str("failureType-r15", fail_type_r15.to_string()); if (meas_result_freq_list_nr_r15_present) { j.start_array("measResultFreqListNR-r15"); - for (uint32_t i1 = 0; i1 < meas_result_freq_list_nr_r15.size(); ++i1) { - meas_result_freq_list_nr_r15[i1].to_json(j); + for (const auto& e1 : meas_result_freq_list_nr_r15) { + e1.to_json(j); } j.end_array(); } @@ -90060,15 +90083,15 @@ void fail_report_scg_r12_s::to_json(json_writer& j) const j.write_str("failureType-r12", fail_type_r12.to_string()); if (meas_result_serv_freq_list_r12_present) { j.start_array("measResultServFreqList-r12"); - for (uint32_t i1 = 0; i1 < meas_result_serv_freq_list_r12.size(); ++i1) { - meas_result_serv_freq_list_r12[i1].to_json(j); + for (const auto& e1 : meas_result_serv_freq_list_r12) { + e1.to_json(j); } j.end_array(); } if (meas_result_neigh_cells_r12_present) { j.start_array("measResultNeighCells-r12"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r12.size(); ++i1) { - meas_result_neigh_cells_r12[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r12) { + e1.to_json(j); } j.end_array(); } @@ -90078,8 +90101,8 @@ void fail_report_scg_r12_s::to_json(json_writer& j) const } if (meas_result_serv_freq_list_ext_r13.is_present()) { j.start_array("measResultServFreqListExt-r13"); - for (uint32_t i1 = 0; i1 < meas_result_serv_freq_list_ext_r13->size(); ++i1) { - ((*meas_result_serv_freq_list_ext_r13)[i1]).to_json(j); + for (const auto& e1 : *meas_result_serv_freq_list_ext_r13) { + e1.to_json(j); } j.end_array(); } @@ -90140,10 +90163,10 @@ void in_dev_coex_ind_v11d0_ies_s::to_json(json_writer& j) const j.start_obj(); if (ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11_present) { j.start_array("affectedCarrierFreqCombList-r11"); - for (uint32_t i1 = 0; i1 < ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11.size(); ++i1) { + for (const auto& e1 : ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11) { j.start_array(); - for (uint32_t i2 = 0; i2 < ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11[i1].size(); ++i2) { - j.write_int(ul_ca_assist_info_r11.affected_carrier_freq_comb_list_r11[i1][i2]); + for (const auto& e2 : e1) { + j.write_int(e2); } j.end_array(); } @@ -90188,8 +90211,8 @@ void mbms_interest_ind_v1310_ies_s::to_json(json_writer& j) const j.start_obj(); if (mbms_services_r13_present) { j.start_array("mbms-Services-r13"); - for (uint32_t i1 = 0; i1 < mbms_services_r13.size(); ++i1) { - mbms_services_r13[i1].to_json(j); + for (const auto& e1 : mbms_services_r13) { + e1.to_json(j); } j.end_array(); } @@ -90551,8 +90574,8 @@ void meas_results_s::to_json(json_writer& j) const } if (meas_result_serv_freq_list_r10.is_present()) { j.start_array("measResultServFreqList-r10"); - for (uint32_t i1 = 0; i1 < meas_result_serv_freq_list_r10->size(); ++i1) { - ((*meas_result_serv_freq_list_r10)[i1]).to_json(j); + for (const auto& e1 : *meas_result_serv_freq_list_r10) { + e1.to_json(j); } j.end_array(); } @@ -90564,8 +90587,8 @@ void meas_results_s::to_json(json_writer& j) const } if (meas_result_csi_rs_list_r12.is_present()) { j.start_array("measResultCSI-RS-List-r12"); - for (uint32_t i1 = 0; i1 < meas_result_csi_rs_list_r12->size(); ++i1) { - ((*meas_result_csi_rs_list_r12)[i1]).to_json(j); + for (const auto& e1 : *meas_result_csi_rs_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -90575,8 +90598,8 @@ void meas_results_s::to_json(json_writer& j) const } if (meas_result_serv_freq_list_ext_r13.is_present()) { j.start_array("measResultServFreqListExt-r13"); - for (uint32_t i1 = 0; i1 < meas_result_serv_freq_list_ext_r13->size(); ++i1) { - ((*meas_result_serv_freq_list_ext_r13)[i1]).to_json(j); + for (const auto& e1 : *meas_result_serv_freq_list_ext_r13) { + e1.to_json(j); } j.end_array(); } @@ -90592,15 +90615,15 @@ void meas_results_s::to_json(json_writer& j) const } if (ul_pdcp_delay_result_list_r13.is_present()) { j.start_array("ul-PDCP-DelayResultList-r13"); - for (uint32_t i1 = 0; i1 < ul_pdcp_delay_result_list_r13->size(); ++i1) { - ((*ul_pdcp_delay_result_list_r13)[i1]).to_json(j); + for (const auto& e1 : *ul_pdcp_delay_result_list_r13) { + e1.to_json(j); } j.end_array(); } if (meas_result_list_wlan_r13.is_present()) { j.start_array("measResultListWLAN-r13"); - for (uint32_t i1 = 0; i1 < meas_result_list_wlan_r13->size(); ++i1) { - ((*meas_result_list_wlan_r13)[i1]).to_json(j); + for (const auto& e1 : *meas_result_list_wlan_r13) { + e1.to_json(j); } j.end_array(); } @@ -90609,43 +90632,43 @@ void meas_results_s::to_json(json_writer& j) const } if (meas_result_list_cbr_r14.is_present()) { j.start_array("measResultListCBR-r14"); - for (uint32_t i1 = 0; i1 < meas_result_list_cbr_r14->size(); ++i1) { - ((*meas_result_list_cbr_r14)[i1]).to_json(j); + for (const auto& e1 : *meas_result_list_cbr_r14) { + e1.to_json(j); } j.end_array(); } if (meas_result_list_wlan_r14.is_present()) { j.start_array("measResultListWLAN-r14"); - for (uint32_t i1 = 0; i1 < meas_result_list_wlan_r14->size(); ++i1) { - ((*meas_result_list_wlan_r14)[i1]).to_json(j); + for (const auto& e1 : *meas_result_list_wlan_r14) { + e1.to_json(j); } j.end_array(); } if (meas_result_serv_freq_list_nr_r15.is_present()) { j.start_array("measResultServFreqListNR-r15"); - for (uint32_t i1 = 0; i1 < meas_result_serv_freq_list_nr_r15->size(); ++i1) { - ((*meas_result_serv_freq_list_nr_r15)[i1]).to_json(j); + for (const auto& e1 : *meas_result_serv_freq_list_nr_r15) { + e1.to_json(j); } j.end_array(); } if (meas_result_cell_list_sftd_r15.is_present()) { j.start_array("measResultCellListSFTD-r15"); - for (uint32_t i1 = 0; i1 < meas_result_cell_list_sftd_r15->size(); ++i1) { - ((*meas_result_cell_list_sftd_r15)[i1]).to_json(j); + for (const auto& e1 : *meas_result_cell_list_sftd_r15) { + e1.to_json(j); } j.end_array(); } if (log_meas_result_list_bt_r15.is_present()) { j.start_array("logMeasResultListBT-r15"); - for (uint32_t i1 = 0; i1 < log_meas_result_list_bt_r15->size(); ++i1) { - ((*log_meas_result_list_bt_r15)[i1]).to_json(j); + for (const auto& e1 : *log_meas_result_list_bt_r15) { + e1.to_json(j); } j.end_array(); } if (log_meas_result_list_wlan_r15.is_present()) { j.start_array("logMeasResultListWLAN-r15"); - for (uint32_t i1 = 0; i1 < log_meas_result_list_wlan_r15->size(); ++i1) { - ((*log_meas_result_list_wlan_r15)[i1]).to_json(j); + for (const auto& e1 : *log_meas_result_list_wlan_r15) { + e1.to_json(j); } j.end_array(); } @@ -90771,22 +90794,22 @@ void meas_results_s::meas_result_neigh_cells_c_::to_json(json_writer& j) const switch (type_) { case types::meas_result_list_eutra: j.start_array("measResultListEUTRA"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::meas_result_list_utra: j.start_array("measResultListUTRA"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::meas_result_list_geran: j.start_array("measResultListGERAN"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -90796,8 +90819,8 @@ void meas_results_s::meas_result_neigh_cells_c_::to_json(json_writer& j) const break; case types::meas_result_neigh_cell_list_nr_r15: j.start_array("measResultNeighCellListNR-r15"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -91278,29 +91301,29 @@ void rlf_report_r9_s::to_json(json_writer& j) const j.start_obj(); if (meas_result_neigh_cells_r9.meas_result_list_eutra_r9_present) { j.start_array("measResultListEUTRA-r9"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r9.meas_result_list_eutra_r9.size(); ++i1) { - meas_result_neigh_cells_r9.meas_result_list_eutra_r9[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r9.meas_result_list_eutra_r9) { + e1.to_json(j); } j.end_array(); } if (meas_result_neigh_cells_r9.meas_result_list_utra_r9_present) { j.start_array("measResultListUTRA-r9"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r9.meas_result_list_utra_r9.size(); ++i1) { - meas_result_neigh_cells_r9.meas_result_list_utra_r9[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r9.meas_result_list_utra_r9) { + e1.to_json(j); } j.end_array(); } if (meas_result_neigh_cells_r9.meas_result_list_geran_r9_present) { j.start_array("measResultListGERAN-r9"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r9.meas_result_list_geran_r9.size(); ++i1) { - meas_result_neigh_cells_r9.meas_result_list_geran_r9[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r9.meas_result_list_geran_r9) { + e1.to_json(j); } j.end_array(); } if (meas_result_neigh_cells_r9.meas_results_cdma2000_r9_present) { j.start_array("measResultsCDMA2000-r9"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cells_r9.meas_results_cdma2000_r9.size(); ++i1) { - meas_result_neigh_cells_r9.meas_results_cdma2000_r9[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cells_r9.meas_results_cdma2000_r9) { + e1.to_json(j); } j.end_array(); } @@ -91378,8 +91401,8 @@ void rlf_report_r9_s::to_json(json_writer& j) const } if (meas_result_list_eutra_v1250.is_present()) { j.start_array("measResultListEUTRA-v1250"); - for (uint32_t i1 = 0; i1 < meas_result_list_eutra_v1250->size(); ++i1) { - ((*meas_result_list_eutra_v1250)[i1]).to_json(j); + for (const auto& e1 : *meas_result_list_eutra_v1250) { + e1.to_json(j); } j.end_array(); } @@ -91391,15 +91414,15 @@ void rlf_report_r9_s::to_json(json_writer& j) const } if (log_meas_result_list_bt_r15.is_present()) { j.start_array("logMeasResultListBT-r15"); - for (uint32_t i1 = 0; i1 < log_meas_result_list_bt_r15->size(); ++i1) { - ((*log_meas_result_list_bt_r15)[i1]).to_json(j); + for (const auto& e1 : *log_meas_result_list_bt_r15) { + e1.to_json(j); } j.end_array(); } if (log_meas_result_list_wlan_r15.is_present()) { j.start_array("logMeasResultListWLAN-r15"); - for (uint32_t i1 = 0; i1 < log_meas_result_list_wlan_r15->size(); ++i1) { - ((*log_meas_result_list_wlan_r15)[i1]).to_json(j); + for (const auto& e1 : *log_meas_result_list_wlan_r15) { + e1.to_json(j); } j.end_array(); } @@ -92170,8 +92193,8 @@ void sidelink_ue_info_v1310_ies_s::to_json(json_writer& j) const } if (disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13_present) { j.start_array("discTxResourceReqAddFreq-r13"); - for (uint32_t i1 = 0; i1 < disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13.size(); ++i1) { - disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13[i1].to_json(j); + for (const auto& e1 : disc_tx_res_req_v1310.disc_tx_res_req_add_freq_r13) { + e1.to_json(j); } j.end_array(); } @@ -92183,22 +92206,22 @@ void sidelink_ue_info_v1310_ies_s::to_json(json_writer& j) const } if (disc_rx_gap_req_r13_present) { j.start_array("discRxGapReq-r13"); - for (uint32_t i1 = 0; i1 < disc_rx_gap_req_r13.size(); ++i1) { - disc_rx_gap_req_r13[i1].to_json(j); + for (const auto& e1 : disc_rx_gap_req_r13) { + e1.to_json(j); } j.end_array(); } if (disc_tx_gap_req_r13_present) { j.start_array("discTxGapReq-r13"); - for (uint32_t i1 = 0; i1 < disc_tx_gap_req_r13.size(); ++i1) { - disc_tx_gap_req_r13[i1].to_json(j); + for (const auto& e1 : disc_tx_gap_req_r13) { + e1.to_json(j); } j.end_array(); } if (disc_sys_info_report_freq_list_r13_present) { j.start_array("discSysInfoReportFreqList-r13"); - for (uint32_t i1 = 0; i1 < disc_sys_info_report_freq_list_r13.size(); ++i1) { - disc_sys_info_report_freq_list_r13[i1].to_json(j); + for (const auto& e1 : disc_sys_info_report_freq_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -92293,8 +92316,8 @@ void tdm_assist_info_r11_c::to_json(json_writer& j) const break; case types::idc_sf_pattern_list_r11: j.start_array("idc-SubframePatternList-r11"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -92435,15 +92458,15 @@ void ueassist_info_v1430_ies_s::to_json(json_writer& j) const j.start_obj(); if (sps_assist_info_r14.traffic_pattern_info_list_sl_r14_present) { j.start_array("trafficPatternInfoListSL-r14"); - for (uint32_t i1 = 0; i1 < sps_assist_info_r14.traffic_pattern_info_list_sl_r14.size(); ++i1) { - sps_assist_info_r14.traffic_pattern_info_list_sl_r14[i1].to_json(j); + for (const auto& e1 : sps_assist_info_r14.traffic_pattern_info_list_sl_r14) { + e1.to_json(j); } j.end_array(); } if (sps_assist_info_r14.traffic_pattern_info_list_ul_r14_present) { j.start_array("trafficPatternInfoListUL-r14"); - for (uint32_t i1 = 0; i1 < sps_assist_info_r14.traffic_pattern_info_list_ul_r14.size(); ++i1) { - sps_assist_info_r14.traffic_pattern_info_list_ul_r14[i1].to_json(j); + for (const auto& e1 : sps_assist_info_r14.traffic_pattern_info_list_ul_r14) { + e1.to_json(j); } j.end_array(); } @@ -92714,8 +92737,8 @@ void counter_check_resp_r8_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("drb-CountInfoList"); - for (uint32_t i1 = 0; i1 < drb_count_info_list.size(); ++i1) { - drb_count_info_list[i1].to_json(j); + for (const auto& e1 : drb_count_info_list) { + e1.to_json(j); } j.end_array(); if (non_crit_ext_present) { @@ -92823,8 +92846,8 @@ void in_dev_coex_ind_r11_ies_s::to_json(json_writer& j) const j.start_obj(); if (affected_carrier_freq_list_r11_present) { j.start_array("affectedCarrierFreqList-r11"); - for (uint32_t i1 = 0; i1 < affected_carrier_freq_list_r11.size(); ++i1) { - affected_carrier_freq_list_r11[i1].to_json(j); + for (const auto& e1 : affected_carrier_freq_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -92895,8 +92918,8 @@ void inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_::to_json(jso j.write_fieldname("start"); j.start_obj(); j.start_array("rstd-InterFreqInfoList-r10"); - for (uint32_t i1 = 0; i1 < c.rstd_inter_freq_info_list_r10.size(); ++i1) { - c.rstd_inter_freq_info_list_r10[i1].to_json(j); + for (const auto& e1 : c.rstd_inter_freq_info_list_r10) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -92988,8 +93011,8 @@ void mbms_count_resp_r10_ies_s::to_json(json_writer& j) const } if (count_resp_list_r10_present) { j.start_array("countingResponseList-r10"); - for (uint32_t i1 = 0; i1 < count_resp_list_r10.size(); ++i1) { - count_resp_list_r10[i1].to_json(j); + for (const auto& e1 : count_resp_list_r10) { + e1.to_json(j); } j.end_array(); } @@ -93048,8 +93071,8 @@ void mbms_interest_ind_r11_ies_s::to_json(json_writer& j) const j.start_obj(); if (mbms_freq_list_r11_present) { j.start_array("mbms-FreqList-r11"); - for (uint32_t i1 = 0; i1 < mbms_freq_list_r11.size(); ++i1) { - j.write_int(mbms_freq_list_r11[i1]); + for (const auto& e1 : mbms_freq_list_r11) { + j.write_int(e1); } j.end_array(); } @@ -93850,8 +93873,8 @@ void ue_cap_info_r8_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("ue-CapabilityRAT-ContainerList"); - for (uint32_t i1 = 0; i1 < ue_cap_rat_container_list.size(); ++i1) { - ue_cap_rat_container_list[i1].to_json(j); + for (const auto& e1 : ue_cap_rat_container_list) { + e1.to_json(j); } j.end_array(); if (non_crit_ext_present) { @@ -100035,14 +100058,14 @@ void band_info_eutra_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("interFreqBandList"); - for (uint32_t i1 = 0; i1 < inter_freq_band_list.size(); ++i1) { - inter_freq_band_list[i1].to_json(j); + for (const auto& e1 : inter_freq_band_list) { + e1.to_json(j); } j.end_array(); if (inter_rat_band_list_present) { j.start_array("interRAT-BandList"); - for (uint32_t i1 = 0; i1 < inter_rat_band_list.size(); ++i1) { - inter_rat_band_list[i1].to_json(j); + for (const auto& e1 : inter_rat_band_list) { + e1.to_json(j); } j.end_array(); } @@ -100152,15 +100175,15 @@ void band_params_r10_s::to_json(json_writer& j) const j.write_int("bandEUTRA-r10", band_eutra_r10); if (band_params_ul_r10_present) { j.start_array("bandParametersUL-r10"); - for (uint32_t i1 = 0; i1 < band_params_ul_r10.size(); ++i1) { - band_params_ul_r10[i1].to_json(j); + for (const auto& e1 : band_params_ul_r10) { + e1.to_json(j); } j.end_array(); } if (band_params_dl_r10_present) { j.start_array("bandParametersDL-r10"); - for (uint32_t i1 = 0; i1 < band_params_dl_r10.size(); ++i1) { - band_params_dl_r10[i1].to_json(j); + for (const auto& e1 : band_params_dl_r10) { + e1.to_json(j); } j.end_array(); } @@ -100212,15 +100235,15 @@ void band_params_r11_s::to_json(json_writer& j) const j.write_int("bandEUTRA-r11", band_eutra_r11); if (band_params_ul_r11_present) { j.start_array("bandParametersUL-r11"); - for (uint32_t i1 = 0; i1 < band_params_ul_r11.size(); ++i1) { - band_params_ul_r11[i1].to_json(j); + for (const auto& e1 : band_params_ul_r11) { + e1.to_json(j); } j.end_array(); } if (band_params_dl_r11_present) { j.start_array("bandParametersDL-r11"); - for (uint32_t i1 = 0; i1 < band_params_dl_r11.size(); ++i1) { - band_params_dl_r11[i1].to_json(j); + for (const auto& e1 : band_params_dl_r11) { + e1.to_json(j); } j.end_array(); } @@ -100265,8 +100288,8 @@ void band_combination_params_r11_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("bandParameterList-r11"); - for (uint32_t i1 = 0; i1 < band_param_list_r11.size(); ++i1) { - band_param_list_r11[i1].to_json(j); + for (const auto& e1 : band_param_list_r11) { + e1.to_json(j); } j.end_array(); if (supported_bw_combination_set_r11_present) { @@ -100367,8 +100390,8 @@ void ca_mimo_params_dl_r13_s::to_json(json_writer& j) const j.write_str("fourLayerTM3-TM4-r13", "supported"); } j.start_array("intraBandContiguousCC-InfoList-r13"); - for (uint32_t i1 = 0; i1 < intra_band_contiguous_cc_info_list_r13.size(); ++i1) { - intra_band_contiguous_cc_info_list_r13[i1].to_json(j); + for (const auto& e1 : intra_band_contiguous_cc_info_list_r13) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -100501,8 +100524,8 @@ void band_combination_params_r13_s::to_json(json_writer& j) const j.write_str("differentFallbackSupported-r13", "true"); } j.start_array("bandParameterList-r13"); - for (uint32_t i1 = 0; i1 < band_param_list_r13.size(); ++i1) { - band_param_list_r13[i1].to_json(j); + for (const auto& e1 : band_param_list_r13) { + e1.to_json(j); } j.end_array(); if (supported_bw_combination_set_r13_present) { @@ -100749,8 +100772,8 @@ void band_params_v10i0_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("bandParametersDL-v10i0"); - for (uint32_t i1 = 0; i1 < band_params_dl_v10i0.size(); ++i1) { - band_params_dl_v10i0[i1].to_json(j); + for (const auto& e1 : band_params_dl_v10i0) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -100782,8 +100805,8 @@ void band_combination_params_v10i0_s::to_json(json_writer& j) const j.start_obj(); if (band_param_list_v10i0_present) { j.start_array("bandParameterList-v10i0"); - for (uint32_t i1 = 0; i1 < band_param_list_v10i0.size(); ++i1) { - band_param_list_v10i0[i1].to_json(j); + for (const auto& e1 : band_param_list_v10i0) { + e1.to_json(j); } j.end_array(); } @@ -100848,8 +100871,8 @@ void band_combination_params_v1130_s::to_json(json_writer& j) const } if (band_param_list_r11_present) { j.start_array("bandParameterList-r11"); - for (uint32_t i1 = 0; i1 < band_param_list_r11.size(); ++i1) { - band_param_list_r11[i1].to_json(j); + for (const auto& e1 : band_param_list_r11) { + e1.to_json(j); } j.end_array(); } @@ -101092,8 +101115,8 @@ void ca_mimo_params_dl_v1270_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("intraBandContiguousCC-InfoList-r12"); - for (uint32_t i1 = 0; i1 < intra_band_contiguous_cc_info_list_r12.size(); ++i1) { - intra_band_contiguous_cc_info_list_r12[i1].to_json(j); + for (const auto& e1 : intra_band_contiguous_cc_info_list_r12) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -101116,8 +101139,8 @@ void band_params_v1270_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("bandParametersDL-v1270"); - for (uint32_t i1 = 0; i1 < band_params_dl_v1270.size(); ++i1) { - band_params_dl_v1270[i1].to_json(j); + for (const auto& e1 : band_params_dl_v1270) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -101149,8 +101172,8 @@ void band_combination_params_v1270_s::to_json(json_writer& j) const j.start_obj(); if (band_param_list_v1270_present) { j.start_array("bandParameterList-v1270"); - for (uint32_t i1 = 0; i1 < band_param_list_v1270.size(); ++i1) { - band_param_list_v1270[i1].to_json(j); + for (const auto& e1 : band_param_list_v1270) { + e1.to_json(j); } j.end_array(); } @@ -101267,8 +101290,8 @@ void mimo_ca_params_per_bo_bc_per_tm_r13_s::to_json(json_writer& j) const } if (bf_r13_present) { j.start_array("beamformed-r13"); - for (uint32_t i1 = 0; i1 < bf_r13.size(); ++i1) { - bf_r13[i1].to_json(j); + for (const auto& e1 : bf_r13) { + e1.to_json(j); } j.end_array(); } @@ -101370,8 +101393,8 @@ void band_combination_params_v1320_s::to_json(json_writer& j) const j.start_obj(); if (band_param_list_v1320_present) { j.start_array("bandParameterList-v1320"); - for (uint32_t i1 = 0; i1 < band_param_list_v1320.size(); ++i1) { - band_param_list_v1320[i1].to_json(j); + for (const auto& e1 : band_param_list_v1320) { + e1.to_json(j); } j.end_array(); } @@ -101448,8 +101471,8 @@ void band_combination_params_v1380_s::to_json(json_writer& j) const j.start_obj(); if (band_param_list_v1380_present) { j.start_array("bandParameterList-v1380"); - for (uint32_t i1 = 0; i1 < band_param_list_v1380.size(); ++i1) { - band_param_list_v1380[i1].to_json(j); + for (const auto& e1 : band_param_list_v1380) { + e1.to_json(j); } j.end_array(); } @@ -101641,15 +101664,15 @@ void band_params_v1430_s::to_json(json_writer& j) const } if (ul_minus256_qam_per_cc_info_list_r14_present) { j.start_array("ul-256QAM-perCC-InfoList-r14"); - for (uint32_t i1 = 0; i1 < ul_minus256_qam_per_cc_info_list_r14.size(); ++i1) { - ul_minus256_qam_per_cc_info_list_r14[i1].to_json(j); + for (const auto& e1 : ul_minus256_qam_per_cc_info_list_r14) { + e1.to_json(j); } j.end_array(); } if (retuning_time_info_band_list_r14_present) { j.start_array("retuningTimeInfoBandList-r14"); - for (uint32_t i1 = 0; i1 < retuning_time_info_band_list_r14.size(); ++i1) { - retuning_time_info_band_list_r14[i1].to_json(j); + for (const auto& e1 : retuning_time_info_band_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -101698,8 +101721,8 @@ void band_combination_params_v1430_s::to_json(json_writer& j) const j.start_obj(); if (band_param_list_v1430_present) { j.start_array("bandParameterList-v1430"); - for (uint32_t i1 = 0; i1 < band_param_list_v1430.size(); ++i1) { - band_param_list_v1430[i1].to_json(j); + for (const auto& e1 : band_param_list_v1430) { + e1.to_json(j); } j.end_array(); } @@ -101811,8 +101834,8 @@ void band_combination_params_v1450_s::to_json(json_writer& j) const j.start_obj(); if (band_param_list_v1450_present) { j.start_array("bandParameterList-v1450"); - for (uint32_t i1 = 0; i1 < band_param_list_v1450.size(); ++i1) { - band_param_list_v1450[i1].to_json(j); + for (const auto& e1 : band_param_list_v1450) { + e1.to_json(j); } j.end_array(); } @@ -101939,8 +101962,8 @@ void band_combination_params_v1470_s::to_json(json_writer& j) const j.start_obj(); if (band_param_list_v1470_present) { j.start_array("bandParameterList-v1470"); - for (uint32_t i1 = 0; i1 < band_param_list_v1470.size(); ++i1) { - band_param_list_v1470[i1].to_json(j); + for (const auto& e1 : band_param_list_v1470) { + e1.to_json(j); } j.end_array(); } @@ -102033,8 +102056,8 @@ void ca_mimo_params_dl_r15_s::to_json(json_writer& j) const } if (intra_band_contiguous_cc_info_list_r15_present) { j.start_array("intraBandContiguousCC-InfoList-r15"); - for (uint32_t i1 = 0; i1 < intra_band_contiguous_cc_info_list_r15.size(); ++i1) { - intra_band_contiguous_cc_info_list_r15[i1].to_json(j); + for (const auto& e1 : intra_band_contiguous_cc_info_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -102149,22 +102172,22 @@ void stti_supported_combinations_r15_s::to_json(json_writer& j) const } if (combination_minus22_minus27_r15_present) { j.start_array("combination-22-27-r15"); - for (uint32_t i1 = 0; i1 < combination_minus22_minus27_r15.size(); ++i1) { - combination_minus22_minus27_r15[i1].to_json(j); + for (const auto& e1 : combination_minus22_minus27_r15) { + e1.to_json(j); } j.end_array(); } if (combination_minus77_minus22_r15_present) { j.start_array("combination-77-22-r15"); - for (uint32_t i1 = 0; i1 < combination_minus77_minus22_r15.size(); ++i1) { - combination_minus77_minus22_r15[i1].to_json(j); + for (const auto& e1 : combination_minus77_minus22_r15) { + e1.to_json(j); } j.end_array(); } if (combination_minus77_minus27_r15_present) { j.start_array("combination-77-27-r15"); - for (uint32_t i1 = 0; i1 < combination_minus77_minus27_r15.size(); ++i1) { - combination_minus77_minus27_r15[i1].to_json(j); + for (const auto& e1 : combination_minus77_minus27_r15) { + e1.to_json(j); } j.end_array(); } @@ -102426,8 +102449,8 @@ void band_combination_params_v1530_s::to_json(json_writer& j) const j.start_obj(); if (band_param_list_v1530_present) { j.start_array("bandParameterList-v1530"); - for (uint32_t i1 = 0; i1 < band_param_list_v1530.size(); ++i1) { - band_param_list_v1530[i1].to_json(j); + for (const auto& e1 : band_param_list_v1530) { + e1.to_json(j); } j.end_array(); } @@ -102489,8 +102512,8 @@ void band_params_rx_sl_r14_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("v2x-BandwidthClassRxSL-r14"); - for (uint32_t i1 = 0; i1 < v2x_bw_class_rx_sl_r14.size(); ++i1) { - j.write_str(v2x_bw_class_rx_sl_r14[i1].to_string()); + for (const auto& e1 : v2x_bw_class_rx_sl_r14) { + j.write_str(e1.to_string()); } j.end_array(); if (v2x_high_reception_r14_present) { @@ -102522,8 +102545,8 @@ void band_params_tx_sl_r14_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("v2x-BandwidthClassTxSL-r14"); - for (uint32_t i1 = 0; i1 < v2x_bw_class_tx_sl_r14.size(); ++i1) { - j.write_str(v2x_bw_class_tx_sl_r14[i1].to_string()); + for (const auto& e1 : v2x_bw_class_tx_sl_r14) { + j.write_str(e1.to_string()); } j.end_array(); if (v2x_enb_sched_r14_present) { @@ -102625,8 +102648,8 @@ void mimo_ca_params_per_bo_bc_per_tm_r15_s::to_json(json_writer& j) const } if (bf_r13_present) { j.start_array("beamformed-r13"); - for (uint32_t i1 = 0; i1 < bf_r13.size(); ++i1) { - bf_r13[i1].to_json(j); + for (const auto& e1 : bf_r13) { + e1.to_json(j); } j.end_array(); } @@ -102716,8 +102739,8 @@ void feature_set_dl_r15_s::to_json(json_writer& j) const mimo_ca_params_per_bo_bc_r15.to_json(j); } j.start_array("featureSetPerCC-ListDL-r15"); - for (uint32_t i1 = 0; i1 < feature_set_per_cc_list_dl_r15.size(); ++i1) { - j.write_int(feature_set_per_cc_list_dl_r15[i1]); + for (const auto& e1 : feature_set_per_cc_list_dl_r15) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -102775,8 +102798,8 @@ void feature_set_ul_r15_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("featureSetPerCC-ListUL-r15"); - for (uint32_t i1 = 0; i1 < feature_set_per_cc_list_ul_r15.size(); ++i1) { - j.write_int(feature_set_per_cc_list_ul_r15[i1]); + for (const auto& e1 : feature_set_per_cc_list_ul_r15) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -102834,29 +102857,29 @@ void feature_sets_eutra_r15_s::to_json(json_writer& j) const j.start_obj(); if (feature_sets_dl_r15_present) { j.start_array("featureSetsDL-r15"); - for (uint32_t i1 = 0; i1 < feature_sets_dl_r15.size(); ++i1) { - feature_sets_dl_r15[i1].to_json(j); + for (const auto& e1 : feature_sets_dl_r15) { + e1.to_json(j); } j.end_array(); } if (feature_sets_dl_per_cc_r15_present) { j.start_array("featureSetsDL-PerCC-r15"); - for (uint32_t i1 = 0; i1 < feature_sets_dl_per_cc_r15.size(); ++i1) { - feature_sets_dl_per_cc_r15[i1].to_json(j); + for (const auto& e1 : feature_sets_dl_per_cc_r15) { + e1.to_json(j); } j.end_array(); } if (feature_sets_ul_r15_present) { j.start_array("featureSetsUL-r15"); - for (uint32_t i1 = 0; i1 < feature_sets_ul_r15.size(); ++i1) { - feature_sets_ul_r15[i1].to_json(j); + for (const auto& e1 : feature_sets_ul_r15) { + e1.to_json(j); } j.end_array(); } if (feature_sets_ul_per_cc_r15_present) { j.start_array("featureSetsUL-PerCC-r15"); - for (uint32_t i1 = 0; i1 < feature_sets_ul_per_cc_r15.size(); ++i1) { - feature_sets_ul_per_cc_r15[i1].to_json(j); + for (const auto& e1 : feature_sets_ul_per_cc_r15) { + e1.to_json(j); } j.end_array(); } @@ -102884,8 +102907,8 @@ void irat_params_cdma2000_minus1_xrtt_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandList1XRTT"); - for (uint32_t i1 = 0; i1 < supported_band_list1_xrtt.size(); ++i1) { - j.write_str(supported_band_list1_xrtt[i1].to_string()); + for (const auto& e1 : supported_band_list1_xrtt) { + j.write_str(e1.to_string()); } j.end_array(); j.write_str("tx-Config1XRTT", tx_cfg1_xrtt.to_string()); @@ -102914,8 +102937,8 @@ void irat_params_cdma2000_hrpd_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandListHRPD"); - for (uint32_t i1 = 0; i1 < supported_band_list_hrpd.size(); ++i1) { - j.write_str(supported_band_list_hrpd[i1].to_string()); + for (const auto& e1 : supported_band_list_hrpd) { + j.write_str(e1.to_string()); } j.end_array(); j.write_str("tx-ConfigHRPD", tx_cfg_hrpd.to_string()); @@ -102942,8 +102965,8 @@ void irat_params_geran_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandListGERAN"); - for (uint32_t i1 = 0; i1 < supported_band_list_geran.size(); ++i1) { - j.write_str(supported_band_list_geran[i1].to_string()); + for (const auto& e1 : supported_band_list_geran) { + j.write_str(e1.to_string()); } j.end_array(); j.write_bool("interRAT-PS-HO-ToGERAN", inter_rat_ps_ho_to_geran); @@ -103006,8 +103029,8 @@ void irat_params_nr_r15_s::to_json(json_writer& j) const } if (supported_band_list_nr_r15_present) { j.start_array("supportedBandListNR-r15"); - for (uint32_t i1 = 0; i1 < supported_band_list_nr_r15.size(); ++i1) { - supported_band_list_nr_r15[i1].to_json(j); + for (const auto& e1 : supported_band_list_nr_r15) { + e1.to_json(j); } j.end_array(); } @@ -103031,8 +103054,8 @@ void irat_params_utra_fdd_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandListUTRA-FDD"); - for (uint32_t i1 = 0; i1 < supported_band_list_utra_fdd.size(); ++i1) { - j.write_str(supported_band_list_utra_fdd[i1].to_string()); + for (const auto& e1 : supported_band_list_utra_fdd) { + j.write_str(e1.to_string()); } j.end_array(); j.end_obj(); @@ -103055,8 +103078,8 @@ void irat_params_utra_tdd128_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandListUTRA-TDD128"); - for (uint32_t i1 = 0; i1 < supported_band_list_utra_tdd128.size(); ++i1) { - j.write_str(supported_band_list_utra_tdd128[i1].to_string()); + for (const auto& e1 : supported_band_list_utra_tdd128) { + j.write_str(e1.to_string()); } j.end_array(); j.end_obj(); @@ -103079,8 +103102,8 @@ void irat_params_utra_tdd384_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandListUTRA-TDD384"); - for (uint32_t i1 = 0; i1 < supported_band_list_utra_tdd384.size(); ++i1) { - j.write_str(supported_band_list_utra_tdd384[i1].to_string()); + for (const auto& e1 : supported_band_list_utra_tdd384) { + j.write_str(e1.to_string()); } j.end_array(); j.end_obj(); @@ -103103,8 +103126,8 @@ void irat_params_utra_tdd768_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandListUTRA-TDD768"); - for (uint32_t i1 = 0; i1 < supported_band_list_utra_tdd768.size(); ++i1) { - j.write_str(supported_band_list_utra_tdd768[i1].to_string()); + for (const auto& e1 : supported_band_list_utra_tdd768) { + j.write_str(e1.to_string()); } j.end_array(); j.end_obj(); @@ -103136,8 +103159,8 @@ void irat_params_wlan_r13_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_list_wlan_r13_present) { j.start_array("supportedBandListWLAN-r13"); - for (uint32_t i1 = 0; i1 < supported_band_list_wlan_r13.size(); ++i1) { - j.write_str(supported_band_list_wlan_r13[i1].to_string()); + for (const auto& e1 : supported_band_list_wlan_r13) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -103253,8 +103276,8 @@ void mac_params_v1530_s::to_json(json_writer& j) const j.start_obj(); if (min_proc_timeline_subslot_r15_present) { j.start_array("min-Proc-TimelineSubslot-r15"); - for (uint32_t i1 = 0; i1 < min_proc_timeline_subslot_r15.size(); ++i1) { - j.write_str(min_proc_timeline_subslot_r15[i1].to_string()); + for (const auto& e1 : min_proc_timeline_subslot_r15) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -103307,8 +103330,8 @@ void mimo_ue_bf_cap_r13_s::to_json(json_writer& j) const j.write_str("altCodebook-r13", "supported"); } j.start_array("mimo-BeamformedCapabilities-r13"); - for (uint32_t i1 = 0; i1 < mimo_bf_cap_r13.size(); ++i1) { - mimo_bf_cap_r13[i1].to_json(j); + for (const auto& e1 : mimo_bf_cap_r13) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -103635,8 +103658,8 @@ void meas_params_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("bandListEUTRA"); - for (uint32_t i1 = 0; i1 < band_list_eutra.size(); ++i1) { - band_list_eutra[i1].to_json(j); + for (const auto& e1 : band_list_eutra) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -103659,8 +103682,8 @@ void meas_params_v1020_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("bandCombinationListEUTRA-r10"); - for (uint32_t i1 = 0; i1 < band_combination_list_eutra_r10.size(); ++i1) { - band_combination_list_eutra_r10[i1].to_json(j); + for (const auto& e1 : band_combination_list_eutra_r10) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -104010,8 +104033,8 @@ void phy_layer_params_v1020_s::to_json(json_writer& j) const } if (non_contiguous_ul_ra_within_cc_list_r10_present) { j.start_array("nonContiguousUL-RA-WithinCC-List-r10"); - for (uint32_t i1 = 0; i1 < non_contiguous_ul_ra_within_cc_list_r10.size(); ++i1) { - non_contiguous_ul_ra_within_cc_list_r10[i1].to_json(j); + for (const auto& e1 : non_contiguous_ul_ra_within_cc_list_r10) { + e1.to_json(j); } j.end_array(); } @@ -104100,8 +104123,8 @@ void phy_layer_params_v1250_s::to_json(json_writer& j) const } if (naics_cap_list_r12_present) { j.start_array("naics-Capability-List-r12"); - for (uint32_t i1 = 0; i1 < naics_cap_list_r12.size(); ++i1) { - naics_cap_list_r12[i1].to_json(j); + for (const auto& e1 : naics_cap_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -104916,8 +104939,8 @@ void rf_params_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandListEUTRA"); - for (uint32_t i1 = 0; i1 < supported_band_list_eutra.size(); ++i1) { - supported_band_list_eutra[i1].to_json(j); + for (const auto& e1 : supported_band_list_eutra) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -104940,10 +104963,10 @@ void rf_params_v1020_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandCombination-r10"); - for (uint32_t i1 = 0; i1 < supported_band_combination_r10.size(); ++i1) { + for (const auto& e1 : supported_band_combination_r10) { j.start_array(); - for (uint32_t i2 = 0; i2 < supported_band_combination_r10[i1].size(); ++i2) { - supported_band_combination_r10[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -104968,8 +104991,8 @@ void rf_params_v1060_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandCombinationExt-r10"); - for (uint32_t i1 = 0; i1 < supported_band_combination_ext_r10.size(); ++i1) { - supported_band_combination_ext_r10[i1].to_json(j); + for (const auto& e1 : supported_band_combination_ext_r10) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -105002,10 +105025,10 @@ void rf_params_v1090_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_combination_v1090_present) { j.start_array("supportedBandCombination-v1090"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v1090.size(); ++i1) { + for (const auto& e1 : supported_band_combination_v1090) { j.start_array(); - for (uint32_t i2 = 0; i2 < supported_band_combination_v1090[i1].size(); ++i2) { - supported_band_combination_v1090[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -105040,8 +105063,8 @@ void rf_params_v10i0_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_combination_v10i0_present) { j.start_array("supportedBandCombination-v10i0"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v10i0.size(); ++i1) { - supported_band_combination_v10i0[i1].to_json(j); + for (const auto& e1 : supported_band_combination_v10i0) { + e1.to_json(j); } j.end_array(); } @@ -105074,8 +105097,8 @@ void rf_params_v1130_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_combination_v1130_present) { j.start_array("supportedBandCombination-v1130"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v1130.size(); ++i1) { - supported_band_combination_v1130[i1].to_json(j); + for (const auto& e1 : supported_band_combination_v1130) { + e1.to_json(j); } j.end_array(); } @@ -105121,15 +105144,15 @@ void rf_params_v1180_s::to_json(json_writer& j) const } if (requested_bands_r11_present) { j.start_array("requestedBands-r11"); - for (uint32_t i1 = 0; i1 < requested_bands_r11.size(); ++i1) { - j.write_int(requested_bands_r11[i1]); + for (const auto& e1 : requested_bands_r11) { + j.write_int(e1); } j.end_array(); } if (supported_band_combination_add_r11_present) { j.start_array("supportedBandCombinationAdd-r11"); - for (uint32_t i1 = 0; i1 < supported_band_combination_add_r11.size(); ++i1) { - supported_band_combination_add_r11[i1].to_json(j); + for (const auto& e1 : supported_band_combination_add_r11) { + e1.to_json(j); } j.end_array(); } @@ -105162,8 +105185,8 @@ void rf_params_v11d0_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_combination_add_v11d0_present) { j.start_array("supportedBandCombinationAdd-v11d0"); - for (uint32_t i1 = 0; i1 < supported_band_combination_add_v11d0.size(); ++i1) { - supported_band_combination_add_v11d0[i1].to_json(j); + for (const auto& e1 : supported_band_combination_add_v11d0) { + e1.to_json(j); } j.end_array(); } @@ -105241,22 +105264,22 @@ void rf_params_v1250_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_list_eutra_v1250_present) { j.start_array("supportedBandListEUTRA-v1250"); - for (uint32_t i1 = 0; i1 < supported_band_list_eutra_v1250.size(); ++i1) { - supported_band_list_eutra_v1250[i1].to_json(j); + for (const auto& e1 : supported_band_list_eutra_v1250) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_v1250_present) { j.start_array("supportedBandCombination-v1250"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v1250.size(); ++i1) { - supported_band_combination_v1250[i1].to_json(j); + for (const auto& e1 : supported_band_combination_v1250) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_add_v1250_present) { j.start_array("supportedBandCombinationAdd-v1250"); - for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1250.size(); ++i1) { - supported_band_combination_add_v1250[i1].to_json(j); + for (const auto& e1 : supported_band_combination_add_v1250) { + e1.to_json(j); } j.end_array(); } @@ -105300,15 +105323,15 @@ void rf_params_v1270_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_combination_v1270_present) { j.start_array("supportedBandCombination-v1270"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v1270.size(); ++i1) { - supported_band_combination_v1270[i1].to_json(j); + for (const auto& e1 : supported_band_combination_v1270) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_add_v1270_present) { j.start_array("supportedBandCombinationAdd-v1270"); - for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1270.size(); ++i1) { - supported_band_combination_add_v1270[i1].to_json(j); + for (const auto& e1 : supported_band_combination_add_v1270) { + e1.to_json(j); } j.end_array(); } @@ -105429,15 +105452,15 @@ void rf_params_v1310_s::to_json(json_writer& j) const } if (supported_band_list_eutra_v1310_present) { j.start_array("supportedBandListEUTRA-v1310"); - for (uint32_t i1 = 0; i1 < supported_band_list_eutra_v1310.size(); ++i1) { - supported_band_list_eutra_v1310[i1].to_json(j); + for (const auto& e1 : supported_band_list_eutra_v1310) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_reduced_r13_present) { j.start_array("supportedBandCombinationReduced-r13"); - for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_r13.size(); ++i1) { - supported_band_combination_reduced_r13[i1].to_json(j); + for (const auto& e1 : supported_band_combination_reduced_r13) { + e1.to_json(j); } j.end_array(); } @@ -105529,29 +105552,29 @@ void rf_params_v1320_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_list_eutra_v1320_present) { j.start_array("supportedBandListEUTRA-v1320"); - for (uint32_t i1 = 0; i1 < supported_band_list_eutra_v1320.size(); ++i1) { - supported_band_list_eutra_v1320[i1].to_json(j); + for (const auto& e1 : supported_band_list_eutra_v1320) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_v1320_present) { j.start_array("supportedBandCombination-v1320"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v1320.size(); ++i1) { - supported_band_combination_v1320[i1].to_json(j); + for (const auto& e1 : supported_band_combination_v1320) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_add_v1320_present) { j.start_array("supportedBandCombinationAdd-v1320"); - for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1320.size(); ++i1) { - supported_band_combination_add_v1320[i1].to_json(j); + for (const auto& e1 : supported_band_combination_add_v1320) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_reduced_v1320_present) { j.start_array("supportedBandCombinationReduced-v1320"); - for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1320.size(); ++i1) { - supported_band_combination_reduced_v1320[i1].to_json(j); + for (const auto& e1 : supported_band_combination_reduced_v1320) { + e1.to_json(j); } j.end_array(); } @@ -105600,22 +105623,22 @@ void rf_params_v1380_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_combination_v1380_present) { j.start_array("supportedBandCombination-v1380"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v1380.size(); ++i1) { - supported_band_combination_v1380[i1].to_json(j); + for (const auto& e1 : supported_band_combination_v1380) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_add_v1380_present) { j.start_array("supportedBandCombinationAdd-v1380"); - for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1380.size(); ++i1) { - supported_band_combination_add_v1380[i1].to_json(j); + for (const auto& e1 : supported_band_combination_add_v1380) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_reduced_v1380_present) { j.start_array("supportedBandCombinationReduced-v1380"); - for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1380.size(); ++i1) { - supported_band_combination_reduced_v1380[i1].to_json(j); + for (const auto& e1 : supported_band_combination_reduced_v1380) { + e1.to_json(j); } j.end_array(); } @@ -105686,22 +105709,22 @@ void rf_params_v1390_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_combination_v1390_present) { j.start_array("supportedBandCombination-v1390"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v1390.size(); ++i1) { - supported_band_combination_v1390[i1].to_json(j); + for (const auto& e1 : supported_band_combination_v1390) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_add_v1390_present) { j.start_array("supportedBandCombinationAdd-v1390"); - for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1390.size(); ++i1) { - supported_band_combination_add_v1390[i1].to_json(j); + for (const auto& e1 : supported_band_combination_add_v1390) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_reduced_v1390_present) { j.start_array("supportedBandCombinationReduced-v1390"); - for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1390.size(); ++i1) { - supported_band_combination_reduced_v1390[i1].to_json(j); + for (const auto& e1 : supported_band_combination_reduced_v1390) { + e1.to_json(j); } j.end_array(); } @@ -105768,22 +105791,22 @@ void rf_params_v1430_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_combination_v1430_present) { j.start_array("supportedBandCombination-v1430"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v1430.size(); ++i1) { - supported_band_combination_v1430[i1].to_json(j); + for (const auto& e1 : supported_band_combination_v1430) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_add_v1430_present) { j.start_array("supportedBandCombinationAdd-v1430"); - for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1430.size(); ++i1) { - supported_band_combination_add_v1430[i1].to_json(j); + for (const auto& e1 : supported_band_combination_add_v1430) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_reduced_v1430_present) { j.start_array("supportedBandCombinationReduced-v1430"); - for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1430.size(); ++i1) { - supported_band_combination_reduced_v1430[i1].to_json(j); + for (const auto& e1 : supported_band_combination_reduced_v1430) { + e1.to_json(j); } j.end_array(); } @@ -105791,10 +105814,10 @@ void rf_params_v1430_s::to_json(json_writer& j) const j.write_fieldname("eNB-RequestedParameters-v1430"); j.start_obj(); j.start_array("requestedDiffFallbackCombList-r14"); - for (uint32_t i1 = 0; i1 < enb_requested_params_v1430.requested_diff_fallback_comb_list_r14.size(); ++i1) { + for (const auto& e1 : enb_requested_params_v1430.requested_diff_fallback_comb_list_r14) { j.start_array(); - for (uint32_t i2 = 0; i2 < enb_requested_params_v1430.requested_diff_fallback_comb_list_r14[i1].size(); ++i2) { - enb_requested_params_v1430.requested_diff_fallback_comb_list_r14[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -105849,22 +105872,22 @@ void rf_params_v1450_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_combination_v1450_present) { j.start_array("supportedBandCombination-v1450"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v1450.size(); ++i1) { - supported_band_combination_v1450[i1].to_json(j); + for (const auto& e1 : supported_band_combination_v1450) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_add_v1450_present) { j.start_array("supportedBandCombinationAdd-v1450"); - for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1450.size(); ++i1) { - supported_band_combination_add_v1450[i1].to_json(j); + for (const auto& e1 : supported_band_combination_add_v1450) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_reduced_v1450_present) { j.start_array("supportedBandCombinationReduced-v1450"); - for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1450.size(); ++i1) { - supported_band_combination_reduced_v1450[i1].to_json(j); + for (const auto& e1 : supported_band_combination_reduced_v1450) { + e1.to_json(j); } j.end_array(); } @@ -105913,22 +105936,22 @@ void rf_params_v1470_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_combination_v1470_present) { j.start_array("supportedBandCombination-v1470"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v1470.size(); ++i1) { - supported_band_combination_v1470[i1].to_json(j); + for (const auto& e1 : supported_band_combination_v1470) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_add_v1470_present) { j.start_array("supportedBandCombinationAdd-v1470"); - for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1470.size(); ++i1) { - supported_band_combination_add_v1470[i1].to_json(j); + for (const auto& e1 : supported_band_combination_add_v1470) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_reduced_v1470_present) { j.start_array("supportedBandCombinationReduced-v1470"); - for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1470.size(); ++i1) { - supported_band_combination_reduced_v1470[i1].to_json(j); + for (const auto& e1 : supported_band_combination_reduced_v1470) { + e1.to_json(j); } j.end_array(); } @@ -105984,22 +106007,22 @@ void rf_params_v1530_s::to_json(json_writer& j) const } if (supported_band_combination_v1530_present) { j.start_array("supportedBandCombination-v1530"); - for (uint32_t i1 = 0; i1 < supported_band_combination_v1530.size(); ++i1) { - supported_band_combination_v1530[i1].to_json(j); + for (const auto& e1 : supported_band_combination_v1530) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_add_v1530_present) { j.start_array("supportedBandCombinationAdd-v1530"); - for (uint32_t i1 = 0; i1 < supported_band_combination_add_v1530.size(); ++i1) { - supported_band_combination_add_v1530[i1].to_json(j); + for (const auto& e1 : supported_band_combination_add_v1530) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_reduced_v1530_present) { j.start_array("supportedBandCombinationReduced-v1530"); - for (uint32_t i1 = 0; i1 < supported_band_combination_reduced_v1530.size(); ++i1) { - supported_band_combination_reduced_v1530[i1].to_json(j); + for (const auto& e1 : supported_band_combination_reduced_v1530) { + e1.to_json(j); } j.end_array(); } @@ -106065,8 +106088,8 @@ void rf_params_v9e0_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_list_eutra_v9e0_present) { j.start_array("supportedBandListEUTRA-v9e0"); - for (uint32_t i1 = 0; i1 < supported_band_list_eutra_v9e0.size(); ++i1) { - supported_band_list_eutra_v9e0[i1].to_json(j); + for (const auto& e1 : supported_band_list_eutra_v9e0) { + e1.to_json(j); } j.end_array(); } @@ -106148,15 +106171,15 @@ void sl_params_r12_s::to_json(json_writer& j) const } if (comm_supported_bands_r12_present) { j.start_array("commSupportedBands-r12"); - for (uint32_t i1 = 0; i1 < comm_supported_bands_r12.size(); ++i1) { - j.write_int(comm_supported_bands_r12[i1]); + for (const auto& e1 : comm_supported_bands_r12) { + j.write_int(e1); } j.end_array(); } if (disc_supported_bands_r12_present) { j.start_array("discSupportedBands-r12"); - for (uint32_t i1 = 0; i1 < disc_supported_bands_r12.size(); ++i1) { - disc_supported_bands_r12[i1].to_json(j); + for (const auto& e1 : disc_supported_bands_r12) { + e1.to_json(j); } j.end_array(); } @@ -106295,10 +106318,10 @@ void sl_params_v1430_s::to_json(json_writer& j) const } if (v2x_supported_band_combination_list_r14_present) { j.start_array("v2x-SupportedBandCombinationList-r14"); - for (uint32_t i1 = 0; i1 < v2x_supported_band_combination_list_r14.size(); ++i1) { + for (const auto& e1 : v2x_supported_band_combination_list_r14) { j.start_array(); - for (uint32_t i2 = 0; i2 < v2x_supported_band_combination_list_r14[i1].size(); ++i2) { - v2x_supported_band_combination_list_r14[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -106413,10 +106436,10 @@ void sl_params_v1530_s::to_json(json_writer& j) const } if (v2x_supported_band_combination_list_v1530_present) { j.start_array("v2x-SupportedBandCombinationList-v1530"); - for (uint32_t i1 = 0; i1 < v2x_supported_band_combination_list_v1530.size(); ++i1) { + for (const auto& e1 : v2x_supported_band_combination_list_v1530) { j.start_array(); - for (uint32_t i2 = 0; i2 < v2x_supported_band_combination_list_v1530[i1].size(); ++i2) { - v2x_supported_band_combination_list_v1530[i1][i2].to_json(j); + for (const auto& e2 : e1) { + e2.to_json(j); } j.end_array(); } @@ -106526,8 +106549,8 @@ void sps_cfg_dl_stti_r15_c::setup_s_::two_ant_port_activ_r15_c_::to_json(json_wr j.write_fieldname("setup"); j.start_obj(); j.start_array("n1SPUCCH-AN-PersistentListP1-r15"); - for (uint32_t i1 = 0; i1 < c.n1_spucch_an_persistent_list_p1_r15.size(); ++i1) { - j.write_int(c.n1_spucch_an_persistent_list_p1_r15[i1]); + for (const auto& e1 : c.n1_spucch_an_persistent_list_p1_r15) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -113323,8 +113346,8 @@ void as_cfg_s::to_json(json_writer& j) const source_other_cfg_r9->to_json(j); if (source_scell_cfg_list_r10.is_present()) { j.start_array("sourceSCellConfigList-r10"); - for (uint32_t i1 = 0; i1 < source_scell_cfg_list_r10->size(); ++i1) { - ((*source_scell_cfg_list_r10)[i1]).to_json(j); + for (const auto& e1 : *source_scell_cfg_list_r10) { + e1.to_json(j); } j.end_array(); } @@ -113460,8 +113483,8 @@ void as_cfg_v1320_s::to_json(json_writer& j) const j.start_obj(); if (source_scell_cfg_list_r13_present) { j.start_array("sourceSCellConfigList-r13"); - for (uint32_t i1 = 0; i1 < source_scell_cfg_list_r13.size(); ++i1) { - source_scell_cfg_list_r13[i1].to_json(j); + for (const auto& e1 : source_scell_cfg_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -113522,8 +113545,8 @@ void as_cfg_v1430_s::to_json(json_writer& j) const } if (source_wlan_meas_result_r14_present) { j.start_array("sourceWLAN-MeasResult-r14"); - for (uint32_t i1 = 0; i1 < source_wlan_meas_result_r14.size(); ++i1) { - source_wlan_meas_result_r14[i1].to_json(j); + for (const auto& e1 : source_wlan_meas_result_r14) { + e1.to_json(j); } j.end_array(); } @@ -113610,8 +113633,8 @@ void reest_info_s::to_json(json_writer& j) const j.write_str("targetCellShortMAC-I", target_cell_short_mac_i.to_string()); if (add_reestab_info_list_present) { j.start_array("additionalReestabInfoList"); - for (uint32_t i1 = 0; i1 < add_reestab_info_list.size(); ++i1) { - add_reestab_info_list[i1].to_json(j); + for (const auto& e1 : add_reestab_info_list) { + e1.to_json(j); } j.end_array(); } @@ -114155,8 +114178,8 @@ void cells_triggered_list_item_c_::to_json(json_writer& j) const j.write_int("physCellId", c.get().pci); if (c.get().rs_idx_list_r15_present) { j.start_array("rs-IndexList-r15"); - for (uint32_t i1 = 0; i1 < c.get().rs_idx_list_r15.size(); ++i1) { - j.write_int(c.get().rs_idx_list_r15[i1]); + for (const auto& e1 : c.get().rs_idx_list_r15) { + j.write_int(e1); } j.end_array(); } @@ -115109,15 +115132,15 @@ void rrm_cfg_s::to_json(json_writer& j) const if (ext) { if (candidate_cell_info_list_r10.is_present()) { j.start_array("candidateCellInfoList-r10"); - for (uint32_t i1 = 0; i1 < candidate_cell_info_list_r10->size(); ++i1) { - ((*candidate_cell_info_list_r10)[i1]).to_json(j); + for (const auto& e1 : *candidate_cell_info_list_r10) { + e1.to_json(j); } j.end_array(); } if (candidate_cell_info_list_nr_r15.is_present()) { j.start_array("candidateCellInfoListNR-r15"); - for (uint32_t i1 = 0; i1 < candidate_cell_info_list_nr_r15->size(); ++i1) { - ((*candidate_cell_info_list_nr_r15)[i1]).to_json(j); + for (const auto& e1 : *candidate_cell_info_list_nr_r15) { + e1.to_json(j); } j.end_array(); } @@ -115176,8 +115199,8 @@ void ho_prep_info_r8_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("ue-RadioAccessCapabilityInfo"); - for (uint32_t i1 = 0; i1 < ue_radio_access_cap_info.size(); ++i1) { - ue_radio_access_cap_info[i1].to_json(j); + for (const auto& e1 : ue_radio_access_cap_info) { + e1.to_json(j); } j.end_array(); if (as_cfg_present) { @@ -115746,15 +115769,15 @@ void scg_cfg_info_v1530_ies_s::to_json(json_writer& j) const j.start_obj(); if (drb_to_add_mod_list_scg_r15_present) { j.start_array("drb-ToAddModListSCG-r15"); - for (uint32_t i1 = 0; i1 < drb_to_add_mod_list_scg_r15.size(); ++i1) { - drb_to_add_mod_list_scg_r15[i1].to_json(j); + for (const auto& e1 : drb_to_add_mod_list_scg_r15) { + e1.to_json(j); } j.end_array(); } if (drb_to_release_list_scg_r15_present) { j.start_array("drb-ToReleaseListSCG-r15"); - for (uint32_t i1 = 0; i1 < drb_to_release_list_scg_r15.size(); ++i1) { - j.write_int(drb_to_release_list_scg_r15[i1]); + for (const auto& e1 : drb_to_release_list_scg_r15) { + j.write_int(e1); } j.end_array(); } @@ -115848,8 +115871,8 @@ void scg_cfg_info_v1330_ies_s::to_json(json_writer& j) const j.start_obj(); if (meas_result_list_rssi_scg_r13_present) { j.start_array("measResultListRSSI-SCG-r13"); - for (uint32_t i1 = 0; i1 < meas_result_list_rssi_scg_r13.size(); ++i1) { - meas_result_list_rssi_scg_r13[i1].to_json(j); + for (const auto& e1 : meas_result_list_rssi_scg_r13) { + e1.to_json(j); } j.end_array(); } @@ -115930,29 +115953,29 @@ void scg_cfg_info_v1310_ies_s::to_json(json_writer& j) const } if (scell_to_add_mod_list_mcg_ext_r13_present) { j.start_array("sCellToAddModListMCG-Ext-r13"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_mcg_ext_r13.size(); ++i1) { - scell_to_add_mod_list_mcg_ext_r13[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_mcg_ext_r13) { + e1.to_json(j); } j.end_array(); } if (meas_result_serv_cell_list_scg_ext_r13_present) { j.start_array("measResultServCellListSCG-Ext-r13"); - for (uint32_t i1 = 0; i1 < meas_result_serv_cell_list_scg_ext_r13.size(); ++i1) { - meas_result_serv_cell_list_scg_ext_r13[i1].to_json(j); + for (const auto& e1 : meas_result_serv_cell_list_scg_ext_r13) { + e1.to_json(j); } j.end_array(); } if (scell_to_add_mod_list_scg_ext_r13_present) { j.start_array("sCellToAddModListSCG-Ext-r13"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_scg_ext_r13.size(); ++i1) { - scell_to_add_mod_list_scg_ext_r13[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_scg_ext_r13) { + e1.to_json(j); } j.end_array(); } if (scell_to_release_list_scg_ext_r13_present) { j.start_array("sCellToReleaseListSCG-Ext-r13"); - for (uint32_t i1 = 0; i1 < scell_to_release_list_scg_ext_r13.size(); ++i1) { - j.write_int(scell_to_release_list_scg_ext_r13[i1]); + for (const auto& e1 : scell_to_release_list_scg_ext_r13) { + j.write_int(e1); } j.end_array(); } @@ -116128,8 +116151,8 @@ void scg_cfg_info_r12_ies_s::to_json(json_writer& j) const } if (scell_to_add_mod_list_mcg_r12_present) { j.start_array("sCellToAddModListMCG-r12"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_mcg_r12.size(); ++i1) { - scell_to_add_mod_list_mcg_r12[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_mcg_r12) { + e1.to_json(j); } j.end_array(); } @@ -116157,36 +116180,36 @@ void scg_cfg_info_r12_ies_s::to_json(json_writer& j) const } if (meas_result_serv_cell_list_scg_r12_present) { j.start_array("measResultServCellListSCG-r12"); - for (uint32_t i1 = 0; i1 < meas_result_serv_cell_list_scg_r12.size(); ++i1) { - meas_result_serv_cell_list_scg_r12[i1].to_json(j); + for (const auto& e1 : meas_result_serv_cell_list_scg_r12) { + e1.to_json(j); } j.end_array(); } if (drb_to_add_mod_list_scg_r12_present) { j.start_array("drb-ToAddModListSCG-r12"); - for (uint32_t i1 = 0; i1 < drb_to_add_mod_list_scg_r12.size(); ++i1) { - drb_to_add_mod_list_scg_r12[i1].to_json(j); + for (const auto& e1 : drb_to_add_mod_list_scg_r12) { + e1.to_json(j); } j.end_array(); } if (drb_to_release_list_scg_r12_present) { j.start_array("drb-ToReleaseListSCG-r12"); - for (uint32_t i1 = 0; i1 < drb_to_release_list_scg_r12.size(); ++i1) { - j.write_int(drb_to_release_list_scg_r12[i1]); + for (const auto& e1 : drb_to_release_list_scg_r12) { + j.write_int(e1); } j.end_array(); } if (scell_to_add_mod_list_scg_r12_present) { j.start_array("sCellToAddModListSCG-r12"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list_scg_r12.size(); ++i1) { - scell_to_add_mod_list_scg_r12[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list_scg_r12) { + e1.to_json(j); } j.end_array(); } if (scell_to_release_list_scg_r12_present) { j.start_array("sCellToReleaseListSCG-r12"); - for (uint32_t i1 = 0; i1 < scell_to_release_list_scg_r12.size(); ++i1) { - j.write_int(scell_to_release_list_scg_r12[i1]); + for (const auto& e1 : scell_to_release_list_scg_r12) { + j.write_int(e1); } j.end_array(); } @@ -116445,8 +116468,8 @@ void sl_pppp_tx_precfg_idx_r14_s::to_json(json_writer& j) const j.write_int("defaultTxConfigIndex-r14", default_tx_cfg_idx_r14); j.write_int("cbr-ConfigIndex-r14", cbr_cfg_idx_r14); j.start_array("tx-ConfigIndexList-r14"); - for (uint32_t i1 = 0; i1 < tx_cfg_idx_list_r14.size(); ++i1) { - j.write_int(tx_cfg_idx_list_r14[i1]); + for (const auto& e1 : tx_cfg_idx_list_r14) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -116478,8 +116501,8 @@ void sl_pppp_tx_precfg_idx_v1530_s::to_json(json_writer& j) const j.start_obj(); if (mcs_pssch_range_r15_present) { j.start_array("mcs-PSSCH-Range-r15"); - for (uint32_t i1 = 0; i1 < mcs_pssch_range_r15.size(); ++i1) { - mcs_pssch_range_r15[i1].to_json(j); + for (const auto& e1 : mcs_pssch_range_r15) { + e1.to_json(j); } j.end_array(); } @@ -116513,17 +116536,17 @@ void sl_cbr_precfg_tx_cfg_list_r14_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("cbr-RangeCommonConfigList-r14"); - for (uint32_t i1 = 0; i1 < cbr_range_common_cfg_list_r14.size(); ++i1) { + for (const auto& e1 : cbr_range_common_cfg_list_r14) { j.start_array(); - for (uint32_t i2 = 0; i2 < cbr_range_common_cfg_list_r14[i1].size(); ++i2) { - j.write_int(cbr_range_common_cfg_list_r14[i1][i2]); + for (const auto& e2 : e1) { + j.write_int(e2); } j.end_array(); } j.end_array(); j.start_array("sl-CBR-PSSCH-TxConfigList-r14"); - for (uint32_t i1 = 0; i1 < sl_cbr_pssch_tx_cfg_list_r14.size(); ++i1) { - sl_cbr_pssch_tx_cfg_list_r14[i1].to_json(j); + for (const auto& e1 : sl_cbr_pssch_tx_cfg_list_r14) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -116607,8 +116630,8 @@ void sl_precfg_comm_pool_r12_s::to_json(json_writer& j) const if (ext) { if (prio_list_r13.is_present()) { j.start_array("priorityList-r13"); - for (uint32_t i1 = 0; i1 < prio_list_r13->size(); ++i1) { - j.write_int(((*prio_list_r13)[i1])); + for (const auto& e1 : *prio_list_r13) { + j.write_int(e1); } j.end_array(); } @@ -117010,8 +117033,8 @@ void sl_v2x_precfg_comm_pool_r14_s::to_json(json_writer& j) const } if (cbr_pssch_tx_cfg_list_r14_present) { j.start_array("cbr-pssch-TxConfigList-r14"); - for (uint32_t i1 = 0; i1 < cbr_pssch_tx_cfg_list_r14.size(); ++i1) { - cbr_pssch_tx_cfg_list_r14[i1].to_json(j); + for (const auto& e1 : cbr_pssch_tx_cfg_list_r14) { + e1.to_json(j); } j.end_array(); } @@ -117025,23 +117048,23 @@ void sl_v2x_precfg_comm_pool_r14_s::to_json(json_writer& j) const } if (restrict_res_reserv_period_r14_present) { j.start_array("restrictResourceReservationPeriod-r14"); - for (uint32_t i1 = 0; i1 < restrict_res_reserv_period_r14.size(); ++i1) { - j.write_str(restrict_res_reserv_period_r14[i1].to_string()); + for (const auto& e1 : restrict_res_reserv_period_r14) { + j.write_str(e1.to_string()); } j.end_array(); } if (ext) { if (sl_min_t2_value_list_r15.is_present()) { j.start_array("sl-MinT2ValueList-r15"); - for (uint32_t i1 = 0; i1 < sl_min_t2_value_list_r15->size(); ++i1) { - ((*sl_min_t2_value_list_r15)[i1]).to_json(j); + for (const auto& e1 : *sl_min_t2_value_list_r15) { + e1.to_json(j); } j.end_array(); } if (cbr_pssch_tx_cfg_list_v1530.is_present()) { j.start_array("cbr-pssch-TxConfigList-v1530"); - for (uint32_t i1 = 0; i1 < cbr_pssch_tx_cfg_list_v1530->size(); ++i1) { - ((*cbr_pssch_tx_cfg_list_v1530)[i1]).to_json(j); + for (const auto& e1 : *cbr_pssch_tx_cfg_list_v1530) { + e1.to_json(j); } j.end_array(); } @@ -117243,8 +117266,8 @@ void sl_precfg_r12_s::to_json(json_writer& j) const j.write_fieldname("preconfigSync-r12"); precfg_sync_r12.to_json(j); j.start_array("preconfigComm-r12"); - for (uint32_t i1 = 0; i1 < precfg_comm_r12.size(); ++i1) { - precfg_comm_r12[i1].to_json(j); + for (const auto& e1 : precfg_comm_r12) { + e1.to_json(j); } j.end_array(); if (ext) { @@ -117252,14 +117275,14 @@ void sl_precfg_r12_s::to_json(json_writer& j) const j.write_fieldname("preconfigComm-v1310"); j.start_obj(); j.start_array("commRxPoolList-r13"); - for (uint32_t i1 = 0; i1 < precfg_comm_v1310->comm_rx_pool_list_r13.size(); ++i1) { - precfg_comm_v1310->comm_rx_pool_list_r13[i1].to_json(j); + for (const auto& e1 : precfg_comm_v1310->comm_rx_pool_list_r13) { + e1.to_json(j); } j.end_array(); if (precfg_comm_v1310->comm_tx_pool_list_r13_present) { j.start_array("commTxPoolList-r13"); - for (uint32_t i1 = 0; i1 < precfg_comm_v1310->comm_tx_pool_list_r13.size(); ++i1) { - precfg_comm_v1310->comm_tx_pool_list_r13[i1].to_json(j); + for (const auto& e1 : precfg_comm_v1310->comm_tx_pool_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -117269,14 +117292,14 @@ void sl_precfg_r12_s::to_json(json_writer& j) const j.write_fieldname("preconfigDisc-r13"); j.start_obj(); j.start_array("discRxPoolList-r13"); - for (uint32_t i1 = 0; i1 < precfg_disc_r13->disc_rx_pool_list_r13.size(); ++i1) { - precfg_disc_r13->disc_rx_pool_list_r13[i1].to_json(j); + for (const auto& e1 : precfg_disc_r13->disc_rx_pool_list_r13) { + e1.to_json(j); } j.end_array(); if (precfg_disc_r13->disc_tx_pool_list_r13_present) { j.start_array("discTxPoolList-r13"); - for (uint32_t i1 = 0; i1 < precfg_disc_r13->disc_tx_pool_list_r13.size(); ++i1) { - precfg_disc_r13->disc_tx_pool_list_r13[i1].to_json(j); + for (const auto& e1 : precfg_disc_r13->disc_tx_pool_list_r13) { + e1.to_json(j); } j.end_array(); } @@ -117394,18 +117417,18 @@ void sl_v2x_precfg_freq_info_r14_s::to_json(json_writer& j) const v2x_comm_precfg_sync_r14.to_json(j); } j.start_array("v2x-CommRxPoolList-r14"); - for (uint32_t i1 = 0; i1 < v2x_comm_rx_pool_list_r14.size(); ++i1) { - v2x_comm_rx_pool_list_r14[i1].to_json(j); + for (const auto& e1 : v2x_comm_rx_pool_list_r14) { + e1.to_json(j); } j.end_array(); j.start_array("v2x-CommTxPoolList-r14"); - for (uint32_t i1 = 0; i1 < v2x_comm_tx_pool_list_r14.size(); ++i1) { - v2x_comm_tx_pool_list_r14[i1].to_json(j); + for (const auto& e1 : v2x_comm_tx_pool_list_r14) { + e1.to_json(j); } j.end_array(); j.start_array("p2x-CommTxPoolList-r14"); - for (uint32_t i1 = 0; i1 < p2x_comm_tx_pool_list_r14.size(); ++i1) { - p2x_comm_tx_pool_list_r14[i1].to_json(j); + for (const auto& e1 : p2x_comm_tx_pool_list_r14) { + e1.to_json(j); } j.end_array(); if (v2x_res_sel_cfg_r14_present) { @@ -117426,8 +117449,8 @@ void sl_v2x_precfg_freq_info_r14_s::to_json(json_writer& j) const if (ext) { if (v2x_freq_sel_cfg_list_r15.is_present()) { j.start_array("v2x-FreqSelectionConfigList-r15"); - for (uint32_t i1 = 0; i1 < v2x_freq_sel_cfg_list_r15->size(); ++i1) { - ((*v2x_freq_sel_cfg_list_r15)[i1]).to_json(j); + for (const auto& e1 : *v2x_freq_sel_cfg_list_r15) { + e1.to_json(j); } j.end_array(); } @@ -117526,14 +117549,14 @@ void sl_v2x_precfg_r14_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("v2x-PreconfigFreqList-r14"); - for (uint32_t i1 = 0; i1 < v2x_precfg_freq_list_r14.size(); ++i1) { - v2x_precfg_freq_list_r14[i1].to_json(j); + for (const auto& e1 : v2x_precfg_freq_list_r14) { + e1.to_json(j); } j.end_array(); if (anchor_carrier_freq_list_r14_present) { j.start_array("anchorCarrierFreqList-r14"); - for (uint32_t i1 = 0; i1 < anchor_carrier_freq_list_r14.size(); ++i1) { - j.write_int(anchor_carrier_freq_list_r14[i1]); + for (const auto& e1 : anchor_carrier_freq_list_r14) { + j.write_int(e1); } j.end_array(); } @@ -117548,8 +117571,8 @@ void sl_v2x_precfg_r14_s::to_json(json_writer& j) const } if (sync_freq_list_r15.is_present()) { j.start_array("syncFreqList-r15"); - for (uint32_t i1 = 0; i1 < sync_freq_list_r15->size(); ++i1) { - j.write_int(((*sync_freq_list_r15)[i1])); + for (const auto& e1 : *sync_freq_list_r15) { + j.write_int(e1); } j.end_array(); } @@ -117558,8 +117581,8 @@ void sl_v2x_precfg_r14_s::to_json(json_writer& j) const } if (v2x_tx_profile_list_r15.is_present()) { j.start_array("v2x-TxProfileList-r15"); - for (uint32_t i1 = 0; i1 < v2x_tx_profile_list_r15->size(); ++i1) { - j.write_str(((*v2x_tx_profile_list_r15)[i1]).to_string()); + for (const auto& e1 : *v2x_tx_profile_list_r15) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -118101,8 +118124,8 @@ void ue_radio_paging_info_v1310_ies_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_list_eutra_for_paging_r13_present) { j.start_array("supportedBandListEUTRAForPaging-r13"); - for (uint32_t i1 = 0; i1 < supported_band_list_eutra_for_paging_r13.size(); ++i1) { - j.write_int(supported_band_list_eutra_for_paging_r13[i1]); + for (const auto& e1 : supported_band_list_eutra_for_paging_r13) { + j.write_int(e1); } j.end_array(); } @@ -118534,8 +118557,8 @@ void var_log_meas_cfg_r12_s::to_json(json_writer& j) const j.write_str("loggingInterval-r10", logging_interv_r10.to_string()); if (target_mbsfn_area_list_r12_present) { j.start_array("targetMBSFN-AreaList-r12"); - for (uint32_t i1 = 0; i1 < target_mbsfn_area_list_r12.size(); ++i1) { - target_mbsfn_area_list_r12[i1].to_json(j); + for (const auto& e1 : target_mbsfn_area_list_r12) { + e1.to_json(j); } j.end_array(); } @@ -118614,22 +118637,22 @@ void var_log_meas_cfg_r15_s::to_json(json_writer& j) const j.write_str("loggingInterval-r10", logging_interv_r10.to_string()); if (target_mbsfn_area_list_r12_present) { j.start_array("targetMBSFN-AreaList-r12"); - for (uint32_t i1 = 0; i1 < target_mbsfn_area_list_r12.size(); ++i1) { - target_mbsfn_area_list_r12[i1].to_json(j); + for (const auto& e1 : target_mbsfn_area_list_r12) { + e1.to_json(j); } j.end_array(); } if (bt_name_list_r15_present) { j.start_array("bt-NameList-r15"); - for (uint32_t i1 = 0; i1 < bt_name_list_r15.size(); ++i1) { - j.write_str(bt_name_list_r15[i1].to_string()); + for (const auto& e1 : bt_name_list_r15) { + j.write_str(e1.to_string()); } j.end_array(); } if (wlan_name_list_r15_present) { j.start_array("wlan-NameList-r15"); - for (uint32_t i1 = 0; i1 < wlan_name_list_r15.size(); ++i1) { - j.write_str(wlan_name_list_r15[i1].to_string()); + for (const auto& e1 : wlan_name_list_r15) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -118670,8 +118693,8 @@ void var_log_meas_report_r10_s::to_json(json_writer& j) const plmn_id_r10.to_json(j); j.write_str("absoluteTimeInfo-r10", absolute_time_info_r10.to_string()); j.start_array("logMeasInfoList-r10"); - for (uint32_t i1 = 0; i1 < log_meas_info_list_r10.size(); ++i1) { - log_meas_info_list_r10[i1].to_json(j); + for (const auto& e1 : log_meas_info_list_r10) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -118708,14 +118731,14 @@ void var_log_meas_report_r11_s::to_json(json_writer& j) const j.write_str("traceRecordingSessionRef-r10", trace_recording_session_ref_r10.to_string()); j.write_str("tce-Id-r10", tce_id_r10.to_string()); j.start_array("plmn-IdentityList-r11"); - for (uint32_t i1 = 0; i1 < plmn_id_list_r11.size(); ++i1) { - plmn_id_list_r11[i1].to_json(j); + for (const auto& e1 : plmn_id_list_r11) { + e1.to_json(j); } j.end_array(); j.write_str("absoluteTimeInfo-r10", absolute_time_info_r10.to_string()); j.start_array("logMeasInfoList-r10"); - for (uint32_t i1 = 0; i1 < log_meas_info_list_r10.size(); ++i1) { - log_meas_info_list_r10[i1].to_json(j); + for (const auto& e1 : log_meas_info_list_r10) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -118843,57 +118866,57 @@ void var_meas_cfg_s::to_json(json_writer& j) const j.start_obj(); if (meas_id_list_present) { j.start_array("measIdList"); - for (uint32_t i1 = 0; i1 < meas_id_list.size(); ++i1) { - meas_id_list[i1].to_json(j); + for (const auto& e1 : meas_id_list) { + e1.to_json(j); } j.end_array(); } if (meas_id_list_ext_r12_present) { j.start_array("measIdListExt-r12"); - for (uint32_t i1 = 0; i1 < meas_id_list_ext_r12.size(); ++i1) { - meas_id_list_ext_r12[i1].to_json(j); + for (const auto& e1 : meas_id_list_ext_r12) { + e1.to_json(j); } j.end_array(); } if (meas_id_list_v1310_present) { j.start_array("measIdList-v1310"); - for (uint32_t i1 = 0; i1 < meas_id_list_v1310.size(); ++i1) { - meas_id_list_v1310[i1].to_json(j); + for (const auto& e1 : meas_id_list_v1310) { + e1.to_json(j); } j.end_array(); } if (meas_id_list_ext_v1310_present) { j.start_array("measIdListExt-v1310"); - for (uint32_t i1 = 0; i1 < meas_id_list_ext_v1310.size(); ++i1) { - meas_id_list_ext_v1310[i1].to_json(j); + for (const auto& e1 : meas_id_list_ext_v1310) { + e1.to_json(j); } j.end_array(); } if (meas_obj_list_present) { j.start_array("measObjectList"); - for (uint32_t i1 = 0; i1 < meas_obj_list.size(); ++i1) { - meas_obj_list[i1].to_json(j); + for (const auto& e1 : meas_obj_list) { + e1.to_json(j); } j.end_array(); } if (meas_obj_list_ext_r13_present) { j.start_array("measObjectListExt-r13"); - for (uint32_t i1 = 0; i1 < meas_obj_list_ext_r13.size(); ++i1) { - meas_obj_list_ext_r13[i1].to_json(j); + for (const auto& e1 : meas_obj_list_ext_r13) { + e1.to_json(j); } j.end_array(); } if (meas_obj_list_v9i0_present) { j.start_array("measObjectList-v9i0"); - for (uint32_t i1 = 0; i1 < meas_obj_list_v9i0.size(); ++i1) { - meas_obj_list_v9i0[i1].to_json(j); + for (const auto& e1 : meas_obj_list_v9i0) { + e1.to_json(j); } j.end_array(); } if (report_cfg_list_present) { j.start_array("reportConfigList"); - for (uint32_t i1 = 0; i1 < report_cfg_list.size(); ++i1) { - report_cfg_list[i1].to_json(j); + for (const auto& e1 : report_cfg_list) { + e1.to_json(j); } j.end_array(); } @@ -119004,8 +119027,8 @@ void var_meas_idle_cfg_r15_s::to_json(json_writer& j) const j.start_obj(); if (meas_idle_carrier_list_eutra_r15_present) { j.start_array("measIdleCarrierListEUTRA-r15"); - for (uint32_t i1 = 0; i1 < meas_idle_carrier_list_eutra_r15.size(); ++i1) { - meas_idle_carrier_list_eutra_r15[i1].to_json(j); + for (const auto& e1 : meas_idle_carrier_list_eutra_r15) { + e1.to_json(j); } j.end_array(); } @@ -119030,8 +119053,8 @@ void var_meas_idle_report_r15_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("measReportIdle-r15"); - for (uint32_t i1 = 0; i1 < meas_report_idle_r15.size(); ++i1) { - meas_report_idle_r15[i1].to_json(j); + for (const auto& e1 : meas_report_idle_r15) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -119095,22 +119118,22 @@ void var_meas_report_s::to_json(json_writer& j) const } if (cells_triggered_list_present) { j.start_array("cellsTriggeredList"); - for (uint32_t i1 = 0; i1 < cells_triggered_list.size(); ++i1) { - cells_triggered_list[i1].to_json(j); + for (const auto& e1 : cells_triggered_list) { + e1.to_json(j); } j.end_array(); } if (csi_rs_triggered_list_r12_present) { j.start_array("csi-RS-TriggeredList-r12"); - for (uint32_t i1 = 0; i1 < csi_rs_triggered_list_r12.size(); ++i1) { - j.write_int(csi_rs_triggered_list_r12[i1]); + for (const auto& e1 : csi_rs_triggered_list_r12) { + j.write_int(e1); } j.end_array(); } if (pools_triggered_list_r14_present) { j.start_array("poolsTriggeredList-r14"); - for (uint32_t i1 = 0; i1 < pools_triggered_list_r14.size(); ++i1) { - j.write_int(pools_triggered_list_r14[i1]); + for (const auto& e1 : pools_triggered_list_r14) { + j.write_int(e1); } j.end_array(); } @@ -119164,8 +119187,8 @@ void var_rlf_report_r11_s::to_json(json_writer& j) const j.write_fieldname("rlf-Report-r10"); rlf_report_r10.to_json(j); j.start_array("plmn-IdentityList-r11"); - for (uint32_t i1 = 0; i1 < plmn_id_list_r11.size(); ++i1) { - plmn_id_list_r11[i1].to_json(j); + for (const auto& e1 : plmn_id_list_r11) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -119288,8 +119311,8 @@ void var_wlan_mob_cfg_s::to_json(json_writer& j) const j.start_obj(); if (wlan_mob_set_r13_present) { j.start_array("wlan-MobilitySet-r13"); - for (uint32_t i1 = 0; i1 < wlan_mob_set_r13.size(); ++i1) { - wlan_mob_set_r13[i1].to_json(j); + for (const auto& e1 : wlan_mob_set_r13) { + e1.to_json(j); } j.end_array(); } diff --git a/lib/src/asn1/rrc_asn1_enum.cc b/lib/src/asn1/rrc_asn1_enum.cc index 97821afd9..342b84859 100644 --- a/lib/src/asn1/rrc_asn1_enum.cc +++ b/lib/src/asn1/rrc_asn1_enum.cc @@ -24,6 +24,7 @@ using namespace asn1; using namespace asn1::rrc; +using srslte::logmap; /******************************************************************************* * Logging Utilities @@ -31,8 +32,8 @@ using namespace asn1::rrc; static void invalid_enum_number(int value, const char* name) { - rrc_log_print( - LOG_LEVEL_ERROR, "The provided enum value=%d of type %s cannot be translated into a number\n", value, name); + logmap::get("ASN1::RRC") + ->error("The provided enum value=%d of type %s cannot be translated into a number\n", value, name); } /******************************************************************************* @@ -41,63 +42,63 @@ static void invalid_enum_number(int value, const char* name) std::string phich_cfg_s::phich_dur_opts::to_string() const { - static constexpr const char* options[] = {"normal", "extended"}; + static const char* options[] = {"normal", "extended"}; return convert_enum_idx(options, 2, value, "phich_cfg_s::phich_dur_e_"); } std::string phich_cfg_s::phich_res_opts::to_string() const { - static constexpr const char* options[] = {"oneSixth", "half", "one", "two"}; + static const char* options[] = {"oneSixth", "half", "one", "two"}; return convert_enum_idx(options, 4, value, "phich_cfg_s::phich_res_e_"); } float phich_cfg_s::phich_res_opts::to_number() const { - static constexpr float options[] = {0.16666666666666666, 0.5, 1.0, 2.0}; - return convert_enum_idx(options, 4, value, "phich_cfg_s::phich_res_e_"); + static const float options[] = {0.16666666666666666, 0.5, 1.0, 2.0}; + return map_enum_number(options, 4, value, "phich_cfg_s::phich_res_e_"); } std::string phich_cfg_s::phich_res_opts::to_number_string() const { - static constexpr const char* options[] = {"1/6", "0.5", "1", "2"}; + static const char* options[] = {"1/6", "0.5", "1", "2"}; return convert_enum_idx(options, 4, value, "phich_cfg_s::phich_res_e_"); } std::string mib_s::dl_bw_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx(options, 6, value, "mib_s::dl_bw_e_"); } uint8_t mib_s::dl_bw_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "mib_s::dl_bw_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "mib_s::dl_bw_e_"); } std::string mib_mbms_r14_s::dl_bw_mbms_r14_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx(options, 6, value, "mib_mbms_r14_s::dl_bw_mbms_r14_e_"); } uint8_t mib_mbms_r14_s::dl_bw_mbms_r14_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "mib_mbms_r14_s::dl_bw_mbms_r14_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "mib_mbms_r14_s::dl_bw_mbms_r14_e_"); } std::string gnss_id_r15_s::gnss_id_r15_opts::to_string() const { - static constexpr const char* options[] = {"gps", "sbas", "qzss", "galileo", "glonass", "bds"}; + static const char* options[] = {"gps", "sbas", "qzss", "galileo", "glonass", "bds"}; return convert_enum_idx(options, 6, value, "gnss_id_r15_s::gnss_id_r15_e_"); } std::string sbas_id_r15_s::sbas_id_r15_opts::to_string() const { - static constexpr const char* options[] = {"waas", "egnos", "msas", "gagan"}; + static const char* options[] = {"waas", "egnos", "msas", "gagan"}; return convert_enum_idx(options, 4, value, "sbas_id_r15_s::sbas_id_r15_e_"); } std::string pos_sib_type_r15_s::pos_sib_type_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "posSibType1-1", "posSibType1-2", "posSibType1-3", "posSibType1-4", "posSibType1-5", "posSibType1-6", "posSibType1-7", "posSibType2-1", "posSibType2-2", "posSibType2-3", "posSibType2-4", "posSibType2-5", "posSibType2-6", "posSibType2-7", "posSibType2-8", "posSibType2-9", "posSibType2-10", "posSibType2-11", @@ -108,174 +109,174 @@ std::string pos_sib_type_r15_s::pos_sib_type_r15_opts::to_string() const std::string plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"plmn-Identity-r15", "plmn-Index-r15"}; + static const char* options[] = {"plmn-Identity-r15", "plmn-Index-r15"}; return convert_enum_idx(options, 2, value, "plmn_id_info_r15_s::plmn_id_minus5_gc_r15_c_::types"); } std::string plmn_id_info_r15_s::cell_reserved_for_oper_r15_opts::to_string() const { - static constexpr const char* options[] = {"reserved", "notReserved"}; + static const char* options[] = {"reserved", "notReserved"}; return convert_enum_idx(options, 2, value, "plmn_id_info_r15_s::cell_reserved_for_oper_r15_e_"); } std::string plmn_id_info_r15_s::cell_reserved_for_oper_crs_r15_opts::to_string() const { - static constexpr const char* options[] = {"reserved", "notReserved"}; + static const char* options[] = {"reserved", "notReserved"}; return convert_enum_idx(options, 2, value, "plmn_id_info_r15_s::cell_reserved_for_oper_crs_r15_e_"); } std::string cell_id_minus5_gc_r15_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellIdentity-r15", "cellId-Index-r15"}; + static const char* options[] = {"cellIdentity-r15", "cellId-Index-r15"}; return convert_enum_idx(options, 2, value, "cell_id_minus5_gc_r15_c::types"); } std::string plmn_id_info_v1530_s::cell_reserved_for_oper_crs_r15_opts::to_string() const { - static constexpr const char* options[] = {"reserved", "notReserved"}; + static const char* options[] = {"reserved", "notReserved"}; return convert_enum_idx(options, 2, value, "plmn_id_info_v1530_s::cell_reserved_for_oper_crs_r15_e_"); } std::string pos_sched_info_r15_s::pos_si_periodicity_r15_opts::to_string() const { - static constexpr const char* options[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; + static const char* options[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; return convert_enum_idx(options, 7, value, "pos_sched_info_r15_s::pos_si_periodicity_r15_e_"); } uint16_t pos_sched_info_r15_s::pos_si_periodicity_r15_opts::to_number() const { - static constexpr uint16_t options[] = {8, 16, 32, 64, 128, 256, 512}; - return convert_enum_idx(options, 7, value, "pos_sched_info_r15_s::pos_si_periodicity_r15_e_"); + static const uint16_t options[] = {8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(options, 7, value, "pos_sched_info_r15_s::pos_si_periodicity_r15_e_"); } std::string cell_sel_info_ce_v1530_s::pwr_class14dbm_offset_r15_opts::to_string() const { - static constexpr const char* options[] = {"dB-6", "dB-3", "dB3", "dB6", "dB9", "dB12"}; + static const char* options[] = {"dB-6", "dB-3", "dB3", "dB6", "dB9", "dB12"}; return convert_enum_idx(options, 6, value, "cell_sel_info_ce_v1530_s::pwr_class14dbm_offset_r15_e_"); } int8_t cell_sel_info_ce_v1530_s::pwr_class14dbm_offset_r15_opts::to_number() const { - static constexpr int8_t options[] = {-6, -3, 3, 6, 9, 12}; - return convert_enum_idx(options, 6, value, "cell_sel_info_ce_v1530_s::pwr_class14dbm_offset_r15_e_"); + static const int8_t options[] = {-6, -3, 3, 6, 9, 12}; + return map_enum_number(options, 6, value, "cell_sel_info_ce_v1530_s::pwr_class14dbm_offset_r15_e_"); } std::string plmn_id_info_s::cell_reserved_for_oper_opts::to_string() const { - static constexpr const char* options[] = {"reserved", "notReserved"}; + static const char* options[] = {"reserved", "notReserved"}; return convert_enum_idx(options, 2, value, "plmn_id_info_s::cell_reserved_for_oper_e_"); } std::string sl_tx_pwr_r14_c::types_opts::to_string() const { - static constexpr const char* options[] = {"minusinfinity-r14", "txPower-r14"}; + static const char* options[] = {"minusinfinity-r14", "txPower-r14"}; return convert_enum_idx(options, 2, value, "sl_tx_pwr_r14_c::types"); } int8_t sl_tx_pwr_r14_c::types_opts::to_number() const { - static constexpr int8_t options[] = {-1}; - return convert_enum_idx(options, 1, value, "sl_tx_pwr_r14_c::types"); + static const int8_t options[] = {-1}; + return map_enum_number(options, 1, value, "sl_tx_pwr_r14_c::types"); } // Alpha-r12 ::= ENUMERATED std::string alpha_r12_opts::to_string() const { - static constexpr const char* options[] = {"al0", "al04", "al05", "al06", "al07", "al08", "al09", "al1"}; + static const char* options[] = {"al0", "al04", "al05", "al06", "al07", "al08", "al09", "al1"}; return convert_enum_idx(options, 8, value, "alpha_r12_e"); } float alpha_r12_opts::to_number() const { - static constexpr float options[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; - return convert_enum_idx(options, 8, value, "alpha_r12_e"); + static const float options[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; + return map_enum_number(options, 8, value, "alpha_r12_e"); } std::string alpha_r12_opts::to_number_string() const { - static constexpr const char* options[] = {"0", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"}; + static const char* options[] = {"0", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"}; return convert_enum_idx(options, 8, value, "alpha_r12_e"); } std::string sl_pssch_tx_params_r14_s::allowed_retx_num_pssch_r14_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1", "both", "spare1"}; + static const char* options[] = {"n0", "n1", "both", "spare1"}; return convert_enum_idx(options, 4, value, "sl_pssch_tx_params_r14_s::allowed_retx_num_pssch_r14_e_"); } uint8_t sl_pssch_tx_params_r14_s::allowed_retx_num_pssch_r14_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "sl_pssch_tx_params_r14_s::allowed_retx_num_pssch_r14_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "sl_pssch_tx_params_r14_s::allowed_retx_num_pssch_r14_e_"); } // SL-RestrictResourceReservationPeriod-r14 ::= ENUMERATED std::string sl_restrict_res_reserv_period_r14_opts::to_string() const { - static constexpr const char* options[] = {"v0dot2", - "v0dot5", - "v1", - "v2", - "v3", - "v4", - "v5", - "v6", - "v7", - "v8", - "v9", - "v10", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"v0dot2", + "v0dot5", + "v1", + "v2", + "v3", + "v4", + "v5", + "v6", + "v7", + "v8", + "v9", + "v10", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "sl_restrict_res_reserv_period_r14_e"); } float sl_restrict_res_reserv_period_r14_opts::to_number() const { - static constexpr float options[] = {0.2, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; - return convert_enum_idx(options, 12, value, "sl_restrict_res_reserv_period_r14_e"); + static const float options[] = {0.2, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + return map_enum_number(options, 12, value, "sl_restrict_res_reserv_period_r14_e"); } std::string sl_restrict_res_reserv_period_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"0.2", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; + static const char* options[] = {"0.2", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; return convert_enum_idx(options, 16, value, "sl_restrict_res_reserv_period_r14_e"); } // SL-TypeTxSync-r14 ::= ENUMERATED std::string sl_type_tx_sync_r14_opts::to_string() const { - static constexpr const char* options[] = {"gnss", "enb", "ue"}; + static const char* options[] = {"gnss", "enb", "ue"}; return convert_enum_idx(options, 3, value, "sl_type_tx_sync_r14_e"); } std::string sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n24"}; + static const char* options[] = {"n6", "n24"}; return convert_enum_idx( options, 2, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_e_"); } uint8_t sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_opts::to_number() const { - static constexpr uint8_t options[] = {6, 24}; - return convert_enum_idx( + static const uint8_t options[] = {6, 24}; + return map_enum_number( options, 2, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::crs_intf_mitig_num_prbs_r15_e_"); } std::string sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"crs-IntfMitigEnabled-15", "crs-IntfMitigNumPRBs-r15"}; + static const char* options[] = {"crs-IntfMitigEnabled-15", "crs-IntfMitigNumPRBs-r15"}; return convert_enum_idx(options, 2, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types"); } int8_t sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types_opts::to_number() const { - static constexpr int8_t options[] = {-15}; - return convert_enum_idx(options, 1, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types"); + static const int8_t options[] = {-15}; + return map_enum_number(options, 1, value, "sib_type1_v1530_ies_s::crs_intf_mitig_cfg_r15_c_::types"); } std::string sib_type1_v1530_ies_s::cell_barred_crs_r15_opts::to_string() const { - static constexpr const char* options[] = {"barred", "notBarred"}; + static const char* options[] = {"barred", "notBarred"}; return convert_enum_idx(options, 2, value, "sib_type1_v1530_ies_s::cell_barred_crs_r15_e_"); } std::string sib_type1_v1530_ies_s::cell_access_related_info_minus5_gc_r15_s_::cell_barred_minus5_gc_r15_opts::to_string() const { - static constexpr const char* options[] = {"barred", "notBarred"}; + static const char* options[] = {"barred", "notBarred"}; return convert_enum_idx( options, 2, @@ -286,7 +287,7 @@ sib_type1_v1530_ies_s::cell_access_related_info_minus5_gc_r15_s_::cell_barred_mi std::string sib_type1_v1530_ies_s::cell_access_related_info_minus5_gc_r15_s_::cell_barred_minus5_gc_crs_r15_opts::to_string() const { - static constexpr const char* options[] = {"barred", "notBarred"}; + static const char* options[] = {"barred", "notBarred"}; return convert_enum_idx( options, 2, @@ -297,390 +298,387 @@ sib_type1_v1530_ies_s::cell_access_related_info_minus5_gc_r15_s_::cell_barred_mi // SL-CP-Len-r12 ::= ENUMERATED std::string sl_cp_len_r12_opts::to_string() const { - static constexpr const char* options[] = {"normal", "extended"}; + static const char* options[] = {"normal", "extended"}; return convert_enum_idx(options, 2, value, "sl_cp_len_r12_e"); } std::string sl_offset_ind_r12_c::types_opts::to_string() const { - static constexpr const char* options[] = {"small-r12", "large-r12"}; + static const char* options[] = {"small-r12", "large-r12"}; return convert_enum_idx(options, 2, value, "sl_offset_ind_r12_c::types"); } std::string sl_pssch_tx_cfg_r14_s::thres_ue_speed_r14_opts::to_string() const { - static constexpr const char* options[] = { - "kmph60", "kmph80", "kmph100", "kmph120", "kmph140", "kmph160", "kmph180", "kmph200"}; + static const char* options[] = {"kmph60", "kmph80", "kmph100", "kmph120", "kmph140", "kmph160", "kmph180", "kmph200"}; return convert_enum_idx(options, 8, value, "sl_pssch_tx_cfg_r14_s::thres_ue_speed_r14_e_"); } uint8_t sl_pssch_tx_cfg_r14_s::thres_ue_speed_r14_opts::to_number() const { - static constexpr uint8_t options[] = {60, 80, 100, 120, 140, 160, 180, 200}; - return convert_enum_idx(options, 8, value, "sl_pssch_tx_cfg_r14_s::thres_ue_speed_r14_e_"); + static const uint8_t options[] = {60, 80, 100, 120, 140, 160, 180, 200}; + return map_enum_number(options, 8, value, "sl_pssch_tx_cfg_r14_s::thres_ue_speed_r14_e_"); } std::string sf_bitmap_sl_r12_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "bs4-r12", "bs8-r12", "bs12-r12", "bs16-r12", "bs30-r12", "bs40-r12", "bs42-r12"}; + static const char* options[] = {"bs4-r12", "bs8-r12", "bs12-r12", "bs16-r12", "bs30-r12", "bs40-r12", "bs42-r12"}; return convert_enum_idx(options, 7, value, "sf_bitmap_sl_r12_c::types"); } uint8_t sf_bitmap_sl_r12_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 12, 16, 30, 40, 42}; - return convert_enum_idx(options, 7, value, "sf_bitmap_sl_r12_c::types"); + static const uint8_t options[] = {4, 8, 12, 16, 30, 40, 42}; + return map_enum_number(options, 7, value, "sf_bitmap_sl_r12_c::types"); } std::string sf_bitmap_sl_r14_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "bs10-r14", "bs16-r14", "bs20-r14", "bs30-r14", "bs40-r14", "bs50-r14", "bs60-r14", "bs100-r14"}; return convert_enum_idx(options, 8, value, "sf_bitmap_sl_r14_c::types"); } uint8_t sf_bitmap_sl_r14_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {10, 16, 20, 30, 40, 50, 60, 100}; - return convert_enum_idx(options, 8, value, "sf_bitmap_sl_r14_c::types"); + static const uint8_t options[] = {10, 16, 20, 30, 40, 50, 60, 100}; + return map_enum_number(options, 8, value, "sf_bitmap_sl_r14_c::types"); } std::string tdd_cfg_s::sf_assign_opts::to_string() const { - static constexpr const char* options[] = {"sa0", "sa1", "sa2", "sa3", "sa4", "sa5", "sa6"}; + static const char* options[] = {"sa0", "sa1", "sa2", "sa3", "sa4", "sa5", "sa6"}; return convert_enum_idx(options, 7, value, "tdd_cfg_s::sf_assign_e_"); } uint8_t tdd_cfg_s::sf_assign_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6}; - return convert_enum_idx(options, 7, value, "tdd_cfg_s::sf_assign_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6}; + return map_enum_number(options, 7, value, "tdd_cfg_s::sf_assign_e_"); } std::string tdd_cfg_s::special_sf_patterns_opts::to_string() const { - static constexpr const char* options[] = {"ssp0", "ssp1", "ssp2", "ssp3", "ssp4", "ssp5", "ssp6", "ssp7", "ssp8"}; + static const char* options[] = {"ssp0", "ssp1", "ssp2", "ssp3", "ssp4", "ssp5", "ssp6", "ssp7", "ssp8"}; return convert_enum_idx(options, 9, value, "tdd_cfg_s::special_sf_patterns_e_"); } uint8_t tdd_cfg_s::special_sf_patterns_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; - return convert_enum_idx(options, 9, value, "tdd_cfg_s::special_sf_patterns_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; + return map_enum_number(options, 9, value, "tdd_cfg_s::special_sf_patterns_e_"); } // BandclassCDMA2000 ::= ENUMERATED std::string bandclass_cdma2000_opts::to_string() const { - static constexpr const char* options[] = { - "bc0", "bc1", "bc2", "bc3", "bc4", "bc5", "bc6", "bc7", - "bc8", "bc9", "bc10", "bc11", "bc12", "bc13", "bc14", "bc15", - "bc16", "bc17", "bc18-v9a0", "bc19-v9a0", "bc20-v9a0", "bc21-v9a0", "spare10", "spare9", - "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"bc0", "bc1", "bc2", "bc3", "bc4", "bc5", "bc6", + "bc7", "bc8", "bc9", "bc10", "bc11", "bc12", "bc13", + "bc14", "bc15", "bc16", "bc17", "bc18-v9a0", "bc19-v9a0", "bc20-v9a0", + "bc21-v9a0", "spare10", "spare9", "spare8", "spare7", "spare6", "spare5", + "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "bandclass_cdma2000_e"); } uint8_t bandclass_cdma2000_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21}; - return convert_enum_idx(options, 22, value, "bandclass_cdma2000_e"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21}; + return map_enum_number(options, 22, value, "bandclass_cdma2000_e"); } std::string sl_comm_res_pool_v2x_r14_s::size_subch_r14_opts::to_string() const { - static constexpr const char* options[] = { - "n4", "n5", "n6", "n8", "n9", "n10", "n12", "n15", "n16", "n18", "n20", - "n25", "n30", "n48", "n50", "n72", "n75", "n96", "n100", "spare13", "spare12", "spare11", - "spare10", "spare9", "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"n4", "n5", "n6", "n8", "n9", "n10", "n12", "n15", + "n16", "n18", "n20", "n25", "n30", "n48", "n50", "n72", + "n75", "n96", "n100", "spare13", "spare12", "spare11", "spare10", "spare9", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "sl_comm_res_pool_v2x_r14_s::size_subch_r14_e_"); } uint8_t sl_comm_res_pool_v2x_r14_s::size_subch_r14_opts::to_number() const { - static constexpr uint8_t options[] = {4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 25, 30, 48, 50, 72, 75, 96, 100}; - return convert_enum_idx(options, 19, value, "sl_comm_res_pool_v2x_r14_s::size_subch_r14_e_"); + static const uint8_t options[] = {4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 25, 30, 48, 50, 72, 75, 96, 100}; + return map_enum_number(options, 19, value, "sl_comm_res_pool_v2x_r14_s::size_subch_r14_e_"); } std::string sl_comm_res_pool_v2x_r14_s::num_subch_r14_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n3", "n5", "n8", "n10", "n15", "n20", "spare1"}; + static const char* options[] = {"n1", "n3", "n5", "n8", "n10", "n15", "n20", "spare1"}; return convert_enum_idx(options, 8, value, "sl_comm_res_pool_v2x_r14_s::num_subch_r14_e_"); } uint8_t sl_comm_res_pool_v2x_r14_s::num_subch_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3, 5, 8, 10, 15, 20}; - return convert_enum_idx(options, 7, value, "sl_comm_res_pool_v2x_r14_s::num_subch_r14_e_"); + static const uint8_t options[] = {1, 3, 5, 8, 10, 15, 20}; + return map_enum_number(options, 7, value, "sl_comm_res_pool_v2x_r14_s::num_subch_r14_e_"); } std::string sl_sync_cfg_nfreq_r13_s::rx_params_r13_s_::disc_sync_win_r13_opts::to_string() const { - static constexpr const char* options[] = {"w1", "w2"}; + static const char* options[] = {"w1", "w2"}; return convert_enum_idx(options, 2, value, "sl_sync_cfg_nfreq_r13_s::rx_params_r13_s_::disc_sync_win_r13_e_"); } uint8_t sl_sync_cfg_nfreq_r13_s::rx_params_r13_s_::disc_sync_win_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "sl_sync_cfg_nfreq_r13_s::rx_params_r13_s_::disc_sync_win_r13_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "sl_sync_cfg_nfreq_r13_s::rx_params_r13_s_::disc_sync_win_r13_e_"); } std::string tdd_cfg_v1130_s::special_sf_patterns_v1130_opts::to_string() const { - static constexpr const char* options[] = {"ssp7", "ssp9"}; + static const char* options[] = {"ssp7", "ssp9"}; return convert_enum_idx(options, 2, value, "tdd_cfg_v1130_s::special_sf_patterns_v1130_e_"); } uint8_t tdd_cfg_v1130_s::special_sf_patterns_v1130_opts::to_number() const { - static constexpr uint8_t options[] = {7, 9}; - return convert_enum_idx(options, 2, value, "tdd_cfg_v1130_s::special_sf_patterns_v1130_e_"); + static const uint8_t options[] = {7, 9}; + return map_enum_number(options, 2, value, "tdd_cfg_v1130_s::special_sf_patterns_v1130_e_"); } std::string sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_opts::to_string() const { - static constexpr const char* options[] = {"v0", "v0dot2", "v0dot4", "v0dot6", "v0dot8", "spare3", "spare2", "spare1"}; + static const char* options[] = {"v0", "v0dot2", "v0dot4", "v0dot6", "v0dot8", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_e_"); } float sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_opts::to_number() const { - static constexpr float options[] = {0.0, 0.2, 0.4, 0.6, 0.8}; - return convert_enum_idx(options, 5, value, "sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_e_"); + static const float options[] = {0.0, 0.2, 0.4, 0.6, 0.8}; + return map_enum_number(options, 5, value, "sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_e_"); } std::string sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"0", "0.2", "0.4", "0.6", "0.8"}; + static const char* options[] = {"0", "0.2", "0.4", "0.6", "0.8"}; return convert_enum_idx(options, 8, value, "sl_comm_tx_pool_sensing_cfg_r14_s::prob_res_keep_r14_e_"); } std::string sl_comm_tx_pool_sensing_cfg_r14_s::sl_reselect_after_r14_opts::to_string() const { - static constexpr const char* options[] = {"n1", - "n2", - "n3", - "n4", - "n5", - "n6", - "n7", - "n8", - "n9", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"n1", + "n2", + "n3", + "n4", + "n5", + "n6", + "n7", + "n8", + "n9", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "sl_comm_tx_pool_sensing_cfg_r14_s::sl_reselect_after_r14_e_"); } uint8_t sl_comm_tx_pool_sensing_cfg_r14_s::sl_reselect_after_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; - return convert_enum_idx(options, 9, value, "sl_comm_tx_pool_sensing_cfg_r14_s::sl_reselect_after_r14_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; + return map_enum_number(options, 9, value, "sl_comm_tx_pool_sensing_cfg_r14_s::sl_reselect_after_r14_e_"); } std::string setup_opts::to_string() const { - static constexpr const char* options[] = {"release", "setup"}; + static const char* options[] = {"release", "setup"}; return convert_enum_idx(options, 2, value, "setup_e"); } std::string sl_disc_res_pool_r12_s::disc_period_r12_opts::to_string() const { - static constexpr const char* options[] = {"rf32", "rf64", "rf128", "rf256", "rf512", "rf1024", "rf16-v1310", "spare"}; + static const char* options[] = {"rf32", "rf64", "rf128", "rf256", "rf512", "rf1024", "rf16-v1310", "spare"}; return convert_enum_idx(options, 8, value, "sl_disc_res_pool_r12_s::disc_period_r12_e_"); } uint16_t sl_disc_res_pool_r12_s::disc_period_r12_opts::to_number() const { - static constexpr uint16_t options[] = {32, 64, 128, 256, 512, 1024, 16}; - return convert_enum_idx(options, 7, value, "sl_disc_res_pool_r12_s::disc_period_r12_e_"); + static const uint16_t options[] = {32, 64, 128, 256, 512, 1024, 16}; + return map_enum_number(options, 7, value, "sl_disc_res_pool_r12_s::disc_period_r12_e_"); } std::string sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::pool_sel_r12_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rsrpBased-r12", "random-r12"}; + static const char* options[] = {"rsrpBased-r12", "random-r12"}; return convert_enum_idx( options, 2, value, "sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::pool_sel_r12_c_::types"); } std::string sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::tx_probability_r12_opts::to_string() const { - static constexpr const char* options[] = {"p25", "p50", "p75", "p100"}; + static const char* options[] = {"p25", "p50", "p75", "p100"}; return convert_enum_idx( options, 4, value, "sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::tx_probability_r12_e_"); } uint8_t sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::tx_probability_r12_opts::to_number() const { - static constexpr uint8_t options[] = {25, 50, 75, 100}; - return convert_enum_idx( + static const uint8_t options[] = {25, 50, 75, 100}; + return map_enum_number( options, 4, value, "sl_disc_res_pool_r12_s::tx_params_r12_s_::ue_sel_res_cfg_r12_s_::tx_probability_r12_e_"); } std::string sl_disc_res_pool_r12_s::disc_period_v1310_c_::setup_opts::to_string() const { - static constexpr const char* options[] = {"rf4", "rf6", "rf7", "rf8", "rf12", "rf14", "rf24", "rf28"}; + static const char* options[] = {"rf4", "rf6", "rf7", "rf8", "rf12", "rf14", "rf24", "rf28"}; return convert_enum_idx(options, 8, value, "sl_disc_res_pool_r12_s::disc_period_v1310_c_::setup_e_"); } uint8_t sl_disc_res_pool_r12_s::disc_period_v1310_c_::setup_opts::to_number() const { - static constexpr uint8_t options[] = {4, 6, 7, 8, 12, 14, 24, 28}; - return convert_enum_idx(options, 8, value, "sl_disc_res_pool_r12_s::disc_period_v1310_c_::setup_e_"); + static const uint8_t options[] = {4, 6, 7, 8, 12, 14, 24, 28}; + return map_enum_number(options, 8, value, "sl_disc_res_pool_r12_s::disc_period_v1310_c_::setup_e_"); } std::string sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::setup_s_::freq_info_s_::ul_bw_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx( options, 6, value, "sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::setup_s_::freq_info_s_::ul_bw_e_"); } uint8_t sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::setup_s_::freq_info_s_::ul_bw_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx( + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number( options, 6, value, "sl_disc_res_pool_r12_s::tx_params_add_neigh_freq_r13_c_::setup_s_::freq_info_s_::ul_bw_e_"); } std::string sl_zone_cfg_r14_s::zone_len_r14_opts::to_string() const { - static constexpr const char* options[] = {"m5", "m10", "m20", "m50", "m100", "m200", "m500", "spare1"}; + static const char* options[] = {"m5", "m10", "m20", "m50", "m100", "m200", "m500", "spare1"}; return convert_enum_idx(options, 8, value, "sl_zone_cfg_r14_s::zone_len_r14_e_"); } uint16_t sl_zone_cfg_r14_s::zone_len_r14_opts::to_number() const { - static constexpr uint16_t options[] = {5, 10, 20, 50, 100, 200, 500}; - return convert_enum_idx(options, 7, value, "sl_zone_cfg_r14_s::zone_len_r14_e_"); + static const uint16_t options[] = {5, 10, 20, 50, 100, 200, 500}; + return map_enum_number(options, 7, value, "sl_zone_cfg_r14_s::zone_len_r14_e_"); } std::string sl_zone_cfg_r14_s::zone_width_r14_opts::to_string() const { - static constexpr const char* options[] = {"m5", "m10", "m20", "m50", "m100", "m200", "m500", "spare1"}; + static const char* options[] = {"m5", "m10", "m20", "m50", "m100", "m200", "m500", "spare1"}; return convert_enum_idx(options, 8, value, "sl_zone_cfg_r14_s::zone_width_r14_e_"); } uint16_t sl_zone_cfg_r14_s::zone_width_r14_opts::to_number() const { - static constexpr uint16_t options[] = {5, 10, 20, 50, 100, 200, 500}; - return convert_enum_idx(options, 7, value, "sl_zone_cfg_r14_s::zone_width_r14_e_"); + static const uint16_t options[] = {5, 10, 20, 50, 100, 200, 500}; + return map_enum_number(options, 7, value, "sl_zone_cfg_r14_s::zone_width_r14_e_"); } std::string pci_range_s::range_opts::to_string() const { - static constexpr const char* options[] = {"n4", - "n8", - "n12", - "n16", - "n24", - "n32", - "n48", - "n64", - "n84", - "n96", - "n128", - "n168", - "n252", - "n504", - "spare2", - "spare1"}; + static const char* options[] = {"n4", + "n8", + "n12", + "n16", + "n24", + "n32", + "n48", + "n64", + "n84", + "n96", + "n128", + "n168", + "n252", + "n504", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "pci_range_s::range_e_"); } uint16_t pci_range_s::range_opts::to_number() const { - static constexpr uint16_t options[] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504}; - return convert_enum_idx(options, 14, value, "pci_range_s::range_e_"); + static const uint16_t options[] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504}; + return map_enum_number(options, 14, value, "pci_range_s::range_e_"); } // Q-OffsetRange ::= ENUMERATED std::string q_offset_range_opts::to_string() const { - static constexpr const char* options[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", - "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", - "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", - "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; + static const char* options[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", + "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", + "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", + "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; return convert_enum_idx(options, 31, value, "q_offset_range_e"); } int8_t q_offset_range_opts::to_number() const { - static constexpr int8_t options[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, - 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; - return convert_enum_idx(options, 31, value, "q_offset_range_e"); + static const int8_t options[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, + 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return map_enum_number(options, 31, value, "q_offset_range_e"); } std::string sched_info_br_r13_s::si_tbs_r13_opts::to_string() const { - static constexpr const char* options[] = { - "b152", "b208", "b256", "b328", "b408", "b504", "b600", "b712", "b808", "b936"}; + static const char* options[] = {"b152", "b208", "b256", "b328", "b408", "b504", "b600", "b712", "b808", "b936"}; return convert_enum_idx(options, 10, value, "sched_info_br_r13_s::si_tbs_r13_e_"); } uint16_t sched_info_br_r13_s::si_tbs_r13_opts::to_number() const { - static constexpr uint16_t options[] = {152, 208, 256, 328, 408, 504, 600, 712, 808, 936}; - return convert_enum_idx(options, 10, value, "sched_info_br_r13_s::si_tbs_r13_e_"); + static const uint16_t options[] = {152, 208, 256, 328, 408, 504, 600, 712, 808, 936}; + return map_enum_number(options, 10, value, "sched_info_br_r13_s::si_tbs_r13_e_"); } std::string speed_state_scale_factors_s::sf_medium_opts::to_string() const { - static constexpr const char* options[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; + static const char* options[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); } float speed_state_scale_factors_s::sf_medium_opts::to_number() const { - static constexpr float options[] = {0.25, 0.5, 0.75, 1.0}; - return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); + static const float options[] = {0.25, 0.5, 0.75, 1.0}; + return map_enum_number(options, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); } std::string speed_state_scale_factors_s::sf_medium_opts::to_number_string() const { - static constexpr const char* options[] = {"0.25", "0.5", "0.75", "1.0"}; + static const char* options[] = {"0.25", "0.5", "0.75", "1.0"}; return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); } std::string speed_state_scale_factors_s::sf_high_opts::to_string() const { - static constexpr const char* options[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; + static const char* options[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_high_e_"); } float speed_state_scale_factors_s::sf_high_opts::to_number() const { - static constexpr float options[] = {0.25, 0.5, 0.75, 1.0}; - return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_high_e_"); + static const float options[] = {0.25, 0.5, 0.75, 1.0}; + return map_enum_number(options, 4, value, "speed_state_scale_factors_s::sf_high_e_"); } std::string speed_state_scale_factors_s::sf_high_opts::to_number_string() const { - static constexpr const char* options[] = {"0.25", "0.5", "0.75", "1.0"}; + static const char* options[] = {"0.25", "0.5", "0.75", "1.0"}; return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_high_e_"); } // AllowedMeasBandwidth ::= ENUMERATED std::string allowed_meas_bw_opts::to_string() const { - static constexpr const char* options[] = {"mbw6", "mbw15", "mbw25", "mbw50", "mbw75", "mbw100"}; + static const char* options[] = {"mbw6", "mbw15", "mbw25", "mbw50", "mbw75", "mbw100"}; return convert_enum_idx(options, 6, value, "allowed_meas_bw_e"); } uint8_t allowed_meas_bw_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "allowed_meas_bw_e"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "allowed_meas_bw_e"); } // BandIndicatorGERAN ::= ENUMERATED std::string band_ind_geran_opts::to_string() const { - static constexpr const char* options[] = {"dcs1800", "pcs1900"}; + static const char* options[] = {"dcs1800", "pcs1900"}; return convert_enum_idx(options, 2, value, "band_ind_geran_e"); } uint16_t band_ind_geran_opts::to_number() const { - static constexpr uint16_t options[] = {1800, 1900}; - return convert_enum_idx(options, 2, value, "band_ind_geran_e"); + static const uint16_t options[] = {1800, 1900}; + return map_enum_number(options, 2, value, "band_ind_geran_e"); } std::string barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "p00", "p05", "p10", "p15", "p20", "p25", "p30", "p40", "p50", "p60", "p70", "p75", "p80", "p85", "p90", "p95"}; return convert_enum_idx( options, 16, value, "barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_e_"); } float barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; - return convert_enum_idx( + static const float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; + return map_enum_number( options, 16, value, "barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_e_"); } std::string barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_opts::to_number_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "0.0", "0.5", "1.0", "1.5", "2.0", "2.5", "3.0", "4.0", "5.0", "6.0", "7.0", "7.5", "8.0", "8.5", "9.0", "9.5"}; return convert_enum_idx( options, 16, value, "barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r13_e_"); @@ -688,174 +686,173 @@ std::string barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_factor_r std::string barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_time_r13_opts::to_string() const { - static constexpr const char* options[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; + static const char* options[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; return convert_enum_idx(options, 8, value, "barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_time_r13_e_"); } uint16_t barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_time_r13_opts::to_number() const { - static constexpr uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; - return convert_enum_idx(options, 8, value, "barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_time_r13_e_"); + static const uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(options, 8, value, "barr_per_acdc_category_r13_s::acdc_barr_cfg_r13_s_::ac_barr_time_r13_e_"); } std::string cell_sel_info_nfreq_r13_s::q_hyst_r13_opts::to_string() const { - static constexpr const char* options[] = {"dB0", - "dB1", - "dB2", - "dB3", - "dB4", - "dB5", - "dB6", - "dB8", - "dB10", - "dB12", - "dB14", - "dB16", - "dB18", - "dB20", - "dB22", - "dB24"}; + static const char* options[] = {"dB0", + "dB1", + "dB2", + "dB3", + "dB4", + "dB5", + "dB6", + "dB8", + "dB10", + "dB12", + "dB14", + "dB16", + "dB18", + "dB20", + "dB22", + "dB24"}; return convert_enum_idx(options, 16, value, "cell_sel_info_nfreq_r13_s::q_hyst_r13_e_"); } uint8_t cell_sel_info_nfreq_r13_s::q_hyst_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; - return convert_enum_idx(options, 16, value, "cell_sel_info_nfreq_r13_s::q_hyst_r13_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return map_enum_number(options, 16, value, "cell_sel_info_nfreq_r13_s::q_hyst_r13_e_"); } std::string plmn_id_info2_r12_c::types_opts::to_string() const { - static constexpr const char* options[] = {"plmn-Index-r12", "plmnIdentity-r12"}; + static const char* options[] = {"plmn-Index-r12", "plmnIdentity-r12"}; return convert_enum_idx(options, 2, value, "plmn_id_info2_r12_c::types"); } std::string prach_params_ce_r13_s::prach_start_sf_r13_opts::to_string() const { - static constexpr const char* options[] = {"sf2", "sf4", "sf8", "sf16", "sf32", "sf64", "sf128", "sf256"}; + static const char* options[] = {"sf2", "sf4", "sf8", "sf16", "sf32", "sf64", "sf128", "sf256"}; return convert_enum_idx(options, 8, value, "prach_params_ce_r13_s::prach_start_sf_r13_e_"); } uint16_t prach_params_ce_r13_s::prach_start_sf_r13_opts::to_number() const { - static constexpr uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 256}; - return convert_enum_idx(options, 8, value, "prach_params_ce_r13_s::prach_start_sf_r13_e_"); + static const uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 256}; + return map_enum_number(options, 8, value, "prach_params_ce_r13_s::prach_start_sf_r13_e_"); } std::string prach_params_ce_r13_s::max_num_preamb_attempt_ce_r13_opts::to_string() const { - static constexpr const char* options[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10"}; + static const char* options[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10"}; return convert_enum_idx(options, 7, value, "prach_params_ce_r13_s::max_num_preamb_attempt_ce_r13_e_"); } uint8_t prach_params_ce_r13_s::max_num_preamb_attempt_ce_r13_opts::to_number() const { - static constexpr uint8_t options[] = {3, 4, 5, 6, 7, 8, 10}; - return convert_enum_idx(options, 7, value, "prach_params_ce_r13_s::max_num_preamb_attempt_ce_r13_e_"); + static const uint8_t options[] = {3, 4, 5, 6, 7, 8, 10}; + return map_enum_number(options, 7, value, "prach_params_ce_r13_s::max_num_preamb_attempt_ce_r13_e_"); } std::string prach_params_ce_r13_s::num_repeat_per_preamb_attempt_r13_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32", "n64", "n128"}; + static const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32", "n64", "n128"}; return convert_enum_idx(options, 8, value, "prach_params_ce_r13_s::num_repeat_per_preamb_attempt_r13_e_"); } uint8_t prach_params_ce_r13_s::num_repeat_per_preamb_attempt_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 16, 32, 64, 128}; - return convert_enum_idx(options, 8, value, "prach_params_ce_r13_s::num_repeat_per_preamb_attempt_r13_e_"); + static const uint8_t options[] = {1, 2, 4, 8, 16, 32, 64, 128}; + return map_enum_number(options, 8, value, "prach_params_ce_r13_s::num_repeat_per_preamb_attempt_r13_e_"); } std::string prach_params_ce_r13_s::mpdcch_num_repeat_ra_r13_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "r128", "r256"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "r128", "r256"}; return convert_enum_idx(options, 9, value, "prach_params_ce_r13_s::mpdcch_num_repeat_ra_r13_e_"); } uint16_t prach_params_ce_r13_s::mpdcch_num_repeat_ra_r13_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; - return convert_enum_idx(options, 9, value, "prach_params_ce_r13_s::mpdcch_num_repeat_ra_r13_e_"); + static const uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return map_enum_number(options, 9, value, "prach_params_ce_r13_s::mpdcch_num_repeat_ra_r13_e_"); } std::string prach_params_ce_r13_s::prach_hop_cfg_r13_opts::to_string() const { - static constexpr const char* options[] = {"on", "off"}; + static const char* options[] = {"on", "off"}; return convert_enum_idx(options, 2, value, "prach_params_ce_r13_s::prach_hop_cfg_r13_e_"); } std::string rach_ce_level_info_r13_s::ra_resp_win_size_r13_opts::to_string() const { - static constexpr const char* options[] = {"sf20", "sf50", "sf80", "sf120", "sf180", "sf240", "sf320", "sf400"}; + static const char* options[] = {"sf20", "sf50", "sf80", "sf120", "sf180", "sf240", "sf320", "sf400"}; return convert_enum_idx(options, 8, value, "rach_ce_level_info_r13_s::ra_resp_win_size_r13_e_"); } uint16_t rach_ce_level_info_r13_s::ra_resp_win_size_r13_opts::to_number() const { - static constexpr uint16_t options[] = {20, 50, 80, 120, 180, 240, 320, 400}; - return convert_enum_idx(options, 8, value, "rach_ce_level_info_r13_s::ra_resp_win_size_r13_e_"); + static const uint16_t options[] = {20, 50, 80, 120, 180, 240, 320, 400}; + return map_enum_number(options, 8, value, "rach_ce_level_info_r13_s::ra_resp_win_size_r13_e_"); } std::string rach_ce_level_info_r13_s::mac_contention_resolution_timer_r13_opts::to_string() const { - static constexpr const char* options[] = {"sf80", "sf100", "sf120", "sf160", "sf200", "sf240", "sf480", "sf960"}; + static const char* options[] = {"sf80", "sf100", "sf120", "sf160", "sf200", "sf240", "sf480", "sf960"}; return convert_enum_idx(options, 8, value, "rach_ce_level_info_r13_s::mac_contention_resolution_timer_r13_e_"); } uint16_t rach_ce_level_info_r13_s::mac_contention_resolution_timer_r13_opts::to_number() const { - static constexpr uint16_t options[] = {80, 100, 120, 160, 200, 240, 480, 960}; - return convert_enum_idx(options, 8, value, "rach_ce_level_info_r13_s::mac_contention_resolution_timer_r13_e_"); + static const uint16_t options[] = {80, 100, 120, 160, 200, 240, 480, 960}; + return map_enum_number(options, 8, value, "rach_ce_level_info_r13_s::mac_contention_resolution_timer_r13_e_"); } std::string rach_ce_level_info_r13_s::rar_hop_cfg_r13_opts::to_string() const { - static constexpr const char* options[] = {"on", "off"}; + static const char* options[] = {"on", "off"}; return convert_enum_idx(options, 2, value, "rach_ce_level_info_r13_s::rar_hop_cfg_r13_e_"); } std::string rach_ce_level_info_r13_s::edt_params_r15_s_::edt_tbs_r15_opts::to_string() const { - static constexpr const char* options[] = {"b328", "b408", "b504", "b600", "b712", "b808", "b936", "b1000or456"}; + static const char* options[] = {"b328", "b408", "b504", "b600", "b712", "b808", "b936", "b1000or456"}; return convert_enum_idx(options, 8, value, "rach_ce_level_info_r13_s::edt_params_r15_s_::edt_tbs_r15_e_"); } uint16_t rach_ce_level_info_r13_s::edt_params_r15_s_::edt_tbs_r15_opts::to_number() const { - static constexpr uint16_t options[] = {328, 408, 504, 600, 712, 808, 936, 1000}; - return convert_enum_idx(options, 8, value, "rach_ce_level_info_r13_s::edt_params_r15_s_::edt_tbs_r15_e_"); + static const uint16_t options[] = {328, 408, 504, 600, 712, 808, 936, 1000}; + return map_enum_number(options, 8, value, "rach_ce_level_info_r13_s::edt_params_r15_s_::edt_tbs_r15_e_"); } std::string rach_ce_level_info_r13_s::edt_params_r15_s_::mac_contention_resolution_timer_r15_opts::to_string() const { - static constexpr const char* options[] = { - "sf240", "sf480", "sf960", "sf1920", "sf3840", "sf5760", "sf7680", "sf10240"}; + static const char* options[] = {"sf240", "sf480", "sf960", "sf1920", "sf3840", "sf5760", "sf7680", "sf10240"}; return convert_enum_idx( options, 8, value, "rach_ce_level_info_r13_s::edt_params_r15_s_::mac_contention_resolution_timer_r15_e_"); } uint16_t rach_ce_level_info_r13_s::edt_params_r15_s_::mac_contention_resolution_timer_r15_opts::to_number() const { - static constexpr uint16_t options[] = {240, 480, 960, 1920, 3840, 5760, 7680, 10240}; - return convert_enum_idx( + static const uint16_t options[] = {240, 480, 960, 1920, 3840, 5760, 7680, 10240}; + return map_enum_number( options, 8, value, "rach_ce_level_info_r13_s::edt_params_r15_s_::mac_contention_resolution_timer_r15_e_"); } std::string sl_disc_tx_res_inter_freq_r13_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "acquireSI-FromCarrier-r13", "discTxPoolCommon-r13", "requestDedicated-r13", "noTxOnCarrier-r13"}; return convert_enum_idx(options, 4, value, "sl_disc_tx_res_inter_freq_r13_c::types"); } std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::mpdcch_pdsch_hop_nb_r13_opts::to_string() const { - static constexpr const char* options[] = {"nb2", "nb4"}; + static const char* options[] = {"nb2", "nb4"}; return convert_enum_idx( options, 2, value, "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::mpdcch_pdsch_hop_nb_r13_e_"); } uint8_t sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::mpdcch_pdsch_hop_nb_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4}; + return map_enum_number( options, 2, value, "sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::mpdcch_pdsch_hop_nb_r13_e_"); } std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_:: interv_fdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int1", "int2", "int4", "int8"}; + static const char* options[] = {"int1", "int2", "int4", "int8"}; return convert_enum_idx( options, 4, @@ -865,8 +862,8 @@ std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_ uint8_t sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_opts:: to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number( options, 4, value, @@ -876,7 +873,7 @@ uint8_t sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_comm std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_:: interv_tdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int1", "int5", "int10", "int20"}; + static const char* options[] = {"int1", "int5", "int10", "int20"}; return convert_enum_idx( options, 4, @@ -886,8 +883,8 @@ std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_ uint8_t sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_opts:: to_number() const { - static constexpr uint8_t options[] = {1, 5, 10, 20}; - return convert_enum_idx( + static const uint8_t options[] = {1, 5, 10, 20}; + return map_enum_number( options, 4, value, @@ -897,7 +894,7 @@ uint8_t sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_comm std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_a_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; + static const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; return convert_enum_idx( options, 2, @@ -908,7 +905,7 @@ sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_ std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_:: interv_fdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int2", "int4", "int8", "int16"}; + static const char* options[] = {"int2", "int4", "int8", "int16"}; return convert_enum_idx( options, 4, @@ -918,8 +915,8 @@ std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_ uint8_t sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_opts:: to_number() const { - static constexpr uint8_t options[] = {2, 4, 8, 16}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 8, 16}; + return map_enum_number( options, 4, value, @@ -929,7 +926,7 @@ uint8_t sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_comm std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_:: interv_tdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int5", "int10", "int20", "int40"}; + static const char* options[] = {"int5", "int10", "int20", "int40"}; return convert_enum_idx( options, 4, @@ -939,8 +936,8 @@ std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_ uint8_t sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_opts:: to_number() const { - static constexpr uint8_t options[] = {5, 10, 20, 40}; - return convert_enum_idx( + static const uint8_t options[] = {5, 10, 20, 40}; + return map_enum_number( options, 4, value, @@ -950,7 +947,7 @@ uint8_t sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_comm std::string sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_b_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; + static const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; return convert_enum_idx( options, 2, @@ -960,323 +957,323 @@ sib_type1_v1320_ies_s::freq_hop_params_dl_r13_s_::interv_dl_hop_cfg_common_mode_ std::string sys_time_info_cdma2000_s::cdma_sys_time_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"synchronousSystemTime", "asynchronousSystemTime"}; + static const char* options[] = {"synchronousSystemTime", "asynchronousSystemTime"}; return convert_enum_idx(options, 2, value, "sys_time_info_cdma2000_s::cdma_sys_time_c_::types"); } std::string ac_barr_cfg_s::ac_barr_factor_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "p00", "p05", "p10", "p15", "p20", "p25", "p30", "p40", "p50", "p60", "p70", "p75", "p80", "p85", "p90", "p95"}; return convert_enum_idx(options, 16, value, "ac_barr_cfg_s::ac_barr_factor_e_"); } float ac_barr_cfg_s::ac_barr_factor_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; - return convert_enum_idx(options, 16, value, "ac_barr_cfg_s::ac_barr_factor_e_"); + static const float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; + return map_enum_number(options, 16, value, "ac_barr_cfg_s::ac_barr_factor_e_"); } std::string ac_barr_cfg_s::ac_barr_factor_opts::to_number_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "0.0", "0.5", "1.0", "1.5", "2.0", "2.5", "3.0", "4.0", "5.0", "6.0", "7.0", "7.5", "8.0", "8.5", "9.0", "9.5"}; return convert_enum_idx(options, 16, value, "ac_barr_cfg_s::ac_barr_factor_e_"); } std::string ac_barr_cfg_s::ac_barr_time_opts::to_string() const { - static constexpr const char* options[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; + static const char* options[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; return convert_enum_idx(options, 8, value, "ac_barr_cfg_s::ac_barr_time_e_"); } uint16_t ac_barr_cfg_s::ac_barr_time_opts::to_number() const { - static constexpr uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; - return convert_enum_idx(options, 8, value, "ac_barr_cfg_s::ac_barr_time_e_"); + static const uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(options, 8, value, "ac_barr_cfg_s::ac_barr_time_e_"); } std::string carrier_freqs_geran_s::following_arfcns_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"explicitListOfARFCNs", "equallySpacedARFCNs", "variableBitMapOfARFCNs"}; + static const char* options[] = {"explicitListOfARFCNs", "equallySpacedARFCNs", "variableBitMapOfARFCNs"}; return convert_enum_idx(options, 3, value, "carrier_freqs_geran_s::following_arfcns_c_::types"); } // CellReselectionSubPriority-r13 ::= ENUMERATED std::string cell_resel_sub_prio_r13_opts::to_string() const { - static constexpr const char* options[] = {"oDot2", "oDot4", "oDot6", "oDot8"}; + static const char* options[] = {"oDot2", "oDot4", "oDot6", "oDot8"}; return convert_enum_idx(options, 4, value, "cell_resel_sub_prio_r13_e"); } float cell_resel_sub_prio_r13_opts::to_number() const { - static constexpr float options[] = {0.2, 0.4, 0.6, 0.8}; - return convert_enum_idx(options, 4, value, "cell_resel_sub_prio_r13_e"); + static const float options[] = {0.2, 0.4, 0.6, 0.8}; + return map_enum_number(options, 4, value, "cell_resel_sub_prio_r13_e"); } std::string cell_resel_sub_prio_r13_opts::to_number_string() const { - static constexpr const char* options[] = {"0.2", "0.4", "0.6", "0.8"}; + static const char* options[] = {"0.2", "0.4", "0.6", "0.8"}; return convert_enum_idx(options, 4, value, "cell_resel_sub_prio_r13_e"); } std::string delta_flist_pucch_s::delta_f_pucch_format1_opts::to_string() const { - static constexpr const char* options[] = {"deltaF-2", "deltaF0", "deltaF2"}; + static const char* options[] = {"deltaF-2", "deltaF0", "deltaF2"}; return convert_enum_idx(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format1_e_"); } int8_t delta_flist_pucch_s::delta_f_pucch_format1_opts::to_number() const { - static constexpr int8_t options[] = {-2, 0, 2}; - return convert_enum_idx(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format1_e_"); + static const int8_t options[] = {-2, 0, 2}; + return map_enum_number(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format1_e_"); } std::string delta_flist_pucch_s::delta_f_pucch_format1b_opts::to_string() const { - static constexpr const char* options[] = {"deltaF1", "deltaF3", "deltaF5"}; + static const char* options[] = {"deltaF1", "deltaF3", "deltaF5"}; return convert_enum_idx(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format1b_e_"); } uint8_t delta_flist_pucch_s::delta_f_pucch_format1b_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3, 5}; - return convert_enum_idx(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format1b_e_"); + static const uint8_t options[] = {1, 3, 5}; + return map_enum_number(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format1b_e_"); } std::string delta_flist_pucch_s::delta_f_pucch_format2_opts::to_string() const { - static constexpr const char* options[] = {"deltaF-2", "deltaF0", "deltaF1", "deltaF2"}; + static const char* options[] = {"deltaF-2", "deltaF0", "deltaF1", "deltaF2"}; return convert_enum_idx(options, 4, value, "delta_flist_pucch_s::delta_f_pucch_format2_e_"); } int8_t delta_flist_pucch_s::delta_f_pucch_format2_opts::to_number() const { - static constexpr int8_t options[] = {-2, 0, 1, 2}; - return convert_enum_idx(options, 4, value, "delta_flist_pucch_s::delta_f_pucch_format2_e_"); + static const int8_t options[] = {-2, 0, 1, 2}; + return map_enum_number(options, 4, value, "delta_flist_pucch_s::delta_f_pucch_format2_e_"); } std::string delta_flist_pucch_s::delta_f_pucch_format2a_opts::to_string() const { - static constexpr const char* options[] = {"deltaF-2", "deltaF0", "deltaF2"}; + static const char* options[] = {"deltaF-2", "deltaF0", "deltaF2"}; return convert_enum_idx(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format2a_e_"); } int8_t delta_flist_pucch_s::delta_f_pucch_format2a_opts::to_number() const { - static constexpr int8_t options[] = {-2, 0, 2}; - return convert_enum_idx(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format2a_e_"); + static const int8_t options[] = {-2, 0, 2}; + return map_enum_number(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format2a_e_"); } std::string delta_flist_pucch_s::delta_f_pucch_format2b_opts::to_string() const { - static constexpr const char* options[] = {"deltaF-2", "deltaF0", "deltaF2"}; + static const char* options[] = {"deltaF-2", "deltaF0", "deltaF2"}; return convert_enum_idx(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format2b_e_"); } int8_t delta_flist_pucch_s::delta_f_pucch_format2b_opts::to_number() const { - static constexpr int8_t options[] = {-2, 0, 2}; - return convert_enum_idx(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format2b_e_"); + static const int8_t options[] = {-2, 0, 2}; + return map_enum_number(options, 3, value, "delta_flist_pucch_s::delta_f_pucch_format2b_e_"); } std::string edt_prach_params_ce_r15_s::edt_prach_params_ce_r15_s_::prach_start_sf_r15_opts::to_string() const { - static constexpr const char* options[] = {"sf2", "sf4", "sf8", "sf16", "sf32", "sf64", "sf128", "sf256"}; + static const char* options[] = {"sf2", "sf4", "sf8", "sf16", "sf32", "sf64", "sf128", "sf256"}; return convert_enum_idx( options, 8, value, "edt_prach_params_ce_r15_s::edt_prach_params_ce_r15_s_::prach_start_sf_r15_e_"); } uint16_t edt_prach_params_ce_r15_s::edt_prach_params_ce_r15_s_::prach_start_sf_r15_opts::to_number() const { - static constexpr uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 256}; - return convert_enum_idx( + static const uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 256}; + return map_enum_number( options, 8, value, "edt_prach_params_ce_r15_s::edt_prach_params_ce_r15_s_::prach_start_sf_r15_e_"); } // FilterCoefficient ::= ENUMERATED std::string filt_coef_opts::to_string() const { - static constexpr const char* options[] = {"fc0", - "fc1", - "fc2", - "fc3", - "fc4", - "fc5", - "fc6", - "fc7", - "fc8", - "fc9", - "fc11", - "fc13", - "fc15", - "fc17", - "fc19", - "spare1"}; + static const char* options[] = {"fc0", + "fc1", + "fc2", + "fc3", + "fc4", + "fc5", + "fc6", + "fc7", + "fc8", + "fc9", + "fc11", + "fc13", + "fc15", + "fc17", + "fc19", + "spare1"}; return convert_enum_idx(options, 16, value, "filt_coef_e"); } uint8_t filt_coef_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19}; - return convert_enum_idx(options, 15, value, "filt_coef_e"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19}; + return map_enum_number(options, 15, value, "filt_coef_e"); } std::string mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sf5-r15", "sf10-r15", "sf20-r15", "sf40-r15", "sf80-r15", "sf160-r15"}; + static const char* options[] = {"sf5-r15", "sf10-r15", "sf20-r15", "sf40-r15", "sf80-r15", "sf160-r15"}; return convert_enum_idx(options, 6, value, "mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::types"); } uint8_t mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 20, 40, 80, 160}; - return convert_enum_idx(options, 6, value, "mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::types"); + static const uint8_t options[] = {5, 10, 20, 40, 80, 160}; + return map_enum_number(options, 6, value, "mtc_ssb_nr_r15_s::periodicity_and_offset_r15_c_::types"); } std::string mtc_ssb_nr_r15_s::ssb_dur_r15_opts::to_string() const { - static constexpr const char* options[] = {"sf1", "sf2", "sf3", "sf4", "sf5"}; + static const char* options[] = {"sf1", "sf2", "sf3", "sf4", "sf5"}; return convert_enum_idx(options, 5, value, "mtc_ssb_nr_r15_s::ssb_dur_r15_e_"); } uint8_t mtc_ssb_nr_r15_s::ssb_dur_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5}; - return convert_enum_idx(options, 5, value, "mtc_ssb_nr_r15_s::ssb_dur_r15_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5}; + return map_enum_number(options, 5, value, "mtc_ssb_nr_r15_s::ssb_dur_r15_e_"); } std::string meas_idle_carrier_eutra_r15_s::report_quantities_opts::to_string() const { - static constexpr const char* options[] = {"rsrp", "rsrq", "both"}; + static const char* options[] = {"rsrp", "rsrq", "both"}; return convert_enum_idx(options, 3, value, "meas_idle_carrier_eutra_r15_s::report_quantities_e_"); } std::string params_cdma2000_r11_s::sys_time_info_r11_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"explicitValue", "defaultValue"}; + static const char* options[] = {"explicitValue", "defaultValue"}; return convert_enum_idx(options, 2, value, "params_cdma2000_r11_s::sys_time_info_r11_c_::types"); } std::string pwr_ramp_params_s::pwr_ramp_step_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB2", "dB4", "dB6"}; + static const char* options[] = {"dB0", "dB2", "dB4", "dB6"}; return convert_enum_idx(options, 4, value, "pwr_ramp_params_s::pwr_ramp_step_e_"); } uint8_t pwr_ramp_params_s::pwr_ramp_step_opts::to_number() const { - static constexpr uint8_t options[] = {0, 2, 4, 6}; - return convert_enum_idx(options, 4, value, "pwr_ramp_params_s::pwr_ramp_step_e_"); + static const uint8_t options[] = {0, 2, 4, 6}; + return map_enum_number(options, 4, value, "pwr_ramp_params_s::pwr_ramp_step_e_"); } std::string pwr_ramp_params_s::preamb_init_rx_target_pwr_opts::to_string() const { - static constexpr const char* options[] = {"dBm-120", - "dBm-118", - "dBm-116", - "dBm-114", - "dBm-112", - "dBm-110", - "dBm-108", - "dBm-106", - "dBm-104", - "dBm-102", - "dBm-100", - "dBm-98", - "dBm-96", - "dBm-94", - "dBm-92", - "dBm-90"}; + static const char* options[] = {"dBm-120", + "dBm-118", + "dBm-116", + "dBm-114", + "dBm-112", + "dBm-110", + "dBm-108", + "dBm-106", + "dBm-104", + "dBm-102", + "dBm-100", + "dBm-98", + "dBm-96", + "dBm-94", + "dBm-92", + "dBm-90"}; return convert_enum_idx(options, 16, value, "pwr_ramp_params_s::preamb_init_rx_target_pwr_e_"); } int8_t pwr_ramp_params_s::preamb_init_rx_target_pwr_opts::to_number() const { - static constexpr int8_t options[] = { + static const int8_t options[] = { -120, -118, -116, -114, -112, -110, -108, -106, -104, -102, -100, -98, -96, -94, -92, -90}; - return convert_enum_idx(options, 16, value, "pwr_ramp_params_s::preamb_init_rx_target_pwr_e_"); + return map_enum_number(options, 16, value, "pwr_ramp_params_s::preamb_init_rx_target_pwr_e_"); } // PreambleTransMax ::= ENUMERATED std::string preamb_trans_max_opts::to_string() const { - static constexpr const char* options[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10", "n20", "n50", "n100", "n200"}; + static const char* options[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10", "n20", "n50", "n100", "n200"}; return convert_enum_idx(options, 11, value, "preamb_trans_max_e"); } uint8_t preamb_trans_max_opts::to_number() const { - static constexpr uint8_t options[] = {3, 4, 5, 6, 7, 8, 10, 20, 50, 100, 200}; - return convert_enum_idx(options, 11, value, "preamb_trans_max_e"); + static const uint8_t options[] = {3, 4, 5, 6, 7, 8, 10, 20, 50, 100, 200}; + return map_enum_number(options, 11, value, "preamb_trans_max_e"); } std::string sl_hop_cfg_comm_r12_s::num_subbands_r12_opts::to_string() const { - static constexpr const char* options[] = {"ns1", "ns2", "ns4"}; + static const char* options[] = {"ns1", "ns2", "ns4"}; return convert_enum_idx(options, 3, value, "sl_hop_cfg_comm_r12_s::num_subbands_r12_e_"); } uint8_t sl_hop_cfg_comm_r12_s::num_subbands_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "sl_hop_cfg_comm_r12_s::num_subbands_r12_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "sl_hop_cfg_comm_r12_s::num_subbands_r12_e_"); } std::string sl_inter_freq_info_v2x_r14_s::sl_bw_r14_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx(options, 6, value, "sl_inter_freq_info_v2x_r14_s::sl_bw_r14_e_"); } uint8_t sl_inter_freq_info_v2x_r14_s::sl_bw_r14_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "sl_inter_freq_info_v2x_r14_s::sl_bw_r14_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "sl_inter_freq_info_v2x_r14_s::sl_bw_r14_e_"); } std::string sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"additionalSpectrumEmission-r14", "additionalSpectrumEmission-v1440"}; + static const char* options[] = {"additionalSpectrumEmission-r14", "additionalSpectrumEmission-v1440"}; return convert_enum_idx(options, 2, value, "sl_inter_freq_info_v2x_r14_s::add_spec_emission_v2x_r14_c_::types"); } // SL-PeriodComm-r12 ::= ENUMERATED std::string sl_period_comm_r12_opts::to_string() const { - static constexpr const char* options[] = {"sf40", - "sf60", - "sf70", - "sf80", - "sf120", - "sf140", - "sf160", - "sf240", - "sf280", - "sf320", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare"}; + static const char* options[] = {"sf40", + "sf60", + "sf70", + "sf80", + "sf120", + "sf140", + "sf160", + "sf240", + "sf280", + "sf320", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare"}; return convert_enum_idx(options, 16, value, "sl_period_comm_r12_e"); } uint16_t sl_period_comm_r12_opts::to_number() const { - static constexpr uint16_t options[] = {40, 60, 70, 80, 120, 140, 160, 240, 280, 320}; - return convert_enum_idx(options, 10, value, "sl_period_comm_r12_e"); + static const uint16_t options[] = {40, 60, 70, 80, 120, 140, 160, 240, 280, 320}; + return map_enum_number(options, 10, value, "sl_period_comm_r12_e"); } std::string sl_sync_cfg_r12_s::rx_params_ncell_r12_s_::disc_sync_win_r12_opts::to_string() const { - static constexpr const char* options[] = {"w1", "w2"}; + static const char* options[] = {"w1", "w2"}; return convert_enum_idx(options, 2, value, "sl_sync_cfg_r12_s::rx_params_ncell_r12_s_::disc_sync_win_r12_e_"); } uint8_t sl_sync_cfg_r12_s::rx_params_ncell_r12_s_::disc_sync_win_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "sl_sync_cfg_r12_s::rx_params_ncell_r12_s_::disc_sync_win_r12_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "sl_sync_cfg_r12_s::rx_params_ncell_r12_s_::disc_sync_win_r12_e_"); } std::string sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_win_len_br_r13_opts::to_string() const { - static constexpr const char* options[] = {"ms20", "ms40", "ms60", "ms80", "ms120", "ms160", "ms200", "spare"}; + static const char* options[] = {"ms20", "ms40", "ms60", "ms80", "ms120", "ms160", "ms200", "spare"}; return convert_enum_idx( options, 8, value, "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_win_len_br_r13_e_"); } uint8_t sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_win_len_br_r13_opts::to_number() const { - static constexpr uint8_t options[] = {20, 40, 60, 80, 120, 160, 200}; - return convert_enum_idx( + static const uint8_t options[] = {20, 40, 60, 80, 120, 160, 200}; + return map_enum_number( options, 7, value, "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_win_len_br_r13_e_"); } std::string sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_repeat_pattern_r13_opts::to_string() const { - static constexpr const char* options[] = {"everyRF", "every2ndRF", "every4thRF", "every8thRF"}; + static const char* options[] = {"everyRF", "every2ndRF", "every4thRF", "every8thRF"}; return convert_enum_idx( options, 4, value, "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_repeat_pattern_r13_e_"); } @@ -1300,7 +1297,7 @@ std::string sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"subframePattern10-r13", "subframePattern40-r13"}; + static const char* options[] = {"subframePattern10-r13", "subframePattern40-r13"}; return convert_enum_idx( options, 2, @@ -1311,8 +1308,8 @@ uint8_t sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_bitmap_br_r13_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {10, 40}; - return convert_enum_idx( + static const uint8_t options[] = {10, 40}; + return map_enum_number( options, 2, value, @@ -1321,26 +1318,26 @@ sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::fdd_dl_or_tdd_sf_b std::string sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_hop_cfg_common_r13_opts::to_string() const { - static constexpr const char* options[] = {"on", "off"}; + static const char* options[] = {"on", "off"}; return convert_enum_idx( options, 2, value, "sib_type1_v1310_ies_s::bw_reduced_access_related_info_r13_s_::si_hop_cfg_common_r13_e_"); } std::string udt_restricting_r13_s::udt_restricting_time_r13_opts::to_string() const { - static constexpr const char* options[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; + static const char* options[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; return convert_enum_idx(options, 8, value, "udt_restricting_r13_s::udt_restricting_time_r13_e_"); } uint16_t udt_restricting_r13_s::udt_restricting_time_r13_opts::to_number() const { - static constexpr uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; - return convert_enum_idx(options, 8, value, "udt_restricting_r13_s::udt_restricting_time_r13_e_"); + static const uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(options, 8, value, "udt_restricting_r13_s::udt_restricting_time_r13_e_"); } // WLAN-backhaulRate-r12 ::= ENUMERATED std::string wlan_backhaul_rate_r12_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "r0", "r4", "r8", "r16", "r32", "r64", "r128", "r256", "r512", "r1024", "r2048", "r4096", "r8192", "r16384", "r32768", "r65536", "r131072", "r262144", "r524288", "r1048576", "r2097152", "r4194304", "r8388608", "r16777216", @@ -1349,650 +1346,649 @@ std::string wlan_backhaul_rate_r12_opts::to_string() const } uint64_t wlan_backhaul_rate_r12_opts::to_number() const { - static constexpr uint64_t options[] = {0, 4, 8, 16, 32, 64, 128, - 256, 512, 1024, 2048, 4096, 8192, 16384, - 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, - 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, - 536870912, 1073741824, 2147483648, 4294967296}; - return convert_enum_idx(options, 32, value, "wlan_backhaul_rate_r12_e"); + static const uint64_t options[] = {0, 4, 8, 16, 32, 64, 128, + 256, 512, 1024, 2048, 4096, 8192, 16384, + 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, + 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, + 536870912, 1073741824, 2147483648, 4294967296}; + return map_enum_number(options, 32, value, "wlan_backhaul_rate_r12_e"); } std::string bcch_cfg_s::mod_period_coeff_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n8", "n16"}; + static const char* options[] = {"n2", "n4", "n8", "n16"}; return convert_enum_idx(options, 4, value, "bcch_cfg_s::mod_period_coeff_e_"); } uint8_t bcch_cfg_s::mod_period_coeff_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8, 16}; - return convert_enum_idx(options, 4, value, "bcch_cfg_s::mod_period_coeff_e_"); + static const uint8_t options[] = {2, 4, 8, 16}; + return map_enum_number(options, 4, value, "bcch_cfg_s::mod_period_coeff_e_"); } std::string carrier_freq_nr_r15_s::subcarrier_spacing_ssb_r15_opts::to_string() const { - static constexpr const char* options[] = {"kHz15", "kHz30", "kHz120", "kHz240"}; + static const char* options[] = {"kHz15", "kHz30", "kHz120", "kHz240"}; return convert_enum_idx(options, 4, value, "carrier_freq_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); } uint8_t carrier_freq_nr_r15_s::subcarrier_spacing_ssb_r15_opts::to_number() const { - static constexpr uint8_t options[] = {15, 30, 120, 240}; - return convert_enum_idx(options, 4, value, "carrier_freq_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); + static const uint8_t options[] = {15, 30, 120, 240}; + return map_enum_number(options, 4, value, "carrier_freq_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); } std::string eab_cfg_r11_s::eab_category_r11_opts::to_string() const { - static constexpr const char* options[] = {"a", "b", "c"}; + static const char* options[] = {"a", "b", "c"}; return convert_enum_idx(options, 3, value, "eab_cfg_r11_s::eab_category_r11_e_"); } std::string freq_hop_params_r13_s::dummy_opts::to_string() const { - static constexpr const char* options[] = {"nb2", "nb4"}; + static const char* options[] = {"nb2", "nb4"}; return convert_enum_idx(options, 2, value, "freq_hop_params_r13_s::dummy_e_"); } uint8_t freq_hop_params_r13_s::dummy_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "freq_hop_params_r13_s::dummy_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "freq_hop_params_r13_s::dummy_e_"); } std::string freq_hop_params_r13_s::dummy2_c_::interv_fdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int1", "int2", "int4", "int8"}; + static const char* options[] = {"int1", "int2", "int4", "int8"}; return convert_enum_idx(options, 4, value, "freq_hop_params_r13_s::dummy2_c_::interv_fdd_r13_e_"); } uint8_t freq_hop_params_r13_s::dummy2_c_::interv_fdd_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx(options, 4, value, "freq_hop_params_r13_s::dummy2_c_::interv_fdd_r13_e_"); + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number(options, 4, value, "freq_hop_params_r13_s::dummy2_c_::interv_fdd_r13_e_"); } std::string freq_hop_params_r13_s::dummy2_c_::interv_tdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int1", "int5", "int10", "int20"}; + static const char* options[] = {"int1", "int5", "int10", "int20"}; return convert_enum_idx(options, 4, value, "freq_hop_params_r13_s::dummy2_c_::interv_tdd_r13_e_"); } uint8_t freq_hop_params_r13_s::dummy2_c_::interv_tdd_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 5, 10, 20}; - return convert_enum_idx(options, 4, value, "freq_hop_params_r13_s::dummy2_c_::interv_tdd_r13_e_"); + static const uint8_t options[] = {1, 5, 10, 20}; + return map_enum_number(options, 4, value, "freq_hop_params_r13_s::dummy2_c_::interv_tdd_r13_e_"); } std::string freq_hop_params_r13_s::dummy2_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; + static const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; return convert_enum_idx(options, 2, value, "freq_hop_params_r13_s::dummy2_c_::types"); } std::string freq_hop_params_r13_s::dummy3_c_::interv_fdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int2", "int4", "int8", "int16"}; + static const char* options[] = {"int2", "int4", "int8", "int16"}; return convert_enum_idx(options, 4, value, "freq_hop_params_r13_s::dummy3_c_::interv_fdd_r13_e_"); } uint8_t freq_hop_params_r13_s::dummy3_c_::interv_fdd_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8, 16}; - return convert_enum_idx(options, 4, value, "freq_hop_params_r13_s::dummy3_c_::interv_fdd_r13_e_"); + static const uint8_t options[] = {2, 4, 8, 16}; + return map_enum_number(options, 4, value, "freq_hop_params_r13_s::dummy3_c_::interv_fdd_r13_e_"); } std::string freq_hop_params_r13_s::dummy3_c_::interv_tdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int5", "int10", "int20", "int40"}; + static const char* options[] = {"int5", "int10", "int20", "int40"}; return convert_enum_idx(options, 4, value, "freq_hop_params_r13_s::dummy3_c_::interv_tdd_r13_e_"); } uint8_t freq_hop_params_r13_s::dummy3_c_::interv_tdd_r13_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 20, 40}; - return convert_enum_idx(options, 4, value, "freq_hop_params_r13_s::dummy3_c_::interv_tdd_r13_e_"); + static const uint8_t options[] = {5, 10, 20, 40}; + return map_enum_number(options, 4, value, "freq_hop_params_r13_s::dummy3_c_::interv_tdd_r13_e_"); } std::string freq_hop_params_r13_s::dummy3_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; + static const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; return convert_enum_idx(options, 2, value, "freq_hop_params_r13_s::dummy3_c_::types"); } std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int1", "int2", "int4", "int8"}; + static const char* options[] = {"int1", "int2", "int4", "int8"}; return convert_enum_idx( options, 4, value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_e_"); } uint8_t freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number( options, 4, value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_fdd_r13_e_"); } std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int1", "int5", "int10", "int20"}; + static const char* options[] = {"int1", "int5", "int10", "int20"}; return convert_enum_idx( options, 4, value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_e_"); } uint8_t freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 5, 10, 20}; - return convert_enum_idx( + static const uint8_t options[] = {1, 5, 10, 20}; + return map_enum_number( options, 4, value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::interv_tdd_r13_e_"); } std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; + static const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; return convert_enum_idx(options, 2, value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_a_r13_c_::types"); } std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int2", "int4", "int8", "int16"}; + static const char* options[] = {"int2", "int4", "int8", "int16"}; return convert_enum_idx( options, 4, value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_e_"); } uint8_t freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8, 16}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 8, 16}; + return map_enum_number( options, 4, value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_fdd_r13_e_"); } std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"int5", "int10", "int20", "int40"}; + static const char* options[] = {"int5", "int10", "int20", "int40"}; return convert_enum_idx( options, 4, value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_e_"); } uint8_t freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 20, 40}; - return convert_enum_idx( + static const uint8_t options[] = {5, 10, 20, 40}; + return map_enum_number( options, 4, value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::interv_tdd_r13_e_"); } std::string freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; + static const char* options[] = {"interval-FDD-r13", "interval-TDD-r13"}; return convert_enum_idx(options, 2, value, "freq_hop_params_r13_s::interv_ul_hop_cfg_common_mode_b_r13_c_::types"); } std::string mbms_carrier_type_r14_s::carrier_type_r14_opts::to_string() const { - static constexpr const char* options[] = {"mbms", "fembmsMixed", "fembmsDedicated"}; + static const char* options[] = {"mbms", "fembmsMixed", "fembmsDedicated"}; return convert_enum_idx(options, 3, value, "mbms_carrier_type_r14_s::carrier_type_r14_e_"); } std::string mbsfn_area_info_r9_s::non_mbsfn_region_len_opts::to_string() const { - static constexpr const char* options[] = {"s1", "s2"}; + static const char* options[] = {"s1", "s2"}; return convert_enum_idx(options, 2, value, "mbsfn_area_info_r9_s::non_mbsfn_region_len_e_"); } uint8_t mbsfn_area_info_r9_s::non_mbsfn_region_len_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "mbsfn_area_info_r9_s::non_mbsfn_region_len_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "mbsfn_area_info_r9_s::non_mbsfn_region_len_e_"); } std::string mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_repeat_period_r9_opts::to_string() const { - static constexpr const char* options[] = {"rf32", "rf64", "rf128", "rf256"}; + static const char* options[] = {"rf32", "rf64", "rf128", "rf256"}; return convert_enum_idx(options, 4, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_repeat_period_r9_e_"); } uint16_t mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_repeat_period_r9_opts::to_number() const { - static constexpr uint16_t options[] = {32, 64, 128, 256}; - return convert_enum_idx(options, 4, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_repeat_period_r9_e_"); + static const uint16_t options[] = {32, 64, 128, 256}; + return map_enum_number(options, 4, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_repeat_period_r9_e_"); } std::string mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_mod_period_r9_opts::to_string() const { - static constexpr const char* options[] = {"rf512", "rf1024"}; + static const char* options[] = {"rf512", "rf1024"}; return convert_enum_idx(options, 2, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_mod_period_r9_e_"); } uint16_t mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_mod_period_r9_opts::to_number() const { - static constexpr uint16_t options[] = {512, 1024}; - return convert_enum_idx(options, 2, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_mod_period_r9_e_"); + static const uint16_t options[] = {512, 1024}; + return map_enum_number(options, 2, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::mcch_mod_period_r9_e_"); } std::string mbsfn_area_info_r9_s::mcch_cfg_r9_s_::sig_mcs_r9_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n7", "n13", "n19"}; + static const char* options[] = {"n2", "n7", "n13", "n19"}; return convert_enum_idx(options, 4, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::sig_mcs_r9_e_"); } uint8_t mbsfn_area_info_r9_s::mcch_cfg_r9_s_::sig_mcs_r9_opts::to_number() const { - static constexpr uint8_t options[] = {2, 7, 13, 19}; - return convert_enum_idx(options, 4, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::sig_mcs_r9_e_"); + static const uint8_t options[] = {2, 7, 13, 19}; + return map_enum_number(options, 4, value, "mbsfn_area_info_r9_s::mcch_cfg_r9_s_::sig_mcs_r9_e_"); } std::string mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_repeat_period_v1430_opts::to_string() const { - static constexpr const char* options[] = {"rf1", "rf2", "rf4", "rf8", "rf16"}; + static const char* options[] = {"rf1", "rf2", "rf4", "rf8", "rf16"}; return convert_enum_idx(options, 5, value, "mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_repeat_period_v1430_e_"); } uint8_t mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_repeat_period_v1430_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 16}; - return convert_enum_idx(options, 5, value, "mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_repeat_period_v1430_e_"); + static const uint8_t options[] = {1, 2, 4, 8, 16}; + return map_enum_number(options, 5, value, "mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_repeat_period_v1430_e_"); } std::string mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_mod_period_v1430_opts::to_string() const { - static constexpr const char* options[] = { - "rf1", "rf2", "rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "spare7"}; + static const char* options[] = {"rf1", "rf2", "rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "spare7"}; return convert_enum_idx(options, 10, value, "mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_mod_period_v1430_e_"); } uint16_t mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_mod_period_v1430_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; - return convert_enum_idx(options, 9, value, "mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_mod_period_v1430_e_"); + static const uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return map_enum_number(options, 9, value, "mbsfn_area_info_r9_s::mcch_cfg_r14_s_::mcch_mod_period_v1430_e_"); } std::string mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_opts::to_string() const { - static constexpr const char* options[] = {"khz-7dot5", "khz-1dot25"}; + static const char* options[] = {"khz-7dot5", "khz-1dot25"}; return convert_enum_idx(options, 2, value, "mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_"); } float mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_opts::to_number() const { - static constexpr float options[] = {-7.5, -1.25}; - return convert_enum_idx(options, 2, value, "mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_"); + static const float options[] = {-7.5, -1.25}; + return map_enum_number(options, 2, value, "mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_"); } std::string mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"-7.5", "-1.25"}; + static const char* options[] = {"-7.5", "-1.25"}; return convert_enum_idx(options, 2, value, "mbsfn_area_info_r9_s::subcarrier_spacing_mbms_r14_e_"); } std::string mbsfn_sf_cfg_s::radioframe_alloc_period_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32"}; + static const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32"}; return convert_enum_idx(options, 6, value, "mbsfn_sf_cfg_s::radioframe_alloc_period_e_"); } uint8_t mbsfn_sf_cfg_s::radioframe_alloc_period_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 16, 32}; - return convert_enum_idx(options, 6, value, "mbsfn_sf_cfg_s::radioframe_alloc_period_e_"); + static const uint8_t options[] = {1, 2, 4, 8, 16, 32}; + return map_enum_number(options, 6, value, "mbsfn_sf_cfg_s::radioframe_alloc_period_e_"); } std::string mbsfn_sf_cfg_s::sf_alloc_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"oneFrame", "fourFrames"}; + static const char* options[] = {"oneFrame", "fourFrames"}; return convert_enum_idx(options, 2, value, "mbsfn_sf_cfg_s::sf_alloc_c_::types"); } uint8_t mbsfn_sf_cfg_s::sf_alloc_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 4}; - return convert_enum_idx(options, 2, value, "mbsfn_sf_cfg_s::sf_alloc_c_::types"); + static const uint8_t options[] = {1, 4}; + return map_enum_number(options, 2, value, "mbsfn_sf_cfg_s::sf_alloc_c_::types"); } std::string mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"oneFrame-v1430", "fourFrames-v1430"}; + static const char* options[] = {"oneFrame-v1430", "fourFrames-v1430"}; return convert_enum_idx(options, 2, value, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::types"); } uint8_t mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 4}; - return convert_enum_idx(options, 2, value, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::types"); + static const uint8_t options[] = {1, 4}; + return map_enum_number(options, 2, value, "mbsfn_sf_cfg_v1430_s::sf_alloc_v1430_c_::types"); } std::string pcch_cfg_s::default_paging_cycle_opts::to_string() const { - static constexpr const char* options[] = {"rf32", "rf64", "rf128", "rf256"}; + static const char* options[] = {"rf32", "rf64", "rf128", "rf256"}; return convert_enum_idx(options, 4, value, "pcch_cfg_s::default_paging_cycle_e_"); } uint16_t pcch_cfg_s::default_paging_cycle_opts::to_number() const { - static constexpr uint16_t options[] = {32, 64, 128, 256}; - return convert_enum_idx(options, 4, value, "pcch_cfg_s::default_paging_cycle_e_"); + static const uint16_t options[] = {32, 64, 128, 256}; + return map_enum_number(options, 4, value, "pcch_cfg_s::default_paging_cycle_e_"); } std::string pcch_cfg_s::nb_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "fourT", "twoT", "oneT", "halfT", "quarterT", "oneEighthT", "oneSixteenthT", "oneThirtySecondT"}; return convert_enum_idx(options, 8, value, "pcch_cfg_s::nb_e_"); } float pcch_cfg_s::nb_opts::to_number() const { - static constexpr float options[] = {4.0, 2.0, 1.0, 0.5, 0.25, 0.125, 0.0625, 0.03125}; - return convert_enum_idx(options, 8, value, "pcch_cfg_s::nb_e_"); + static const float options[] = {4.0, 2.0, 1.0, 0.5, 0.25, 0.125, 0.0625, 0.03125}; + return map_enum_number(options, 8, value, "pcch_cfg_s::nb_e_"); } std::string pcch_cfg_s::nb_opts::to_number_string() const { - static constexpr const char* options[] = {"4", "2", "1", "0.5", "0.25", "1/8", "1/16", "1/32"}; + static const char* options[] = {"4", "2", "1", "0.5", "0.25", "1/8", "1/16", "1/32"}; return convert_enum_idx(options, 8, value, "pcch_cfg_s::nb_e_"); } std::string pcch_cfg_v1310_s::mpdcch_num_repeat_paging_r13_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "r128", "r256"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "r128", "r256"}; return convert_enum_idx(options, 9, value, "pcch_cfg_v1310_s::mpdcch_num_repeat_paging_r13_e_"); } uint16_t pcch_cfg_v1310_s::mpdcch_num_repeat_paging_r13_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; - return convert_enum_idx(options, 9, value, "pcch_cfg_v1310_s::mpdcch_num_repeat_paging_r13_e_"); + static const uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return map_enum_number(options, 9, value, "pcch_cfg_v1310_s::mpdcch_num_repeat_paging_r13_e_"); } std::string pcch_cfg_v1310_s::nb_v1310_opts::to_string() const { - static constexpr const char* options[] = {"one64thT", "one128thT", "one256thT"}; + static const char* options[] = {"one64thT", "one128thT", "one256thT"}; return convert_enum_idx(options, 3, value, "pcch_cfg_v1310_s::nb_v1310_e_"); } uint16_t pcch_cfg_v1310_s::nb_v1310_opts::to_number() const { - static constexpr uint16_t options[] = {64, 128, 256}; - return convert_enum_idx(options, 3, value, "pcch_cfg_v1310_s::nb_v1310_e_"); + static const uint16_t options[] = {64, 128, 256}; + return map_enum_number(options, 3, value, "pcch_cfg_v1310_s::nb_v1310_e_"); } std::string pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_a_r13_opts::to_string() const { - static constexpr const char* options[] = {"r16", "r32"}; + static const char* options[] = {"r16", "r32"}; return convert_enum_idx(options, 2, value, "pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_a_r13_e_"); } uint8_t pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_a_r13_opts::to_number() const { - static constexpr uint8_t options[] = {16, 32}; - return convert_enum_idx(options, 2, value, "pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_a_r13_e_"); + static const uint8_t options[] = {16, 32}; + return map_enum_number(options, 2, value, "pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_a_r13_e_"); } std::string pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_b_r13_opts::to_string() const { - static constexpr const char* options[] = {"r192", "r256", "r384", "r512", "r768", "r1024", "r1536", "r2048"}; + static const char* options[] = {"r192", "r256", "r384", "r512", "r768", "r1024", "r1536", "r2048"}; return convert_enum_idx(options, 8, value, "pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_b_r13_e_"); } uint16_t pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_b_r13_opts::to_number() const { - static constexpr uint16_t options[] = {192, 256, 384, 512, 768, 1024, 1536, 2048}; - return convert_enum_idx(options, 8, value, "pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_b_r13_e_"); + static const uint16_t options[] = {192, 256, 384, 512, 768, 1024, 1536, 2048}; + return map_enum_number(options, 8, value, "pdsch_cfg_common_v1310_s::pdsch_max_num_repeat_cemode_b_r13_e_"); } std::string prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"v1", "v1dot5", "v2", "v2dot5", "v4", "v5", "v8", "v10"}; + static const char* options[] = {"v1", "v1dot5", "v2", "v2dot5", "v4", "v5", "v8", "v10"}; return convert_enum_idx(options, 8, value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); } float prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_opts::to_number() const { - static constexpr float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; - return convert_enum_idx(options, 8, value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); + static const float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; + return map_enum_number(options, 8, value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); } std::string prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_opts::to_number_string() const { - static constexpr const char* options[] = {"1", "1.5", "2", "2.5", "4", "5", "8", "10"}; + static const char* options[] = {"1", "1.5", "2", "2.5", "4", "5", "8", "10"}; return convert_enum_idx(options, 8, value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); } std::string prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"v1", "v2", "v4", "v5", "v8", "v10", "v20", "spare"}; + static const char* options[] = {"v1", "v2", "v4", "v5", "v8", "v10", "v20", "spare"}; return convert_enum_idx(options, 8, value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_"); } uint8_t prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; - return convert_enum_idx(options, 7, value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_"); + static const uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; + return map_enum_number(options, 7, value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_"); } std::string prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fdd-r13", "tdd-r13"}; + static const char* options[] = {"fdd-r13", "tdd-r13"}; return convert_enum_idx(options, 2, value, "prach_cfg_sib_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types"); } std::string pucch_cfg_common_s::delta_pucch_shift_opts::to_string() const { - static constexpr const char* options[] = {"ds1", "ds2", "ds3"}; + static const char* options[] = {"ds1", "ds2", "ds3"}; return convert_enum_idx(options, 3, value, "pucch_cfg_common_s::delta_pucch_shift_e_"); } uint8_t pucch_cfg_common_s::delta_pucch_shift_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx(options, 3, value, "pucch_cfg_common_s::delta_pucch_shift_e_"); + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number(options, 3, value, "pucch_cfg_common_s::delta_pucch_shift_e_"); } std::string pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level0_r13_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "n8"}; + static const char* options[] = {"n1", "n2", "n4", "n8"}; return convert_enum_idx(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level0_r13_e_"); } uint8_t pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level0_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level0_r13_e_"); + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level0_r13_e_"); } std::string pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level1_r13_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "n8"}; + static const char* options[] = {"n1", "n2", "n4", "n8"}; return convert_enum_idx(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level1_r13_e_"); } uint8_t pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level1_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level1_r13_e_"); + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level1_r13_e_"); } std::string pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level2_r13_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8", "n16", "n32"}; + static const char* options[] = {"n4", "n8", "n16", "n32"}; return convert_enum_idx(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level2_r13_e_"); } uint8_t pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level2_r13_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16, 32}; - return convert_enum_idx(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level2_r13_e_"); + static const uint8_t options[] = {4, 8, 16, 32}; + return map_enum_number(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level2_r13_e_"); } std::string pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level3_r13_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8", "n16", "n32"}; + static const char* options[] = {"n4", "n8", "n16", "n32"}; return convert_enum_idx(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level3_r13_e_"); } uint8_t pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level3_r13_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16, 32}; - return convert_enum_idx(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level3_r13_e_"); + static const uint8_t options[] = {4, 8, 16, 32}; + return map_enum_number(options, 4, value, "pucch_cfg_common_v1310_s::pucch_num_repeat_ce_msg4_level3_r13_e_"); } std::string pucch_cfg_common_v1430_s::pucch_num_repeat_ce_msg4_level3_r14_opts::to_string() const { - static constexpr const char* options[] = {"n64", "n128"}; + static const char* options[] = {"n64", "n128"}; return convert_enum_idx(options, 2, value, "pucch_cfg_common_v1430_s::pucch_num_repeat_ce_msg4_level3_r14_e_"); } uint8_t pucch_cfg_common_v1430_s::pucch_num_repeat_ce_msg4_level3_r14_opts::to_number() const { - static constexpr uint8_t options[] = {64, 128}; - return convert_enum_idx(options, 2, value, "pucch_cfg_common_v1430_s::pucch_num_repeat_ce_msg4_level3_r14_e_"); + static const uint8_t options[] = {64, 128}; + return map_enum_number(options, 2, value, "pucch_cfg_common_v1430_s::pucch_num_repeat_ce_msg4_level3_r14_e_"); } std::string pusch_cfg_common_s::pusch_cfg_basic_s_::hop_mode_opts::to_string() const { - static constexpr const char* options[] = {"interSubFrame", "intraAndInterSubFrame"}; + static const char* options[] = {"interSubFrame", "intraAndInterSubFrame"}; return convert_enum_idx(options, 2, value, "pusch_cfg_common_s::pusch_cfg_basic_s_::hop_mode_e_"); } std::string pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_a_r13_opts::to_string() const { - static constexpr const char* options[] = {"r8", "r16", "r32"}; + static const char* options[] = {"r8", "r16", "r32"}; return convert_enum_idx(options, 3, value, "pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_a_r13_e_"); } uint8_t pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_a_r13_opts::to_number() const { - static constexpr uint8_t options[] = {8, 16, 32}; - return convert_enum_idx(options, 3, value, "pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_a_r13_e_"); + static const uint8_t options[] = {8, 16, 32}; + return map_enum_number(options, 3, value, "pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_a_r13_e_"); } std::string pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_b_r13_opts::to_string() const { - static constexpr const char* options[] = {"r192", "r256", "r384", "r512", "r768", "r1024", "r1536", "r2048"}; + static const char* options[] = {"r192", "r256", "r384", "r512", "r768", "r1024", "r1536", "r2048"}; return convert_enum_idx(options, 8, value, "pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_b_r13_e_"); } uint16_t pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_b_r13_opts::to_number() const { - static constexpr uint16_t options[] = {192, 256, 384, 512, 768, 1024, 1536, 2048}; - return convert_enum_idx(options, 8, value, "pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_b_r13_e_"); + static const uint16_t options[] = {192, 256, 384, 512, 768, 1024, 1536, 2048}; + return map_enum_number(options, 8, value, "pusch_cfg_common_v1310_s::pusch_max_num_repeat_cemode_b_r13_e_"); } std::string rach_cfg_common_s::preamb_info_s_::nof_ra_preambs_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; return convert_enum_idx(options, 16, value, "rach_cfg_common_s::preamb_info_s_::nof_ra_preambs_e_"); } uint8_t rach_cfg_common_s::preamb_info_s_::nof_ra_preambs_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return convert_enum_idx(options, 16, value, "rach_cfg_common_s::preamb_info_s_::nof_ra_preambs_e_"); + static const uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number(options, 16, value, "rach_cfg_common_s::preamb_info_s_::nof_ra_preambs_e_"); } std::string rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::size_of_ra_preambs_group_a_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60"}; return convert_enum_idx( options, 15, value, "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::size_of_ra_preambs_group_a_e_"); } uint8_t rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::size_of_ra_preambs_group_a_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60}; - return convert_enum_idx( + static const uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60}; + return map_enum_number( options, 15, value, "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::size_of_ra_preambs_group_a_e_"); } std::string rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_size_group_a_opts::to_string() const { - static constexpr const char* options[] = {"b56", "b144", "b208", "b256"}; + static const char* options[] = {"b56", "b144", "b208", "b256"}; return convert_enum_idx( options, 4, value, "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_size_group_a_e_"); } uint16_t rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_size_group_a_opts::to_number() const { - static constexpr uint16_t options[] = {56, 144, 208, 256}; - return convert_enum_idx( + static const uint16_t options[] = {56, 144, 208, 256}; + return map_enum_number( options, 4, value, "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_size_group_a_e_"); } std::string rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_pwr_offset_group_b_opts::to_string() const { - static constexpr const char* options[] = {"minusinfinity", "dB0", "dB5", "dB8", "dB10", "dB12", "dB15", "dB18"}; + static const char* options[] = {"minusinfinity", "dB0", "dB5", "dB8", "dB10", "dB12", "dB15", "dB18"}; return convert_enum_idx( options, 8, value, "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_pwr_offset_group_b_e_"); } int8_t rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_pwr_offset_group_b_opts::to_number() const { - static constexpr int8_t options[] = {-1, 0, 5, 8, 10, 12, 15, 18}; - return convert_enum_idx( + static const int8_t options[] = {-1, 0, 5, 8, 10, 12, 15, 18}; + return map_enum_number( options, 8, value, "rach_cfg_common_s::preamb_info_s_::preambs_group_a_cfg_s_::msg_pwr_offset_group_b_e_"); } std::string rach_cfg_common_s::ra_supervision_info_s_::ra_resp_win_size_opts::to_string() const { - static constexpr const char* options[] = {"sf2", "sf3", "sf4", "sf5", "sf6", "sf7", "sf8", "sf10"}; + static const char* options[] = {"sf2", "sf3", "sf4", "sf5", "sf6", "sf7", "sf8", "sf10"}; return convert_enum_idx(options, 8, value, "rach_cfg_common_s::ra_supervision_info_s_::ra_resp_win_size_e_"); } uint8_t rach_cfg_common_s::ra_supervision_info_s_::ra_resp_win_size_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4, 5, 6, 7, 8, 10}; - return convert_enum_idx(options, 8, value, "rach_cfg_common_s::ra_supervision_info_s_::ra_resp_win_size_e_"); + static const uint8_t options[] = {2, 3, 4, 5, 6, 7, 8, 10}; + return map_enum_number(options, 8, value, "rach_cfg_common_s::ra_supervision_info_s_::ra_resp_win_size_e_"); } std::string rach_cfg_common_s::ra_supervision_info_s_::mac_contention_resolution_timer_opts::to_string() const { - static constexpr const char* options[] = {"sf8", "sf16", "sf24", "sf32", "sf40", "sf48", "sf56", "sf64"}; + static const char* options[] = {"sf8", "sf16", "sf24", "sf32", "sf40", "sf48", "sf56", "sf64"}; return convert_enum_idx( options, 8, value, "rach_cfg_common_s::ra_supervision_info_s_::mac_contention_resolution_timer_e_"); } uint8_t rach_cfg_common_s::ra_supervision_info_s_::mac_contention_resolution_timer_opts::to_number() const { - static constexpr uint8_t options[] = {8, 16, 24, 32, 40, 48, 56, 64}; - return convert_enum_idx( + static const uint8_t options[] = {8, 16, 24, 32, 40, 48, 56, 64}; + return map_enum_number( options, 8, value, "rach_cfg_common_s::ra_supervision_info_s_::mac_contention_resolution_timer_e_"); } std::string rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_count_r12_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4"}; + static const char* options[] = {"n1", "n2", "n3", "n4"}; return convert_enum_idx( options, 4, value, "rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_count_r12_e_"); } uint8_t rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_count_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 3, 4}; + return map_enum_number( options, 4, value, "rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_count_r12_e_"); } std::string rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_offset_validity_r12_opts::to_string() const { - static constexpr const char* options[] = {"s30", "s60", "s120", "s240", "s300", "s420", "s600", "s900"}; + static const char* options[] = {"s30", "s60", "s120", "s240", "s300", "s420", "s600", "s900"}; return convert_enum_idx( options, 8, value, "rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_offset_validity_r12_e_"); } uint16_t rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_offset_validity_r12_opts::to_number() const { - static constexpr uint16_t options[] = {30, 60, 120, 240, 300, 420, 600, 900}; - return convert_enum_idx( + static const uint16_t options[] = {30, 60, 120, 240, 300, 420, 600, 900}; + return map_enum_number( options, 8, value, "rach_cfg_common_v1250_s::tx_fail_params_r12_s_::conn_est_fail_offset_validity_r12_e_"); } std::string rss_cfg_r15_s::dur_r15_opts::to_string() const { - static constexpr const char* options[] = {"sf8", "sf16", "sf32", "sf40"}; + static const char* options[] = {"sf8", "sf16", "sf32", "sf40"}; return convert_enum_idx(options, 4, value, "rss_cfg_r15_s::dur_r15_e_"); } uint8_t rss_cfg_r15_s::dur_r15_opts::to_number() const { - static constexpr uint8_t options[] = {8, 16, 32, 40}; - return convert_enum_idx(options, 4, value, "rss_cfg_r15_s::dur_r15_e_"); + static const uint8_t options[] = {8, 16, 32, 40}; + return map_enum_number(options, 4, value, "rss_cfg_r15_s::dur_r15_e_"); } std::string rss_cfg_r15_s::periodicity_r15_opts::to_string() const { - static constexpr const char* options[] = {"ms160", "ms320", "ms640", "ms1280"}; + static const char* options[] = {"ms160", "ms320", "ms640", "ms1280"}; return convert_enum_idx(options, 4, value, "rss_cfg_r15_s::periodicity_r15_e_"); } uint16_t rss_cfg_r15_s::periodicity_r15_opts::to_number() const { - static constexpr uint16_t options[] = {160, 320, 640, 1280}; - return convert_enum_idx(options, 4, value, "rss_cfg_r15_s::periodicity_r15_e_"); + static const uint16_t options[] = {160, 320, 640, 1280}; + return map_enum_number(options, 4, value, "rss_cfg_r15_s::periodicity_r15_e_"); } std::string rss_cfg_r15_s::pwr_boost_r15_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB3", "dB4dot8", "dB6"}; + static const char* options[] = {"dB0", "dB3", "dB4dot8", "dB6"}; return convert_enum_idx(options, 4, value, "rss_cfg_r15_s::pwr_boost_r15_e_"); } float rss_cfg_r15_s::pwr_boost_r15_opts::to_number() const { - static constexpr float options[] = {0.0, 3.0, 4.8, 6.0}; - return convert_enum_idx(options, 4, value, "rss_cfg_r15_s::pwr_boost_r15_e_"); + static const float options[] = {0.0, 3.0, 4.8, 6.0}; + return map_enum_number(options, 4, value, "rss_cfg_r15_s::pwr_boost_r15_e_"); } std::string rss_cfg_r15_s::pwr_boost_r15_opts::to_number_string() const { - static constexpr const char* options[] = {"0", "3", "4.8", "6"}; + static const char* options[] = {"0", "3", "4.8", "6"}; return convert_enum_idx(options, 4, value, "rss_cfg_r15_s::pwr_boost_r15_e_"); } std::string resel_info_relay_r13_s::min_hyst_r13_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12", "dBinf"}; + static const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12", "dBinf"}; return convert_enum_idx(options, 6, value, "resel_info_relay_r13_s::min_hyst_r13_e_"); } uint8_t resel_info_relay_r13_s::min_hyst_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 3, 6, 9, 12}; - return convert_enum_idx(options, 5, value, "resel_info_relay_r13_s::min_hyst_r13_e_"); + static const uint8_t options[] = {0, 3, 6, 9, 12}; + return map_enum_number(options, 5, value, "resel_info_relay_r13_s::min_hyst_r13_e_"); } // SIB-Type ::= ENUMERATED std::string sib_type_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "sibType3", "sibType4", "sibType5", "sibType6", "sibType7", "sibType8", "sibType9", "sibType10", "sibType11", "sibType12-v920", "sibType13-v920", "sibType14-v1130", "sibType15-v1130", "sibType16-v1130", "sibType17-v1250", "sibType18-v1250", "sibType19-v1250", "sibType20-v1310", @@ -2001,719 +1997,710 @@ std::string sib_type_opts::to_string() const } uint8_t sib_type_opts::to_number() const { - static constexpr uint8_t options[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26}; - return convert_enum_idx(options, 22, value, "sib_type_e"); + static const uint8_t options[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26}; + return map_enum_number(options, 22, value, "sib_type_e"); } std::string sib8_per_plmn_r11_s::params_cdma2000_r11_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"explicitValue", "defaultValue"}; + static const char* options[] = {"explicitValue", "defaultValue"}; return convert_enum_idx(options, 2, value, "sib8_per_plmn_r11_s::params_cdma2000_r11_c_::types"); } std::string srs_ul_cfg_common_c::setup_s_::srs_bw_cfg_opts::to_string() const { - static constexpr const char* options[] = {"bw0", "bw1", "bw2", "bw3", "bw4", "bw5", "bw6", "bw7"}; + static const char* options[] = {"bw0", "bw1", "bw2", "bw3", "bw4", "bw5", "bw6", "bw7"}; return convert_enum_idx(options, 8, value, "srs_ul_cfg_common_c::setup_s_::srs_bw_cfg_e_"); } uint8_t srs_ul_cfg_common_c::setup_s_::srs_bw_cfg_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; - return convert_enum_idx(options, 8, value, "srs_ul_cfg_common_c::setup_s_::srs_bw_cfg_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; + return map_enum_number(options, 8, value, "srs_ul_cfg_common_c::setup_s_::srs_bw_cfg_e_"); } std::string srs_ul_cfg_common_c::setup_s_::srs_sf_cfg_opts::to_string() const { - static constexpr const char* options[] = {"sc0", - "sc1", - "sc2", - "sc3", - "sc4", - "sc5", - "sc6", - "sc7", - "sc8", - "sc9", - "sc10", - "sc11", - "sc12", - "sc13", - "sc14", - "sc15"}; + static const char* options[] = {"sc0", + "sc1", + "sc2", + "sc3", + "sc4", + "sc5", + "sc6", + "sc7", + "sc8", + "sc9", + "sc10", + "sc11", + "sc12", + "sc13", + "sc14", + "sc15"}; return convert_enum_idx(options, 16, value, "srs_ul_cfg_common_c::setup_s_::srs_sf_cfg_e_"); } uint8_t srs_ul_cfg_common_c::setup_s_::srs_sf_cfg_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; - return convert_enum_idx(options, 16, value, "srs_ul_cfg_common_c::setup_s_::srs_sf_cfg_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; + return map_enum_number(options, 16, value, "srs_ul_cfg_common_c::setup_s_::srs_sf_cfg_e_"); } std::string uac_barr_info_set_r15_s::uac_barr_factor_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "p00", "p05", "p10", "p15", "p20", "p25", "p30", "p40", "p50", "p60", "p70", "p75", "p80", "p85", "p90", "p95"}; return convert_enum_idx(options, 16, value, "uac_barr_info_set_r15_s::uac_barr_factor_r15_e_"); } float uac_barr_info_set_r15_s::uac_barr_factor_r15_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; - return convert_enum_idx(options, 16, value, "uac_barr_info_set_r15_s::uac_barr_factor_r15_e_"); + static const float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; + return map_enum_number(options, 16, value, "uac_barr_info_set_r15_s::uac_barr_factor_r15_e_"); } std::string uac_barr_info_set_r15_s::uac_barr_factor_r15_opts::to_number_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "0.0", "0.5", "1.0", "1.5", "2.0", "2.5", "3.0", "4.0", "5.0", "6.0", "7.0", "7.5", "8.0", "8.5", "9.0", "9.5"}; return convert_enum_idx(options, 16, value, "uac_barr_info_set_r15_s::uac_barr_factor_r15_e_"); } std::string uac_barr_info_set_r15_s::uac_barr_time_r15_opts::to_string() const { - static constexpr const char* options[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; + static const char* options[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; return convert_enum_idx(options, 8, value, "uac_barr_info_set_r15_s::uac_barr_time_r15_e_"); } uint16_t uac_barr_info_set_r15_s::uac_barr_time_r15_opts::to_number() const { - static constexpr uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; - return convert_enum_idx(options, 8, value, "uac_barr_info_set_r15_s::uac_barr_time_r15_e_"); + static const uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(options, 8, value, "uac_barr_info_set_r15_s::uac_barr_time_r15_e_"); } std::string uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"uac-ImplicitAC-BarringList-r15", "uac-ExplicitAC-BarringList-r15"}; + static const char* options[] = {"uac-ImplicitAC-BarringList-r15", "uac-ExplicitAC-BarringList-r15"}; return convert_enum_idx(options, 2, value, "uac_barr_per_plmn_r15_s::uac_ac_barr_list_type_r15_c_::types"); } // UL-CyclicPrefixLength ::= ENUMERATED std::string ul_cp_len_opts::to_string() const { - static constexpr const char* options[] = {"len1", "len2"}; + static const char* options[] = {"len1", "len2"}; return convert_enum_idx(options, 2, value, "ul_cp_len_e"); } uint8_t ul_cp_len_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "ul_cp_len_e"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "ul_cp_len_e"); } std::string ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format3_r10_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF-1", "deltaF0", "deltaF1", "deltaF2", "deltaF3", "deltaF4", "deltaF5", "deltaF6"}; return convert_enum_idx(options, 8, value, "ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format3_r10_e_"); } int8_t ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format3_r10_opts::to_number() const { - static constexpr int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; - return convert_enum_idx(options, 8, value, "ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format3_r10_e_"); + static const int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; + return map_enum_number(options, 8, value, "ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format3_r10_e_"); } std::string ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format1b_cs_r10_opts::to_string() const { - static constexpr const char* options[] = {"deltaF1", "deltaF2", "spare2", "spare1"}; + static const char* options[] = {"deltaF1", "deltaF2", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format1b_cs_r10_e_"); } uint8_t ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format1b_cs_r10_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format1b_cs_r10_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "ul_pwr_ctrl_common_v1020_s::delta_f_pucch_format1b_cs_r10_e_"); } std::string wus_cfg_r15_s::max_dur_factor_r15_opts::to_string() const { - static constexpr const char* options[] = {"one32th", "one16th", "one8th", "one4th"}; + static const char* options[] = {"one32th", "one16th", "one8th", "one4th"}; return convert_enum_idx(options, 4, value, "wus_cfg_r15_s::max_dur_factor_r15_e_"); } uint8_t wus_cfg_r15_s::max_dur_factor_r15_opts::to_number() const { - static constexpr uint8_t options[] = {32, 16, 8, 4}; - return convert_enum_idx(options, 4, value, "wus_cfg_r15_s::max_dur_factor_r15_e_"); + static const uint8_t options[] = {32, 16, 8, 4}; + return map_enum_number(options, 4, value, "wus_cfg_r15_s::max_dur_factor_r15_e_"); } std::string wus_cfg_r15_s::num_pos_r15_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "spare1"}; + static const char* options[] = {"n1", "n2", "n4", "spare1"}; return convert_enum_idx(options, 4, value, "wus_cfg_r15_s::num_pos_r15_e_"); } uint8_t wus_cfg_r15_s::num_pos_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "wus_cfg_r15_s::num_pos_r15_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "wus_cfg_r15_s::num_pos_r15_e_"); } std::string wus_cfg_r15_s::freq_location_r15_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n2", "n4", "spare1"}; + static const char* options[] = {"n0", "n2", "n4", "spare1"}; return convert_enum_idx(options, 4, value, "wus_cfg_r15_s::freq_location_r15_e_"); } uint8_t wus_cfg_r15_s::freq_location_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 2, 4}; - return convert_enum_idx(options, 3, value, "wus_cfg_r15_s::freq_location_r15_e_"); + static const uint8_t options[] = {0, 2, 4}; + return map_enum_number(options, 3, value, "wus_cfg_r15_s::freq_location_r15_e_"); } std::string wus_cfg_r15_s::time_offset_drx_r15_opts::to_string() const { - static constexpr const char* options[] = {"ms40", "ms80", "ms160", "ms240"}; + static const char* options[] = {"ms40", "ms80", "ms160", "ms240"}; return convert_enum_idx(options, 4, value, "wus_cfg_r15_s::time_offset_drx_r15_e_"); } uint8_t wus_cfg_r15_s::time_offset_drx_r15_opts::to_number() const { - static constexpr uint8_t options[] = {40, 80, 160, 240}; - return convert_enum_idx(options, 4, value, "wus_cfg_r15_s::time_offset_drx_r15_e_"); + static const uint8_t options[] = {40, 80, 160, 240}; + return map_enum_number(options, 4, value, "wus_cfg_r15_s::time_offset_drx_r15_e_"); } std::string wus_cfg_r15_s::time_offset_e_drx_short_r15_opts::to_string() const { - static constexpr const char* options[] = {"ms40", "ms80", "ms160", "ms240"}; + static const char* options[] = {"ms40", "ms80", "ms160", "ms240"}; return convert_enum_idx(options, 4, value, "wus_cfg_r15_s::time_offset_e_drx_short_r15_e_"); } uint8_t wus_cfg_r15_s::time_offset_e_drx_short_r15_opts::to_number() const { - static constexpr uint8_t options[] = {40, 80, 160, 240}; - return convert_enum_idx(options, 4, value, "wus_cfg_r15_s::time_offset_e_drx_short_r15_e_"); + static const uint8_t options[] = {40, 80, 160, 240}; + return map_enum_number(options, 4, value, "wus_cfg_r15_s::time_offset_e_drx_short_r15_e_"); } std::string wus_cfg_r15_s::time_offset_e_drx_long_r15_opts::to_string() const { - static constexpr const char* options[] = {"ms1000", "ms2000"}; + static const char* options[] = {"ms1000", "ms2000"}; return convert_enum_idx(options, 2, value, "wus_cfg_r15_s::time_offset_e_drx_long_r15_e_"); } uint16_t wus_cfg_r15_s::time_offset_e_drx_long_r15_opts::to_number() const { - static constexpr uint16_t options[] = {1000, 2000}; - return convert_enum_idx(options, 2, value, "wus_cfg_r15_s::time_offset_e_drx_long_r15_e_"); + static const uint16_t options[] = {1000, 2000}; + return map_enum_number(options, 2, value, "wus_cfg_r15_s::time_offset_e_drx_long_r15_e_"); } std::string cell_resel_info_common_v1460_s::s_search_delta_p_r14_opts::to_string() const { - static constexpr const char* options[] = {"dB6", "dB9", "dB12", "dB15"}; + static const char* options[] = {"dB6", "dB9", "dB12", "dB15"}; return convert_enum_idx(options, 4, value, "cell_resel_info_common_v1460_s::s_search_delta_p_r14_e_"); } uint8_t cell_resel_info_common_v1460_s::s_search_delta_p_r14_opts::to_number() const { - static constexpr uint8_t options[] = {6, 9, 12, 15}; - return convert_enum_idx(options, 4, value, "cell_resel_info_common_v1460_s::s_search_delta_p_r14_e_"); + static const uint8_t options[] = {6, 9, 12, 15}; + return map_enum_number(options, 4, value, "cell_resel_info_common_v1460_s::s_search_delta_p_r14_e_"); } std::string mbms_notif_cfg_r9_s::notif_repeat_coeff_r9_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "mbms_notif_cfg_r9_s::notif_repeat_coeff_r9_e_"); } uint8_t mbms_notif_cfg_r9_s::notif_repeat_coeff_r9_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "mbms_notif_cfg_r9_s::notif_repeat_coeff_r9_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "mbms_notif_cfg_r9_s::notif_repeat_coeff_r9_e_"); } std::string mob_state_params_s::t_eval_opts::to_string() const { - static constexpr const char* options[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; + static const char* options[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "mob_state_params_s::t_eval_e_"); } uint8_t mob_state_params_s::t_eval_opts::to_number() const { - static constexpr uint8_t options[] = {30, 60, 120, 180, 240}; - return convert_enum_idx(options, 5, value, "mob_state_params_s::t_eval_e_"); + static const uint8_t options[] = {30, 60, 120, 180, 240}; + return map_enum_number(options, 5, value, "mob_state_params_s::t_eval_e_"); } std::string mob_state_params_s::t_hyst_normal_opts::to_string() const { - static constexpr const char* options[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; + static const char* options[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "mob_state_params_s::t_hyst_normal_e_"); } uint8_t mob_state_params_s::t_hyst_normal_opts::to_number() const { - static constexpr uint8_t options[] = {30, 60, 120, 180, 240}; - return convert_enum_idx(options, 5, value, "mob_state_params_s::t_hyst_normal_e_"); + static const uint8_t options[] = {30, 60, 120, 180, 240}; + return map_enum_number(options, 5, value, "mob_state_params_s::t_hyst_normal_e_"); } std::string redist_serving_info_r13_s::t360_r13_opts::to_string() const { - static constexpr const char* options[] = {"min4", "min8", "min16", "min32", "infinity", "spare3", "spare2", "spare1"}; + static const char* options[] = {"min4", "min8", "min16", "min32", "infinity", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "redist_serving_info_r13_s::t360_r13_e_"); } int8_t redist_serving_info_r13_s::t360_r13_opts::to_number() const { - static constexpr int8_t options[] = {4, 8, 16, 32, -1}; - return convert_enum_idx(options, 5, value, "redist_serving_info_r13_s::t360_r13_e_"); + static const int8_t options[] = {4, 8, 16, 32, -1}; + return map_enum_number(options, 5, value, "redist_serving_info_r13_s::t360_r13_e_"); } std::string sc_mcch_sched_info_r14_s::on_dur_timer_scptm_r14_opts::to_string() const { - static constexpr const char* options[] = { - "psf10", "psf20", "psf100", "psf300", "psf500", "psf1000", "psf1200", "psf1600"}; + static const char* options[] = {"psf10", "psf20", "psf100", "psf300", "psf500", "psf1000", "psf1200", "psf1600"}; return convert_enum_idx(options, 8, value, "sc_mcch_sched_info_r14_s::on_dur_timer_scptm_r14_e_"); } uint16_t sc_mcch_sched_info_r14_s::on_dur_timer_scptm_r14_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 100, 300, 500, 1000, 1200, 1600}; - return convert_enum_idx(options, 8, value, "sc_mcch_sched_info_r14_s::on_dur_timer_scptm_r14_e_"); + static const uint16_t options[] = {10, 20, 100, 300, 500, 1000, 1200, 1600}; + return map_enum_number(options, 8, value, "sc_mcch_sched_info_r14_s::on_dur_timer_scptm_r14_e_"); } std::string sc_mcch_sched_info_r14_s::drx_inactivity_timer_scptm_r14_opts::to_string() const { - static constexpr const char* options[] = {"psf0", - "psf1", - "psf2", - "psf4", - "psf8", - "psf16", - "psf32", - "psf64", - "psf128", - "psf256", - "ps512", - "psf1024", - "psf2048", - "psf4096", - "psf8192", - "psf16384"}; + static const char* options[] = {"psf0", + "psf1", + "psf2", + "psf4", + "psf8", + "psf16", + "psf32", + "psf64", + "psf128", + "psf256", + "ps512", + "psf1024", + "psf2048", + "psf4096", + "psf8192", + "psf16384"}; return convert_enum_idx(options, 16, value, "sc_mcch_sched_info_r14_s::drx_inactivity_timer_scptm_r14_e_"); } uint16_t sc_mcch_sched_info_r14_s::drx_inactivity_timer_scptm_r14_opts::to_number() const { - static constexpr uint16_t options[] = {0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384}; - return convert_enum_idx(options, 16, value, "sc_mcch_sched_info_r14_s::drx_inactivity_timer_scptm_r14_e_"); + static const uint16_t options[] = {0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384}; + return map_enum_number(options, 16, value, "sc_mcch_sched_info_r14_s::drx_inactivity_timer_scptm_r14_e_"); } std::string sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sf10", - "sf20", - "sf32", - "sf40", - "sf64", - "sf80", - "sf128", - "sf160", - "sf256", - "sf320", - "sf512", - "sf640", - "sf1024", - "sf2048", - "sf4096", - "sf8192"}; + static const char* options[] = {"sf10", + "sf20", + "sf32", + "sf40", + "sf64", + "sf80", + "sf128", + "sf160", + "sf256", + "sf320", + "sf512", + "sf640", + "sf1024", + "sf2048", + "sf4096", + "sf8192"}; return convert_enum_idx( options, 16, value, "sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::types"); } uint16_t sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 2048, 4096, 8192}; - return convert_enum_idx( - options, 16, value, "sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::types"); + static const uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 2048, 4096, 8192}; + return map_enum_number(options, 16, value, "sc_mcch_sched_info_r14_s::sched_period_start_offset_scptm_r14_c_::types"); } std::string sl_disc_cfg_relay_ue_r13_s::hyst_max_r13_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12", "dBinf"}; + static const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12", "dBinf"}; return convert_enum_idx(options, 6, value, "sl_disc_cfg_relay_ue_r13_s::hyst_max_r13_e_"); } uint8_t sl_disc_cfg_relay_ue_r13_s::hyst_max_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 3, 6, 9, 12}; - return convert_enum_idx(options, 5, value, "sl_disc_cfg_relay_ue_r13_s::hyst_max_r13_e_"); + static const uint8_t options[] = {0, 3, 6, 9, 12}; + return map_enum_number(options, 5, value, "sl_disc_cfg_relay_ue_r13_s::hyst_max_r13_e_"); } std::string sl_disc_cfg_relay_ue_r13_s::hyst_min_r13_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12"}; + static const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12"}; return convert_enum_idx(options, 5, value, "sl_disc_cfg_relay_ue_r13_s::hyst_min_r13_e_"); } uint8_t sl_disc_cfg_relay_ue_r13_s::hyst_min_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 3, 6, 9, 12}; - return convert_enum_idx(options, 5, value, "sl_disc_cfg_relay_ue_r13_s::hyst_min_r13_e_"); + static const uint8_t options[] = {0, 3, 6, 9, 12}; + return map_enum_number(options, 5, value, "sl_disc_cfg_relay_ue_r13_s::hyst_min_r13_e_"); } std::string sl_disc_cfg_remote_ue_r13_s::hyst_max_r13_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12"}; + static const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12"}; return convert_enum_idx(options, 5, value, "sl_disc_cfg_remote_ue_r13_s::hyst_max_r13_e_"); } uint8_t sl_disc_cfg_remote_ue_r13_s::hyst_max_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 3, 6, 9, 12}; - return convert_enum_idx(options, 5, value, "sl_disc_cfg_remote_ue_r13_s::hyst_max_r13_e_"); + static const uint8_t options[] = {0, 3, 6, 9, 12}; + return map_enum_number(options, 5, value, "sl_disc_cfg_remote_ue_r13_s::hyst_max_r13_e_"); } // TimeAlignmentTimer ::= ENUMERATED std::string time_align_timer_opts::to_string() const { - static constexpr const char* options[] = { - "sf500", "sf750", "sf1280", "sf1920", "sf2560", "sf5120", "sf10240", "infinity"}; + static const char* options[] = {"sf500", "sf750", "sf1280", "sf1920", "sf2560", "sf5120", "sf10240", "infinity"}; return convert_enum_idx(options, 8, value, "time_align_timer_e"); } int16_t time_align_timer_opts::to_number() const { - static constexpr int16_t options[] = {500, 750, 1280, 1920, 2560, 5120, 10240, -1}; - return convert_enum_idx(options, 8, value, "time_align_timer_e"); + static const int16_t options[] = {500, 750, 1280, 1920, 2560, 5120, 10240, -1}; + return map_enum_number(options, 8, value, "time_align_timer_e"); } // UAC-AC1-SelectAssistInfo-r15 ::= ENUMERATED std::string uac_ac1_select_assist_info_r15_opts::to_string() const { - static constexpr const char* options[] = {"a", "b", "c"}; + static const char* options[] = {"a", "b", "c"}; return convert_enum_idx(options, 3, value, "uac_ac1_select_assist_info_r15_e"); } std::string ue_timers_and_consts_s::t300_opts::to_string() const { - static constexpr const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + static const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t300_e_"); } uint16_t ue_timers_and_consts_s::t300_opts::to_number() const { - static constexpr uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t300_e_"); + static const uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::t300_e_"); } std::string ue_timers_and_consts_s::t301_opts::to_string() const { - static constexpr const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + static const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t301_e_"); } uint16_t ue_timers_and_consts_s::t301_opts::to_number() const { - static constexpr uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t301_e_"); + static const uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::t301_e_"); } std::string ue_timers_and_consts_s::t310_opts::to_string() const { - static constexpr const char* options[] = {"ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000"}; + static const char* options[] = {"ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000"}; return convert_enum_idx(options, 7, value, "ue_timers_and_consts_s::t310_e_"); } uint16_t ue_timers_and_consts_s::t310_opts::to_number() const { - static constexpr uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000}; - return convert_enum_idx(options, 7, value, "ue_timers_and_consts_s::t310_e_"); + static const uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000}; + return map_enum_number(options, 7, value, "ue_timers_and_consts_s::t310_e_"); } std::string ue_timers_and_consts_s::n310_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::n310_e_"); } uint8_t ue_timers_and_consts_s::n310_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::n310_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::n310_e_"); } std::string ue_timers_and_consts_s::t311_opts::to_string() const { - static constexpr const char* options[] = {"ms1000", "ms3000", "ms5000", "ms10000", "ms15000", "ms20000", "ms30000"}; + static const char* options[] = {"ms1000", "ms3000", "ms5000", "ms10000", "ms15000", "ms20000", "ms30000"}; return convert_enum_idx(options, 7, value, "ue_timers_and_consts_s::t311_e_"); } uint16_t ue_timers_and_consts_s::t311_opts::to_number() const { - static constexpr uint16_t options[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; - return convert_enum_idx(options, 7, value, "ue_timers_and_consts_s::t311_e_"); + static const uint16_t options[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; + return map_enum_number(options, 7, value, "ue_timers_and_consts_s::t311_e_"); } std::string ue_timers_and_consts_s::n311_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::n311_e_"); } uint8_t ue_timers_and_consts_s::n311_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::n311_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::n311_e_"); } std::string ue_timers_and_consts_s::t300_v1310_opts::to_string() const { - static constexpr const char* options[] = { - "ms2500", "ms3000", "ms3500", "ms4000", "ms5000", "ms6000", "ms8000", "ms10000"}; + static const char* options[] = {"ms2500", "ms3000", "ms3500", "ms4000", "ms5000", "ms6000", "ms8000", "ms10000"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t300_v1310_e_"); } uint16_t ue_timers_and_consts_s::t300_v1310_opts::to_number() const { - static constexpr uint16_t options[] = {2500, 3000, 3500, 4000, 5000, 6000, 8000, 10000}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t300_v1310_e_"); + static const uint16_t options[] = {2500, 3000, 3500, 4000, 5000, 6000, 8000, 10000}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::t300_v1310_e_"); } std::string ue_timers_and_consts_s::t301_v1310_opts::to_string() const { - static constexpr const char* options[] = { - "ms2500", "ms3000", "ms3500", "ms4000", "ms5000", "ms6000", "ms8000", "ms10000"}; + static const char* options[] = {"ms2500", "ms3000", "ms3500", "ms4000", "ms5000", "ms6000", "ms8000", "ms10000"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t301_v1310_e_"); } uint16_t ue_timers_and_consts_s::t301_v1310_opts::to_number() const { - static constexpr uint16_t options[] = {2500, 3000, 3500, 4000, 5000, 6000, 8000, 10000}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t301_v1310_e_"); + static const uint16_t options[] = {2500, 3000, 3500, 4000, 5000, 6000, 8000, 10000}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::t301_v1310_e_"); } std::string ue_timers_and_consts_s::t310_v1330_opts::to_string() const { - static constexpr const char* options[] = {"ms4000", "ms6000"}; + static const char* options[] = {"ms4000", "ms6000"}; return convert_enum_idx(options, 2, value, "ue_timers_and_consts_s::t310_v1330_e_"); } uint16_t ue_timers_and_consts_s::t310_v1330_opts::to_number() const { - static constexpr uint16_t options[] = {4000, 6000}; - return convert_enum_idx(options, 2, value, "ue_timers_and_consts_s::t310_v1330_e_"); + static const uint16_t options[] = {4000, 6000}; + return map_enum_number(options, 2, value, "ue_timers_and_consts_s::t310_v1330_e_"); } std::string ue_timers_and_consts_s::t300_r15_opts::to_string() const { - static constexpr const char* options[] = { - "ms4000", "ms6000", "ms8000", "ms10000", "ms15000", "ms25000", "ms40000", "ms60000"}; + static const char* options[] = {"ms4000", "ms6000", "ms8000", "ms10000", "ms15000", "ms25000", "ms40000", "ms60000"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t300_r15_e_"); } uint16_t ue_timers_and_consts_s::t300_r15_opts::to_number() const { - static constexpr uint16_t options[] = {4000, 6000, 8000, 10000, 15000, 25000, 40000, 60000}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t300_r15_e_"); + static const uint16_t options[] = {4000, 6000, 8000, 10000, 15000, 25000, 40000, 60000}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::t300_r15_e_"); } std::string sched_info_s::si_periodicity_opts::to_string() const { - static constexpr const char* options[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; + static const char* options[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; return convert_enum_idx(options, 7, value, "sched_info_s::si_periodicity_e_"); } uint16_t sched_info_s::si_periodicity_opts::to_number() const { - static constexpr uint16_t options[] = {8, 16, 32, 64, 128, 256, 512}; - return convert_enum_idx(options, 7, value, "sched_info_s::si_periodicity_e_"); + static const uint16_t options[] = {8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(options, 7, value, "sched_info_s::si_periodicity_e_"); } std::string sib_type11_s::warning_msg_segment_type_opts::to_string() const { - static constexpr const char* options[] = {"notLastSegment", "lastSegment"}; + static const char* options[] = {"notLastSegment", "lastSegment"}; return convert_enum_idx(options, 2, value, "sib_type11_s::warning_msg_segment_type_e_"); } std::string sib_type12_r9_s::warning_msg_segment_type_r9_opts::to_string() const { - static constexpr const char* options[] = {"notLastSegment", "lastSegment"}; + static const char* options[] = {"notLastSegment", "lastSegment"}; return convert_enum_idx(options, 2, value, "sib_type12_r9_s::warning_msg_segment_type_r9_e_"); } std::string sib_type14_r11_s::eab_param_r11_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"eab-Common-r11", "eab-PerPLMN-List-r11"}; + static const char* options[] = {"eab-Common-r11", "eab-PerPLMN-List-r11"}; return convert_enum_idx(options, 2, value, "sib_type14_r11_s::eab_param_r11_c_::types"); } std::string sib_type14_r11_s::eab_per_rsrp_r15_opts::to_string() const { - static constexpr const char* options[] = {"thresh0", "thresh1", "thresh2", "thresh3"}; + static const char* options[] = {"thresh0", "thresh1", "thresh2", "thresh3"}; return convert_enum_idx(options, 4, value, "sib_type14_r11_s::eab_per_rsrp_r15_e_"); } uint8_t sib_type14_r11_s::eab_per_rsrp_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "sib_type14_r11_s::eab_per_rsrp_r15_e_"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "sib_type14_r11_s::eab_per_rsrp_r15_e_"); } std::string sib_type2_s::freq_info_s_::ul_bw_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx(options, 6, value, "sib_type2_s::freq_info_s_::ul_bw_e_"); } uint8_t sib_type2_s::freq_info_s_::ul_bw_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "sib_type2_s::freq_info_s_::ul_bw_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "sib_type2_s::freq_info_s_::ul_bw_e_"); } std::string sib_type20_r13_s::sc_mcch_repeat_period_r13_opts::to_string() const { - static constexpr const char* options[] = {"rf2", "rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "rf256"}; + static const char* options[] = {"rf2", "rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "rf256"}; return convert_enum_idx(options, 8, value, "sib_type20_r13_s::sc_mcch_repeat_period_r13_e_"); } uint16_t sib_type20_r13_s::sc_mcch_repeat_period_r13_opts::to_number() const { - static constexpr uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 256}; - return convert_enum_idx(options, 8, value, "sib_type20_r13_s::sc_mcch_repeat_period_r13_e_"); + static const uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 256}; + return map_enum_number(options, 8, value, "sib_type20_r13_s::sc_mcch_repeat_period_r13_e_"); } std::string sib_type20_r13_s::sc_mcch_mod_period_r13_opts::to_string() const { - static constexpr const char* options[] = {"rf2", - "rf4", - "rf8", - "rf16", - "rf32", - "rf64", - "rf128", - "rf256", - "rf512", - "rf1024", - "r2048", - "rf4096", - "rf8192", - "rf16384", - "rf32768", - "rf65536"}; + static const char* options[] = {"rf2", + "rf4", + "rf8", + "rf16", + "rf32", + "rf64", + "rf128", + "rf256", + "rf512", + "rf1024", + "r2048", + "rf4096", + "rf8192", + "rf16384", + "rf32768", + "rf65536"}; return convert_enum_idx(options, 16, value, "sib_type20_r13_s::sc_mcch_mod_period_r13_e_"); } uint32_t sib_type20_r13_s::sc_mcch_mod_period_r13_opts::to_number() const { - static constexpr uint32_t options[] = { - 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536}; - return convert_enum_idx(options, 16, value, "sib_type20_r13_s::sc_mcch_mod_period_r13_e_"); + static const uint32_t options[] = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536}; + return map_enum_number(options, 16, value, "sib_type20_r13_s::sc_mcch_mod_period_r13_e_"); } std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_num_repeat_sc_mcch_r14_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "r128", "r256"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "r128", "r256"}; return convert_enum_idx(options, 9, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_num_repeat_sc_mcch_r14_e_"); } uint16_t sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_num_repeat_sc_mcch_r14_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; - return convert_enum_idx(options, 9, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_num_repeat_sc_mcch_r14_e_"); + static const uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return map_enum_number(options, 9, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_num_repeat_sc_mcch_r14_e_"); } std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_opts::to_string() const { - static constexpr const char* options[] = {"v1", "v1dot5", "v2", "v2dot5", "v4", "v5", "v8", "v10"}; + static const char* options[] = {"v1", "v1dot5", "v2", "v2dot5", "v4", "v5", "v8", "v10"}; return convert_enum_idx( options, 8, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_e_"); } float sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_opts::to_number() const { - static constexpr float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; - return convert_enum_idx( + static const float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; + return map_enum_number( options, 8, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_e_"); } std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"1", "1.5", "2", "2.5", "4", "5", "8", "10"}; + static const char* options[] = {"1", "1.5", "2", "2.5", "4", "5", "8", "10"}; return convert_enum_idx( options, 8, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::fdd_r14_e_"); } std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::tdd_r14_opts::to_string() const { - static constexpr const char* options[] = {"v1", "v2", "v4", "v5", "v8", "v10", "v20"}; + static const char* options[] = {"v1", "v2", "v4", "v5", "v8", "v10", "v20"}; return convert_enum_idx( options, 7, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::tdd_r14_e_"); } uint8_t sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::tdd_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; + return map_enum_number( options, 7, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::tdd_r14_e_"); } std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fdd-r14", "tdd-r14"}; + static const char* options[] = {"fdd-r14", "tdd-r14"}; return convert_enum_idx( options, 2, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_start_sf_sc_mcch_r14_c_::types"); } std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_pdsch_hop_cfg_sc_mcch_r14_opts::to_string() const { - static constexpr const char* options[] = {"off", "ce-ModeA", "ce-ModeB"}; + static const char* options[] = {"off", "ce-ModeA", "ce-ModeB"}; return convert_enum_idx( options, 3, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::mpdcch_pdsch_hop_cfg_sc_mcch_r14_e_"); } std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_repeat_period_br_r14_opts::to_string() const { - static constexpr const char* options[] = { - "rf32", "rf128", "rf512", "rf1024", "rf2048", "rf4096", "rf8192", "rf16384"}; + static const char* options[] = {"rf32", "rf128", "rf512", "rf1024", "rf2048", "rf4096", "rf8192", "rf16384"}; return convert_enum_idx(options, 8, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_repeat_period_br_r14_e_"); } uint16_t sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_repeat_period_br_r14_opts::to_number() const { - static constexpr uint16_t options[] = {32, 128, 512, 1024, 2048, 4096, 8192, 16384}; - return convert_enum_idx(options, 8, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_repeat_period_br_r14_e_"); + static const uint16_t options[] = {32, 128, 512, 1024, 2048, 4096, 8192, 16384}; + return map_enum_number(options, 8, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_repeat_period_br_r14_e_"); } std::string sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_mod_period_br_r14_opts::to_string() const { - static constexpr const char* options[] = {"rf32", - "rf128", - "rf256", - "rf512", - "rf1024", - "rf2048", - "rf4096", - "rf8192", - "rf16384", - "rf32768", - "rf65536", - "rf131072", - "rf262144", - "rf524288", - "rf1048576"}; + static const char* options[] = {"rf32", + "rf128", + "rf256", + "rf512", + "rf1024", + "rf2048", + "rf4096", + "rf8192", + "rf16384", + "rf32768", + "rf65536", + "rf131072", + "rf262144", + "rf524288", + "rf1048576"}; return convert_enum_idx(options, 15, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_mod_period_br_r14_e_"); } uint32_t sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_mod_period_br_r14_opts::to_number() const { - static constexpr uint32_t options[] = { + static const uint32_t options[] = { 32, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576}; - return convert_enum_idx(options, 15, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_mod_period_br_r14_e_"); + return map_enum_number(options, 15, value, "sib_type20_r13_s::br_bcch_cfg_r14_s_::sc_mcch_mod_period_br_r14_e_"); } std::string sib_type20_r13_s::pdsch_max_num_repeat_cemode_a_sc_mtch_r14_opts::to_string() const { - static constexpr const char* options[] = {"r16", "r32"}; + static const char* options[] = {"r16", "r32"}; return convert_enum_idx(options, 2, value, "sib_type20_r13_s::pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_"); } uint8_t sib_type20_r13_s::pdsch_max_num_repeat_cemode_a_sc_mtch_r14_opts::to_number() const { - static constexpr uint8_t options[] = {16, 32}; - return convert_enum_idx(options, 2, value, "sib_type20_r13_s::pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_"); + static const uint8_t options[] = {16, 32}; + return map_enum_number(options, 2, value, "sib_type20_r13_s::pdsch_max_num_repeat_cemode_a_sc_mtch_r14_e_"); } std::string sib_type20_r13_s::pdsch_max_num_repeat_cemode_b_sc_mtch_r14_opts::to_string() const { - static constexpr const char* options[] = {"r192", "r256", "r384", "r512", "r768", "r1024", "r1536", "r2048"}; + static const char* options[] = {"r192", "r256", "r384", "r512", "r768", "r1024", "r1536", "r2048"}; return convert_enum_idx(options, 8, value, "sib_type20_r13_s::pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_"); } uint16_t sib_type20_r13_s::pdsch_max_num_repeat_cemode_b_sc_mtch_r14_opts::to_number() const { - static constexpr uint16_t options[] = {192, 256, 384, 512, 768, 1024, 1536, 2048}; - return convert_enum_idx(options, 8, value, "sib_type20_r13_s::pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_"); + static const uint16_t options[] = {192, 256, 384, 512, 768, 1024, 1536, 2048}; + return map_enum_number(options, 8, value, "sib_type20_r13_s::pdsch_max_num_repeat_cemode_b_sc_mtch_r14_e_"); } std::string sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"plmnCommon-r15", "individualPLMNList-r15"}; + static const char* options[] = {"plmnCommon-r15", "individualPLMNList-r15"}; return convert_enum_idx(options, 2, value, "sib_type25_r15_s::uac_ac1_select_assist_info_r15_c_::types"); } std::string sib_type3_s::cell_resel_info_common_s_::q_hyst_opts::to_string() const { - static constexpr const char* options[] = {"dB0", - "dB1", - "dB2", - "dB3", - "dB4", - "dB5", - "dB6", - "dB8", - "dB10", - "dB12", - "dB14", - "dB16", - "dB18", - "dB20", - "dB22", - "dB24"}; + static const char* options[] = {"dB0", + "dB1", + "dB2", + "dB3", + "dB4", + "dB5", + "dB6", + "dB8", + "dB10", + "dB12", + "dB14", + "dB16", + "dB18", + "dB20", + "dB22", + "dB24"}; return convert_enum_idx(options, 16, value, "sib_type3_s::cell_resel_info_common_s_::q_hyst_e_"); } uint8_t sib_type3_s::cell_resel_info_common_s_::q_hyst_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; - return convert_enum_idx(options, 16, value, "sib_type3_s::cell_resel_info_common_s_::q_hyst_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return map_enum_number(options, 16, value, "sib_type3_s::cell_resel_info_common_s_::q_hyst_e_"); } std::string sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_opts::to_string() const { - static constexpr const char* options[] = {"dB-6", "dB-4", "dB-2", "dB0"}; + static const char* options[] = {"dB-6", "dB-4", "dB-2", "dB0"}; return convert_enum_idx( options, 4, @@ -2723,8 +2710,8 @@ sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_: int8_t sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_opts::to_number() const { - static constexpr int8_t options[] = {-6, -4, -2, 0}; - return convert_enum_idx( + static const int8_t options[] = {-6, -4, -2, 0}; + return map_enum_number( options, 4, value, @@ -2734,20 +2721,20 @@ sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_: std::string sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_opts::to_string() const { - static constexpr const char* options[] = {"dB-6", "dB-4", "dB-2", "dB0"}; + static const char* options[] = {"dB-6", "dB-4", "dB-2", "dB0"}; return convert_enum_idx( options, 4, value, "sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_"); } int8_t sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_opts::to_number() const { - static constexpr int8_t options[] = {-6, -4, -2, 0}; - return convert_enum_idx( + static const int8_t options[] = {-6, -4, -2, 0}; + return map_enum_number( options, 4, value, "sib_type3_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_"); } std::string pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "posSib1-1-r15", "posSib1-2-r15", "posSib1-3-r15", "posSib1-4-r15", "posSib1-5-r15", "posSib1-6-r15", "posSib1-7-r15", "posSib2-1-r15", "posSib2-2-r15", "posSib2-3-r15", "posSib2-4-r15", "posSib2-5-r15", "posSib2-6-r15", "posSib2-7-r15", "posSib2-8-r15", "posSib2-9-r15", "posSib2-10-r15", "posSib2-11-r15", @@ -2758,382 +2745,370 @@ std::string pos_sys_info_r15_ies_s::pos_sib_type_and_info_r15_item_c_::types_opt std::string sys_info_r8_ies_s::sib_type_and_info_item_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sib2", "sib3", "sib4", "sib5", "sib6", - "sib7", "sib8", "sib9", "sib10", "sib11", - "sib12-v920", "sib13-v920", "sib14-v1130", "sib15-v1130", "sib16-v1130", - "sib17-v1250", "sib18-v1250", "sib19-v1250", "sib20-v1310", "sib21-v1430", - "sib24-v1530", "sib25-v1530", "sib26-v1530"}; + static const char* options[] = {"sib2", "sib3", "sib4", "sib5", "sib6", + "sib7", "sib8", "sib9", "sib10", "sib11", + "sib12-v920", "sib13-v920", "sib14-v1130", "sib15-v1130", "sib16-v1130", + "sib17-v1250", "sib18-v1250", "sib19-v1250", "sib20-v1310", "sib21-v1430", + "sib24-v1530", "sib25-v1530", "sib26-v1530"}; return convert_enum_idx(options, 23, value, "sib_info_item_c::types"); } uint8_t sib_info_item_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26}; - return convert_enum_idx(options, 23, value, "sib_info_item_c::types"); + static const uint8_t options[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26}; + return map_enum_number(options, 23, value, "sib_info_item_c::types"); } std::string sys_info_s::crit_exts_c_::crit_exts_future_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"posSystemInformation-r15", "criticalExtensionsFuture"}; + static const char* options[] = {"posSystemInformation-r15", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "sys_info_s::crit_exts_c_::crit_exts_future_r15_c_::types"); } std::string sys_info_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"systemInformation-r8", "criticalExtensionsFuture-r15"}; + static const char* options[] = {"systemInformation-r8", "criticalExtensionsFuture-r15"}; return convert_enum_idx(options, 2, value, "sys_info_s::crit_exts_c_::types"); } std::string sib_type1_s::cell_access_related_info_s_::cell_barred_opts::to_string() const { - static constexpr const char* options[] = {"barred", "notBarred"}; + static const char* options[] = {"barred", "notBarred"}; return convert_enum_idx(options, 2, value, "sib_type1_s::cell_access_related_info_s_::cell_barred_e_"); } std::string sib_type1_s::cell_access_related_info_s_::intra_freq_resel_opts::to_string() const { - static constexpr const char* options[] = {"allowed", "notAllowed"}; + static const char* options[] = {"allowed", "notAllowed"}; return convert_enum_idx(options, 2, value, "sib_type1_s::cell_access_related_info_s_::intra_freq_resel_e_"); } std::string sib_type1_s::si_win_len_opts::to_string() const { - static constexpr const char* options[] = {"ms1", "ms2", "ms5", "ms10", "ms15", "ms20", "ms40"}; + static const char* options[] = {"ms1", "ms2", "ms5", "ms10", "ms15", "ms20", "ms40"}; return convert_enum_idx(options, 7, value, "sib_type1_s::si_win_len_e_"); } uint8_t sib_type1_s::si_win_len_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 5, 10, 15, 20, 40}; - return convert_enum_idx(options, 7, value, "sib_type1_s::si_win_len_e_"); + static const uint8_t options[] = {1, 2, 5, 10, 15, 20, 40}; + return map_enum_number(options, 7, value, "sib_type1_s::si_win_len_e_"); } std::string bcch_dl_sch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"systemInformation", "systemInformationBlockType1"}; + static const char* options[] = {"systemInformation", "systemInformationBlockType1"}; return convert_enum_idx(options, 2, value, "bcch_dl_sch_msg_type_c::c1_c_::types"); } uint8_t bcch_dl_sch_msg_type_c::c1_c_::types_opts::to_number() const { - switch (value) { - case sib_type1: - return 1; - default: - invalid_enum_number(value, "bcch_dl_sch_msg_type_c::c1_c_::types"); + if (value == sib_type1) { + return 1; } + invalid_enum_number(value, "bcch_dl_sch_msg_type_c::c1_c_::types"); return 0; } std::string bcch_dl_sch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "bcch_dl_sch_msg_type_c::types"); } uint8_t bcch_dl_sch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "bcch_dl_sch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "bcch_dl_sch_msg_type_c::types"); } std::string bcch_dl_sch_msg_type_br_r13_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"systemInformation-BR-r13", "systemInformationBlockType1-BR-r13"}; + static const char* options[] = {"systemInformation-BR-r13", "systemInformationBlockType1-BR-r13"}; return convert_enum_idx(options, 2, value, "bcch_dl_sch_msg_type_br_r13_c::c1_c_::types"); } uint8_t bcch_dl_sch_msg_type_br_r13_c::c1_c_::types_opts::to_number() const { - switch (value) { - case sib_type1_br_r13: - return 1; - default: - invalid_enum_number(value, "bcch_dl_sch_msg_type_br_r13_c::c1_c_::types"); + if (value == sib_type1_br_r13) { + return 1; } + invalid_enum_number(value, "bcch_dl_sch_msg_type_br_r13_c::c1_c_::types"); return 0; } std::string bcch_dl_sch_msg_type_br_r13_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "bcch_dl_sch_msg_type_br_r13_c::types"); } uint8_t bcch_dl_sch_msg_type_br_r13_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "bcch_dl_sch_msg_type_br_r13_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "bcch_dl_sch_msg_type_br_r13_c::types"); } // SIB-Type-MBMS-r14 ::= ENUMERATED std::string sib_type_mbms_r14_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "sibType10", "sibType11", "sibType12-v920", "sibType13-v920", "sibType15-v1130", "sibType16-v1130"}; return convert_enum_idx(options, 6, value, "sib_type_mbms_r14_e"); } uint8_t sib_type_mbms_r14_opts::to_number() const { - static constexpr uint8_t options[] = {10, 11, 12, 13, 15, 16}; - return convert_enum_idx(options, 6, value, "sib_type_mbms_r14_e"); + static const uint8_t options[] = {10, 11, 12, 13, 15, 16}; + return map_enum_number(options, 6, value, "sib_type_mbms_r14_e"); } std::string sched_info_mbms_r14_s::si_periodicity_r14_opts::to_string() const { - static constexpr const char* options[] = {"rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; + static const char* options[] = {"rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; return convert_enum_idx(options, 6, value, "sched_info_mbms_r14_s::si_periodicity_r14_e_"); } uint16_t sched_info_mbms_r14_s::si_periodicity_r14_opts::to_number() const { - static constexpr uint16_t options[] = {16, 32, 64, 128, 256, 512}; - return convert_enum_idx(options, 6, value, "sched_info_mbms_r14_s::si_periodicity_r14_e_"); + static const uint16_t options[] = {16, 32, 64, 128, 256, 512}; + return map_enum_number(options, 6, value, "sched_info_mbms_r14_s::si_periodicity_r14_e_"); } std::string non_mbsfn_sf_cfg_r14_s::radio_frame_alloc_period_r14_opts::to_string() const { - static constexpr const char* options[] = {"rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "rf512"}; + static const char* options[] = {"rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "rf512"}; return convert_enum_idx(options, 7, value, "non_mbsfn_sf_cfg_r14_s::radio_frame_alloc_period_r14_e_"); } uint16_t non_mbsfn_sf_cfg_r14_s::radio_frame_alloc_period_r14_opts::to_number() const { - static constexpr uint16_t options[] = {4, 8, 16, 32, 64, 128, 512}; - return convert_enum_idx(options, 7, value, "non_mbsfn_sf_cfg_r14_s::radio_frame_alloc_period_r14_e_"); + static const uint16_t options[] = {4, 8, 16, 32, 64, 128, 512}; + return map_enum_number(options, 7, value, "non_mbsfn_sf_cfg_r14_s::radio_frame_alloc_period_r14_e_"); } std::string sib_type1_mbms_r14_s::si_win_len_r14_opts::to_string() const { - static constexpr const char* options[] = {"ms1", "ms2", "ms5", "ms10", "ms15", "ms20", "ms40", "ms80"}; + static const char* options[] = {"ms1", "ms2", "ms5", "ms10", "ms15", "ms20", "ms40", "ms80"}; return convert_enum_idx(options, 8, value, "sib_type1_mbms_r14_s::si_win_len_r14_e_"); } uint8_t sib_type1_mbms_r14_s::si_win_len_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 5, 10, 15, 20, 40, 80}; - return convert_enum_idx(options, 8, value, "sib_type1_mbms_r14_s::si_win_len_r14_e_"); + static const uint8_t options[] = {1, 2, 5, 10, 15, 20, 40, 80}; + return map_enum_number(options, 8, value, "sib_type1_mbms_r14_s::si_win_len_r14_e_"); } std::string bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"systemInformation-MBMS-r14", "systemInformationBlockType1-MBMS-r14"}; + static const char* options[] = {"systemInformation-MBMS-r14", "systemInformationBlockType1-MBMS-r14"}; return convert_enum_idx(options, 2, value, "bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::types"); } uint8_t bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::types_opts::to_number() const { - switch (value) { - case sib_type1_mbms_r14: - return 1; - default: - invalid_enum_number(value, "bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::types"); + if (value == sib_type1_mbms_r14) { + return 1; } + invalid_enum_number(value, "bcch_dl_sch_msg_type_mbms_r14_c::c1_c_::types"); return 0; } std::string bcch_dl_sch_msg_type_mbms_r14_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "bcch_dl_sch_msg_type_mbms_r14_c::types"); } uint8_t bcch_dl_sch_msg_type_mbms_r14_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "bcch_dl_sch_msg_type_mbms_r14_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "bcch_dl_sch_msg_type_mbms_r14_c::types"); } // NZP-FrequencyDensity-r14 ::= ENUMERATED std::string nzp_freq_density_r14_opts::to_string() const { - static constexpr const char* options[] = {"d1", "d2", "d3"}; + static const char* options[] = {"d1", "d2", "d3"}; return convert_enum_idx(options, 3, value, "nzp_freq_density_r14_e"); } uint8_t nzp_freq_density_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx(options, 3, value, "nzp_freq_density_r14_e"); + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number(options, 3, value, "nzp_freq_density_r14_e"); } std::string p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"nonPrecoded-r13", "beamformedK1a-r13", "beamformedKN-r13"}; + static const char* options[] = {"nonPrecoded-r13", "beamformedK1a-r13", "beamformedKN-r13"}; return convert_enum_idx(options, 3, value, "p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::types"); } uint8_t p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::types_opts::to_number() const { - switch (value) { - case bf_k1a_r13: - return 1; - default: - invalid_enum_number(value, "p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::types"); + if (value == bf_k1a_r13) { + return 1; } + invalid_enum_number(value, "p_c_and_cbsr_r13_s::cbsr_sel_r13_c_::types"); return 0; } std::string csi_rs_cfg_nzp_activation_r14_s::csi_rs_nzp_mode_r14_opts::to_string() const { - static constexpr const char* options[] = {"semiPersistent", "aperiodic"}; + static const char* options[] = {"semiPersistent", "aperiodic"}; return convert_enum_idx(options, 2, value, "csi_rs_cfg_nzp_activation_r14_s::csi_rs_nzp_mode_r14_e_"); } std::string csi_rs_cfg_nzp_r11_s::ant_ports_count_r11_opts::to_string() const { - static constexpr const char* options[] = {"an1", "an2", "an4", "an8"}; + static const char* options[] = {"an1", "an2", "an4", "an8"}; return convert_enum_idx(options, 4, value, "csi_rs_cfg_nzp_r11_s::ant_ports_count_r11_e_"); } uint8_t csi_rs_cfg_nzp_r11_s::ant_ports_count_r11_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx(options, 4, value, "csi_rs_cfg_nzp_r11_s::ant_ports_count_r11_e_"); + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number(options, 4, value, "csi_rs_cfg_nzp_r11_s::ant_ports_count_r11_e_"); } std::string csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::crs_ports_count_r11_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "spare1"}; + static const char* options[] = {"n1", "n2", "n4", "spare1"}; return convert_enum_idx(options, 4, value, "csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::crs_ports_count_r11_e_"); } uint8_t csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::crs_ports_count_r11_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::crs_ports_count_r11_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "csi_rs_cfg_nzp_r11_s::qcl_crs_info_r11_s_::crs_ports_count_r11_e_"); } std::string csi_rs_cfg_nzp_emimo_r13_c::setup_s_::cdm_type_r13_opts::to_string() const { - static constexpr const char* options[] = {"cdm2", "cdm4"}; + static const char* options[] = {"cdm2", "cdm4"}; return convert_enum_idx(options, 2, value, "csi_rs_cfg_nzp_emimo_r13_c::setup_s_::cdm_type_r13_e_"); } uint8_t csi_rs_cfg_nzp_emimo_r13_c::setup_s_::cdm_type_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "csi_rs_cfg_nzp_emimo_r13_c::setup_s_::cdm_type_r13_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "csi_rs_cfg_nzp_emimo_r13_c::setup_s_::cdm_type_r13_e_"); } // CQI-ReportModeAperiodic ::= ENUMERATED std::string cqi_report_mode_aperiodic_opts::to_string() const { - static constexpr const char* options[] = { - "rm12", "rm20", "rm22", "rm30", "rm31", "rm32-v1250", "rm10-v1310", "rm11-v1310"}; + static const char* options[] = {"rm12", "rm20", "rm22", "rm30", "rm31", "rm32-v1250", "rm10-v1310", "rm11-v1310"}; return convert_enum_idx(options, 8, value, "cqi_report_mode_aperiodic_e"); } uint8_t cqi_report_mode_aperiodic_opts::to_number() const { - static constexpr uint8_t options[] = {12, 20, 22, 30, 31, 32, 10, 11}; - return convert_enum_idx(options, 8, value, "cqi_report_mode_aperiodic_e"); + static const uint8_t options[] = {12, 20, 22, 30, 31, 32, 10, 11}; + return map_enum_number(options, 8, value, "cqi_report_mode_aperiodic_e"); } std::string csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n1_r13_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n8"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n8"}; return convert_enum_idx(options, 5, value, "csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n1_r13_e_"); } uint8_t csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n1_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 8}; - return convert_enum_idx(options, 5, value, "csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n1_r13_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 8}; + return map_enum_number(options, 5, value, "csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n1_r13_e_"); } std::string csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n2_r13_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n8"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n8"}; return convert_enum_idx(options, 5, value, "csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n2_r13_e_"); } uint8_t csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n2_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 8}; - return convert_enum_idx(options, 5, value, "csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n2_r13_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 8}; + return map_enum_number(options, 5, value, "csi_rs_cfg_non_precoded_r13_s::codebook_cfg_n2_r13_e_"); } std::string csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o1_r13_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8"}; + static const char* options[] = {"n4", "n8"}; return convert_enum_idx( options, 2, value, "csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o1_r13_e_"); } uint8_t csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o1_r13_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8}; - return convert_enum_idx( - options, 2, value, "csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o1_r13_e_"); + static const uint8_t options[] = {4, 8}; + return map_enum_number(options, 2, value, "csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o1_r13_e_"); } std::string csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o2_r13_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8"}; + static const char* options[] = {"n4", "n8"}; return convert_enum_idx( options, 2, value, "csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o2_r13_e_"); } uint8_t csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o2_r13_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8}; - return convert_enum_idx( - options, 2, value, "csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o2_r13_e_"); + static const uint8_t options[] = {4, 8}; + return map_enum_number(options, 2, value, "csi_rs_cfg_non_precoded_r13_s::codebook_over_sampling_rate_cfg_o2_r13_e_"); } std::string csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n1_v1430_opts::to_string() const { - static constexpr const char* options[] = {"n5", "n6", "n7", "n10", "n12", "n14", "n16"}; + static const char* options[] = {"n5", "n6", "n7", "n10", "n12", "n14", "n16"}; return convert_enum_idx(options, 7, value, "csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n1_v1430_e_"); } uint8_t csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n1_v1430_opts::to_number() const { - static constexpr uint8_t options[] = {5, 6, 7, 10, 12, 14, 16}; - return convert_enum_idx(options, 7, value, "csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n1_v1430_e_"); + static const uint8_t options[] = {5, 6, 7, 10, 12, 14, 16}; + return map_enum_number(options, 7, value, "csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n1_v1430_e_"); } std::string csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n2_v1430_opts::to_string() const { - static constexpr const char* options[] = {"n5", "n6", "n7"}; + static const char* options[] = {"n5", "n6", "n7"}; return convert_enum_idx(options, 3, value, "csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n2_v1430_e_"); } uint8_t csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n2_v1430_opts::to_number() const { - static constexpr uint8_t options[] = {5, 6, 7}; - return convert_enum_idx(options, 3, value, "csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n2_v1430_e_"); + static const uint8_t options[] = {5, 6, 7}; + return map_enum_number(options, 3, value, "csi_rs_cfg_non_precoded_v1430_s::codebook_cfg_n2_v1430_e_"); } std::string csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n1_v1480_opts::to_string() const { - static constexpr const char* options[] = {"n5", "n6", "n7", "n10", "n12", "n14", "n16"}; + static const char* options[] = {"n5", "n6", "n7", "n10", "n12", "n14", "n16"}; return convert_enum_idx(options, 7, value, "csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n1_v1480_e_"); } uint8_t csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n1_v1480_opts::to_number() const { - static constexpr uint8_t options[] = {5, 6, 7, 10, 12, 14, 16}; - return convert_enum_idx(options, 7, value, "csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n1_v1480_e_"); + static const uint8_t options[] = {5, 6, 7, 10, 12, 14, 16}; + return map_enum_number(options, 7, value, "csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n1_v1480_e_"); } std::string csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n2_r1480_opts::to_string() const { - static constexpr const char* options[] = {"n5", "n6", "n7"}; + static const char* options[] = {"n5", "n6", "n7"}; return convert_enum_idx(options, 3, value, "csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n2_r1480_e_"); } uint8_t csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n2_r1480_opts::to_number() const { - static constexpr uint8_t options[] = {5, 6, 7}; - return convert_enum_idx(options, 3, value, "csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n2_r1480_e_"); + static const uint8_t options[] = {5, 6, 7}; + return map_enum_number(options, 3, value, "csi_rs_cfg_non_precoded_v1480_s::codebook_cfg_n2_r1480_e_"); } std::string csi_rs_cfg_emimo_r13_c::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"nonPrecoded-r13", "beamformed-r13"}; + static const char* options[] = {"nonPrecoded-r13", "beamformed-r13"}; return convert_enum_idx(options, 2, value, "csi_rs_cfg_emimo_r13_c::setup_c_::types"); } std::string csi_rs_cfg_emimo_v1430_c::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"nonPrecoded-v1430", "beamformed-v1430"}; + static const char* options[] = {"nonPrecoded-v1430", "beamformed-v1430"}; return convert_enum_idx(options, 2, value, "csi_rs_cfg_emimo_v1430_c::setup_c_::types"); } std::string csi_rs_cfg_emimo_v1480_c::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"nonPrecoded-v1480", "beamformed-v1480"}; + static const char* options[] = {"nonPrecoded-v1480", "beamformed-v1480"}; return convert_enum_idx(options, 2, value, "csi_rs_cfg_emimo_v1480_c::setup_c_::types"); } std::string csi_rs_cfg_emimo_v1530_c::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"nonPrecoded-v1530"}; + static const char* options[] = {"nonPrecoded-v1530"}; return convert_enum_idx(options, 1, value, "csi_rs_cfg_emimo_v1530_c::setup_c_::types"); } std::string cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::wideband_cqi_r11_s_:: csi_report_mode_r11_opts::to_string() const { - static constexpr const char* options[] = {"submode1", "submode2"}; + static const char* options[] = {"submode1", "submode2"}; return convert_enum_idx(options, 2, value, @@ -3143,18 +3118,18 @@ std::string cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_:: uint8_t cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::wideband_cqi_r11_s_:: csi_report_mode_r11_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, - 2, - value, - "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::wideband_cqi_r11_s_::" - "csi_report_mode_r11_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, + 2, + value, + "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::wideband_cqi_r11_s_::csi_" + "report_mode_r11_e_"); } std::string cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::subband_cqi_r11_s_:: periodicity_factor_r11_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, @@ -3164,106 +3139,105 @@ std::string cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_:: uint8_t cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::subband_cqi_r11_s_:: periodicity_factor_r11_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, - 2, - value, - "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::subband_cqi_r11_s_::" - "periodicity_factor_r11_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, + 2, + value, + "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::subband_cqi_r11_s_::" + "periodicity_factor_r11_e_"); } std::string cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"widebandCQI-r11", "subbandCQI-r11"}; + static const char* options[] = {"widebandCQI-r11", "subbandCQI-r11"}; return convert_enum_idx( options, 2, value, "cqi_report_periodic_proc_ext_r11_s::cqi_format_ind_periodic_r11_c_::types"); } std::string cqi_report_periodic_proc_ext_r11_s::periodicity_factor_wb_r13_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "cqi_report_periodic_proc_ext_r11_s::periodicity_factor_wb_r13_e_"); } uint8_t cqi_report_periodic_proc_ext_r11_s::periodicity_factor_wb_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "cqi_report_periodic_proc_ext_r11_s::periodicity_factor_wb_r13_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "cqi_report_periodic_proc_ext_r11_s::periodicity_factor_wb_r13_e_"); } // PollByte-r14 ::= ENUMERATED std::string poll_byte_r14_opts::to_string() const { - static constexpr const char* options[] = {"kB1", "kB2", "kB5", "kB8", "kB10", "kB15", "kB3500", - "kB4000", "kB4500", "kB5000", "kB5500", "kB6000", "kB6500", "kB7000", - "kB7500", "kB8000", "kB9000", "kB10000", "kB11000", "kB12000", "kB13000", - "kB14000", "kB15000", "kB16000", "kB17000", "kB18000", "kB19000", "kB20000", - "kB25000", "kB30000", "kB35000", "kB40000"}; + static const char* options[] = {"kB1", "kB2", "kB5", "kB8", "kB10", "kB15", "kB3500", + "kB4000", "kB4500", "kB5000", "kB5500", "kB6000", "kB6500", "kB7000", + "kB7500", "kB8000", "kB9000", "kB10000", "kB11000", "kB12000", "kB13000", + "kB14000", "kB15000", "kB16000", "kB17000", "kB18000", "kB19000", "kB20000", + "kB25000", "kB30000", "kB35000", "kB40000"}; return convert_enum_idx(options, 32, value, "poll_byte_r14_e"); } uint16_t poll_byte_r14_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 5, 8, 10, 15, 3500, 4000, 4500, 5000, 5500, - 6000, 6500, 7000, 7500, 8000, 9000, 10000, 11000, 12000, 13000, 14000, - 15000, 16000, 17000, 18000, 19000, 20000, 25000, 30000, 35000, 40000}; - return convert_enum_idx(options, 32, value, "poll_byte_r14_e"); + static const uint16_t options[] = {1, 2, 5, 8, 10, 15, 3500, 4000, 4500, 5000, 5500, + 6000, 6500, 7000, 7500, 8000, 9000, 10000, 11000, 12000, 13000, 14000, + 15000, 16000, 17000, 18000, 19000, 20000, 25000, 30000, 35000, 40000}; + return map_enum_number(options, 32, value, "poll_byte_r14_e"); } // PollPDU-r15 ::= ENUMERATED std::string poll_pdu_r15_opts::to_string() const { - static constexpr const char* options[] = {"p4", - "p8", - "p16", - "p32", - "p64", - "p128", - "p256", - "p512", - "p1024", - "p2048-r15", - "p4096-r15", - "p6144-r15", - "p8192-r15", - "p12288-r15", - "p16384-r15", - "pInfinity"}; + static const char* options[] = {"p4", + "p8", + "p16", + "p32", + "p64", + "p128", + "p256", + "p512", + "p1024", + "p2048-r15", + "p4096-r15", + "p6144-r15", + "p8192-r15", + "p12288-r15", + "p16384-r15", + "pInfinity"}; return convert_enum_idx(options, 16, value, "poll_pdu_r15_e"); } int16_t poll_pdu_r15_opts::to_number() const { - static constexpr int16_t options[] = { - 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 6144, 8192, 12288, 16384, -1}; - return convert_enum_idx(options, 16, value, "poll_pdu_r15_e"); + static const int16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 6144, 8192, 12288, 16384, -1}; + return map_enum_number(options, 16, value, "poll_pdu_r15_e"); } // SN-FieldLength ::= ENUMERATED std::string sn_field_len_opts::to_string() const { - static constexpr const char* options[] = {"size5", "size10"}; + static const char* options[] = {"size5", "size10"}; return convert_enum_idx(options, 2, value, "sn_field_len_e"); } uint8_t sn_field_len_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10}; - return convert_enum_idx(options, 2, value, "sn_field_len_e"); + static const uint8_t options[] = {5, 10}; + return map_enum_number(options, 2, value, "sn_field_len_e"); } // SN-FieldLength-r15 ::= ENUMERATED std::string sn_field_len_r15_opts::to_string() const { - static constexpr const char* options[] = {"size5", "size10", "size16-r15"}; + static const char* options[] = {"size5", "size10", "size16-r15"}; return convert_enum_idx(options, 3, value, "sn_field_len_r15_e"); } uint8_t sn_field_len_r15_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 16}; - return convert_enum_idx(options, 3, value, "sn_field_len_r15_e"); + static const uint8_t options[] = {5, 10, 16}; + return map_enum_number(options, 3, value, "sn_field_len_r15_e"); } // T-PollRetransmit ::= ENUMERATED std::string t_poll_retx_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ms5", "ms10", "ms15", "ms20", "ms25", "ms30", "ms35", "ms40", "ms45", "ms50", "ms55", "ms60", "ms65", "ms70", "ms75", "ms80", "ms85", "ms90", "ms95", "ms100", "ms105", "ms110", "ms115", "ms120", @@ -3276,33 +3250,33 @@ std::string t_poll_retx_opts::to_string() const } uint16_t t_poll_retx_opts::to_number() const { - static constexpr uint16_t options[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, - 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, - 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, - 230, 235, 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 2000, 4000}; - return convert_enum_idx(options, 59, value, "t_poll_retx_e"); + static const uint16_t options[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, + 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, + 230, 235, 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 2000, 4000}; + return map_enum_number(options, 59, value, "t_poll_retx_e"); } // T-Reordering ::= ENUMERATED std::string t_reordering_opts::to_string() const { - static constexpr const char* options[] = { - "ms0", "ms5", "ms10", "ms15", "ms20", "ms25", "ms30", "ms35", "ms40", "ms45", "ms50", - "ms55", "ms60", "ms65", "ms70", "ms75", "ms80", "ms85", "ms90", "ms95", "ms100", "ms110", - "ms120", "ms130", "ms140", "ms150", "ms160", "ms170", "ms180", "ms190", "ms200", "ms1600-v1310"}; + static const char* options[] = {"ms0", "ms5", "ms10", "ms15", "ms20", "ms25", "ms30", "ms35", + "ms40", "ms45", "ms50", "ms55", "ms60", "ms65", "ms70", "ms75", + "ms80", "ms85", "ms90", "ms95", "ms100", "ms110", "ms120", "ms130", + "ms140", "ms150", "ms160", "ms170", "ms180", "ms190", "ms200", "ms1600-v1310"}; return convert_enum_idx(options, 32, value, "t_reordering_e"); } uint16_t t_reordering_opts::to_number() const { - static constexpr uint16_t options[] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, - 80, 85, 90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 1600}; - return convert_enum_idx(options, 32, value, "t_reordering_e"); + static const uint16_t options[] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + 80, 85, 90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 1600}; + return map_enum_number(options, 32, value, "t_reordering_e"); } // T-StatusProhibit ::= ENUMERATED std::string t_status_prohibit_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ms0", "ms5", "ms10", "ms15", "ms20", "ms25", "ms30", "ms35", "ms40", "ms45", "ms50", "ms55", "ms60", "ms65", "ms70", "ms75", "ms80", "ms85", "ms90", "ms95", "ms100", @@ -3317,17 +3291,17 @@ std::string t_status_prohibit_opts::to_string() const } uint16_t t_status_prohibit_opts::to_number() const { - static constexpr uint16_t options[] = { - 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, - 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, - 210, 215, 220, 225, 230, 235, 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 1200, 1600, 2000, 2400}; - return convert_enum_idx(options, 62, value, "t_status_prohibit_e"); + static const uint16_t options[] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, + 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, + 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 1200, 1600, 2000, 2400}; + return map_enum_number(options, 62, value, "t_status_prohibit_e"); } std::string cqi_report_aperiodic_v1250_c::setup_s_::aperiodic_csi_trigger_v1250_s_::trigger_sf_set_ind_r12_opts::to_string() const { - static constexpr const char* options[] = {"s1", "s2"}; + static const char* options[] = {"s1", "s2"}; return convert_enum_idx( options, 2, @@ -3337,8 +3311,8 @@ cqi_report_aperiodic_v1250_c::setup_s_::aperiodic_csi_trigger_v1250_s_::trigger_ uint8_t cqi_report_aperiodic_v1250_c::setup_s_::aperiodic_csi_trigger_v1250_s_::trigger_sf_set_ind_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2}; + return map_enum_number( options, 2, value, @@ -3347,19 +3321,19 @@ cqi_report_aperiodic_v1250_c::setup_s_::aperiodic_csi_trigger_v1250_s_::trigger_ std::string cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"oneBit-r14", "twoBit-r14", "threeBit-r14"}; + static const char* options[] = {"oneBit-r14", "twoBit-r14", "threeBit-r14"}; return convert_enum_idx(options, 3, value, "cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::types"); } uint8_t cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx(options, 3, value, "cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::types"); + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number(options, 3, value, "cqi_report_aperiodic_hybrid_r14_s::triggers_r14_c_::types"); } std::string cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::wideband_cqi_r10_s_:: csi_report_mode_r10_opts::to_string() const { - static constexpr const char* options[] = {"submode1", "submode2"}; + static const char* options[] = {"submode1", "submode2"}; return convert_enum_idx(options, 2, value, @@ -3369,18 +3343,18 @@ std::string cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_: uint8_t cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::wideband_cqi_r10_s_:: csi_report_mode_r10_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, - 2, - value, - "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::wideband_cqi_r10_s_::" - "csi_report_mode_r10_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, + 2, + value, + "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::wideband_cqi_r10_s_::" + "csi_report_mode_r10_e_"); } std::string cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::subband_cqi_r10_s_:: periodicity_factor_r10_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, @@ -3390,137 +3364,137 @@ std::string cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_: uint8_t cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::subband_cqi_r10_s_:: periodicity_factor_r10_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, - 2, - value, - "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::subband_cqi_r10_s_::" - "periodicity_factor_r10_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, + 2, + value, + "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::subband_cqi_r10_s_::" + "periodicity_factor_r10_e_"); } std::string cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"widebandCQI-r10", "subbandCQI-r10"}; + static const char* options[] = {"widebandCQI-r10", "subbandCQI-r10"}; return convert_enum_idx( options, 2, value, "cqi_report_periodic_r10_c::setup_s_::cqi_format_ind_periodic_r10_c_::types"); } std::string cqi_report_periodic_v1320_s::periodicity_factor_wb_r13_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "cqi_report_periodic_v1320_s::periodicity_factor_wb_r13_e_"); } uint8_t cqi_report_periodic_v1320_s::periodicity_factor_wb_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "cqi_report_periodic_v1320_s::periodicity_factor_wb_r13_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "cqi_report_periodic_v1320_s::periodicity_factor_wb_r13_e_"); } std::string meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"subframeConfig1-5-r10", "subframeConfig0-r10", "subframeConfig6-r10"}; + static const char* options[] = {"subframeConfig1-5-r10", "subframeConfig0-r10", "subframeConfig6-r10"}; return convert_enum_idx(options, 3, value, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::types"); } uint8_t meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 0, 6}; - return convert_enum_idx(options, 3, value, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::types"); + static const uint8_t options[] = {1, 0, 6}; + return map_enum_number(options, 3, value, "meas_sf_pattern_r10_c::sf_pattern_tdd_r10_c_::types"); } std::string meas_sf_pattern_r10_c::types_opts::to_string() const { - static constexpr const char* options[] = {"subframePatternFDD-r10", "subframePatternTDD-r10"}; + static const char* options[] = {"subframePatternFDD-r10", "subframePatternTDD-r10"}; return convert_enum_idx(options, 2, value, "meas_sf_pattern_r10_c::types"); } // PollByte ::= ENUMERATED std::string poll_byte_opts::to_string() const { - static constexpr const char* options[] = {"kB25", - "kB50", - "kB75", - "kB100", - "kB125", - "kB250", - "kB375", - "kB500", - "kB750", - "kB1000", - "kB1250", - "kB1500", - "kB2000", - "kB3000", - "kBinfinity", - "spare1"}; + static const char* options[] = {"kB25", + "kB50", + "kB75", + "kB100", + "kB125", + "kB250", + "kB375", + "kB500", + "kB750", + "kB1000", + "kB1250", + "kB1500", + "kB2000", + "kB3000", + "kBinfinity", + "spare1"}; return convert_enum_idx(options, 16, value, "poll_byte_e"); } int16_t poll_byte_opts::to_number() const { - static constexpr int16_t options[] = {25, 50, 75, 100, 125, 250, 375, 500, 750, 1000, 1250, 1500, 2000, 3000, -1}; - return convert_enum_idx(options, 15, value, "poll_byte_e"); + static const int16_t options[] = {25, 50, 75, 100, 125, 250, 375, 500, 750, 1000, 1250, 1500, 2000, 3000, -1}; + return map_enum_number(options, 15, value, "poll_byte_e"); } // PollPDU ::= ENUMERATED std::string poll_pdu_opts::to_string() const { - static constexpr const char* options[] = {"p4", "p8", "p16", "p32", "p64", "p128", "p256", "pInfinity"}; + static const char* options[] = {"p4", "p8", "p16", "p32", "p64", "p128", "p256", "pInfinity"}; return convert_enum_idx(options, 8, value, "poll_pdu_e"); } int16_t poll_pdu_opts::to_number() const { - static constexpr int16_t options[] = {4, 8, 16, 32, 64, 128, 256, -1}; - return convert_enum_idx(options, 8, value, "poll_pdu_e"); + static const int16_t options[] = {4, 8, 16, 32, 64, 128, 256, -1}; + return map_enum_number(options, 8, value, "poll_pdu_e"); } std::string spdcch_elems_r15_c::setup_s_::spdcch_set_ref_sig_r15_opts::to_string() const { - static constexpr const char* options[] = {"crs", "dmrs"}; + static const char* options[] = {"crs", "dmrs"}; return convert_enum_idx(options, 2, value, "spdcch_elems_r15_c::setup_s_::spdcch_set_ref_sig_r15_e_"); } std::string spdcch_elems_r15_c::setup_s_::tx_type_r15_opts::to_string() const { - static constexpr const char* options[] = {"localised", "distributed"}; + static const char* options[] = {"localised", "distributed"}; return convert_enum_idx(options, 2, value, "spdcch_elems_r15_c::setup_s_::tx_type_r15_e_"); } std::string spdcch_elems_r15_c::setup_s_::sf_type_r15_opts::to_string() const { - static constexpr const char* options[] = {"mbsfn", "nonmbsfn", "all"}; + static const char* options[] = {"mbsfn", "nonmbsfn", "all"}; return convert_enum_idx(options, 3, value, "spdcch_elems_r15_c::setup_s_::sf_type_r15_e_"); } std::string spdcch_elems_r15_c::setup_s_::rate_matching_mode_r15_opts::to_string() const { - static constexpr const char* options[] = {"m1", "m2", "m3", "m4"}; + static const char* options[] = {"m1", "m2", "m3", "m4"}; return convert_enum_idx(options, 4, value, "spdcch_elems_r15_c::setup_s_::rate_matching_mode_r15_e_"); } uint8_t spdcch_elems_r15_c::setup_s_::rate_matching_mode_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4}; - return convert_enum_idx(options, 4, value, "spdcch_elems_r15_c::setup_s_::rate_matching_mode_r15_e_"); + static const uint8_t options[] = {1, 2, 3, 4}; + return map_enum_number(options, 4, value, "spdcch_elems_r15_c::setup_s_::rate_matching_mode_r15_e_"); } std::string tpc_idx_c::types_opts::to_string() const { - static constexpr const char* options[] = {"indexOfFormat3", "indexOfFormat3A"}; + static const char* options[] = {"indexOfFormat3", "indexOfFormat3A"}; return convert_enum_idx(options, 2, value, "tpc_idx_c::types"); } std::string ul_am_rlc_r15_s::max_retx_thres_r15_opts::to_string() const { - static constexpr const char* options[] = {"t1", "t2", "t3", "t4", "t6", "t8", "t16", "t32"}; + static const char* options[] = {"t1", "t2", "t3", "t4", "t6", "t8", "t16", "t32"}; return convert_enum_idx(options, 8, value, "ul_am_rlc_r15_s::max_retx_thres_r15_e_"); } uint8_t ul_am_rlc_r15_s::max_retx_thres_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 6, 8, 16, 32}; - return convert_enum_idx(options, 8, value, "ul_am_rlc_r15_s::max_retx_thres_r15_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 6, 8, 16, 32}; + return map_enum_number(options, 8, value, "ul_am_rlc_r15_s::max_retx_thres_r15_e_"); } std::string cqi_report_cfg_v1250_s::alt_cqi_table_r12_opts::to_string() const { - static constexpr const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; + static const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; return convert_enum_idx(options, 4, value, "cqi_report_cfg_v1250_s::alt_cqi_table_r12_e_"); } uint8_t cqi_report_cfg_v1250_s::alt_cqi_table_r12_opts::to_number() const @@ -3538,100 +3512,100 @@ uint8_t cqi_report_cfg_v1250_s::alt_cqi_table_r12_opts::to_number() const std::string csi_rs_cfg_r10_s::csi_rs_r10_c_::setup_s_::ant_ports_count_r10_opts::to_string() const { - static constexpr const char* options[] = {"an1", "an2", "an4", "an8"}; + static const char* options[] = {"an1", "an2", "an4", "an8"}; return convert_enum_idx(options, 4, value, "csi_rs_cfg_r10_s::csi_rs_r10_c_::setup_s_::ant_ports_count_r10_e_"); } uint8_t csi_rs_cfg_r10_s::csi_rs_r10_c_::setup_s_::ant_ports_count_r10_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx(options, 4, value, "csi_rs_cfg_r10_s::csi_rs_r10_c_::setup_s_::ant_ports_count_r10_e_"); + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number(options, 4, value, "csi_rs_cfg_r10_s::csi_rs_r10_c_::setup_s_::ant_ports_count_r10_e_"); } std::string delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1_r15_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB-2"}; + static const char* options[] = {"dB0", "dB-2"}; return convert_enum_idx( options, 2, value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1_r15_e_"); } int8_t delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1_r15_opts::to_number() const { - static constexpr int8_t options[] = {0, -2}; - return convert_enum_idx( + static const int8_t options[] = {0, -2}; + return map_enum_number( options, 2, value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1_r15_e_"); } std::string delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1a_r15_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB-2"}; + static const char* options[] = {"dB0", "dB-2"}; return convert_enum_idx( options, 2, value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1a_r15_e_"); } int8_t delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1a_r15_opts::to_number() const { - static constexpr int8_t options[] = {0, -2}; - return convert_enum_idx( + static const int8_t options[] = {0, -2}; + return map_enum_number( options, 2, value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1a_r15_e_"); } std::string delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1b_r15_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB-2"}; + static const char* options[] = {"dB0", "dB-2"}; return convert_enum_idx( options, 2, value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1b_r15_e_"); } int8_t delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1b_r15_opts::to_number() const { - static constexpr int8_t options[] = {0, -2}; - return convert_enum_idx( + static const int8_t options[] = {0, -2}; + return map_enum_number( options, 2, value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format1b_r15_e_"); } std::string delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format3_r15_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB-2"}; + static const char* options[] = {"dB0", "dB-2"}; return convert_enum_idx( options, 2, value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format3_r15_e_"); } int8_t delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format3_r15_opts::to_number() const { - static constexpr int8_t options[] = {0, -2}; - return convert_enum_idx( + static const int8_t options[] = {0, -2}; + return map_enum_number( options, 2, value, "delta_tx_d_offset_list_spucch_r15_s::delta_tx_d_offset_spucch_format3_r15_e_"); } std::string epdcch_set_cfg_r11_s::tx_type_r11_opts::to_string() const { - static constexpr const char* options[] = {"localised", "distributed"}; + static const char* options[] = {"localised", "distributed"}; return convert_enum_idx(options, 2, value, "epdcch_set_cfg_r11_s::tx_type_r11_e_"); } std::string epdcch_set_cfg_r11_s::res_block_assign_r11_s_::num_prb_pairs_r11_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n8"}; + static const char* options[] = {"n2", "n4", "n8"}; return convert_enum_idx(options, 3, value, "epdcch_set_cfg_r11_s::res_block_assign_r11_s_::num_prb_pairs_r11_e_"); } uint8_t epdcch_set_cfg_r11_s::res_block_assign_r11_s_::num_prb_pairs_r11_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8}; - return convert_enum_idx(options, 3, value, "epdcch_set_cfg_r11_s::res_block_assign_r11_s_::num_prb_pairs_r11_e_"); + static const uint8_t options[] = {2, 4, 8}; + return map_enum_number(options, 3, value, "epdcch_set_cfg_r11_s::res_block_assign_r11_s_::num_prb_pairs_r11_e_"); } std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::csi_num_repeat_ce_r13_opts::to_string() const { - static constexpr const char* options[] = {"sf1", "sf2", "sf4", "sf8", "sf16", "sf32"}; + static const char* options[] = {"sf1", "sf2", "sf4", "sf8", "sf16", "sf32"}; return convert_enum_idx( options, 6, value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::csi_num_repeat_ce_r13_e_"); } uint8_t epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::csi_num_repeat_ce_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 16, 32}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4, 8, 16, 32}; + return map_enum_number( options, 6, value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::csi_num_repeat_ce_r13_e_"); } std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_pdsch_hop_cfg_r13_opts::to_string() const { - static constexpr const char* options[] = {"on", "off"}; + static const char* options[] = {"on", "off"}; return convert_enum_idx( options, 2, value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_pdsch_hop_cfg_r13_e_"); } @@ -3639,20 +3613,20 @@ std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_pdsch_hop_ std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"v1", "v1dot5", "v2", "v2dot5", "v4", "v5", "v8", "v10"}; + static const char* options[] = {"v1", "v1dot5", "v2", "v2dot5", "v4", "v5", "v8", "v10"}; return convert_enum_idx( options, 8, value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_e_"); } float epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_opts::to_number() const { - static constexpr float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; - return convert_enum_idx( + static const float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; + return map_enum_number( options, 8, value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_e_"); } std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_opts::to_number_string() const { - static constexpr const char* options[] = {"1", "1.5", "2", "2.5", "4", "5", "8", "10"}; + static const char* options[] = {"1", "1.5", "2", "2.5", "4", "5", "8", "10"}; return convert_enum_idx( options, 8, value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::fdd_r13_e_"); } @@ -3660,136 +3634,136 @@ epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_:: std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::tdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"v1", "v2", "v4", "v5", "v8", "v10", "v20", "spare1"}; + static const char* options[] = {"v1", "v2", "v4", "v5", "v8", "v10", "v20", "spare1"}; return convert_enum_idx( options, 8, value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::tdd_r13_e_"); } uint8_t epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::tdd_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; + return map_enum_number( options, 7, value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::tdd_r13_e_"); } std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fdd-r13", "tdd-r13"}; + static const char* options[] = {"fdd-r13", "tdd-r13"}; return convert_enum_idx( options, 2, value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_start_sf_uess_r13_c_::types"); } std::string epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_num_repeat_r13_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "r128", "r256"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "r128", "r256"}; return convert_enum_idx( options, 9, value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_num_repeat_r13_e_"); } uint16_t epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_num_repeat_r13_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; - return convert_enum_idx( + static const uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return map_enum_number( options, 9, value, "epdcch_set_cfg_r11_s::mpdcch_cfg_r13_c_::setup_s_::mpdcch_num_repeat_r13_e_"); } std::string enable256_qam_r14_c::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"tpc-SubframeSet-Configured-r14", "tpc-SubframeSet-NotConfigured-r14"}; + static const char* options[] = {"tpc-SubframeSet-Configured-r14", "tpc-SubframeSet-NotConfigured-r14"}; return convert_enum_idx(options, 2, value, "enable256_qam_r14_c::setup_c_::types"); } std::string lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_opts::to_string() const { - static constexpr const char* options[] = {"kBps0", - "kBps8", - "kBps16", - "kBps32", - "kBps64", - "kBps128", - "kBps256", - "infinity", - "kBps512-v1020", - "kBps1024-v1020", - "kBps2048-v1020", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"kBps0", + "kBps8", + "kBps16", + "kBps32", + "kBps64", + "kBps128", + "kBps256", + "infinity", + "kBps512-v1020", + "kBps1024-v1020", + "kBps2048-v1020", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_e_"); } int16_t lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_opts::to_number() const { - static constexpr int16_t options[] = {0, 8, 16, 32, 64, 128, 256, -1, 512, 1024, 2048}; - return convert_enum_idx(options, 11, value, "lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_e_"); + static const int16_t options[] = {0, 8, 16, 32, 64, 128, 256, -1, 512, 1024, 2048}; + return map_enum_number(options, 11, value, "lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_e_"); } std::string lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_opts::to_string() const { - static constexpr const char* options[] = {"ms50", "ms100", "ms150", "ms300", "ms500", "ms1000", "spare2", "spare1"}; + static const char* options[] = {"ms50", "ms100", "ms150", "ms300", "ms500", "ms1000", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_e_"); } uint16_t lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_opts::to_number() const { - static constexpr uint16_t options[] = {50, 100, 150, 300, 500, 1000}; - return convert_enum_idx(options, 6, value, "lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_e_"); + static const uint16_t options[] = {50, 100, 150, 300, 500, 1000}; + return map_enum_number(options, 6, value, "lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_e_"); } std::string lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_opts::to_string() const { - static constexpr const char* options[] = {"s0", "s0dot4", "s0dot8", "s1dot6", "s3", "s6", "s12", "s30"}; + static const char* options[] = {"s0", "s0dot4", "s0dot8", "s1dot6", "s3", "s6", "s12", "s30"}; return convert_enum_idx(options, 8, value, "lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_e_"); } float lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_opts::to_number() const { - static constexpr float options[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; - return convert_enum_idx(options, 8, value, "lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_e_"); + static const float options[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; + return map_enum_number(options, 8, value, "lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_e_"); } std::string lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"0", "0.4", "0.8", "1.6", "3", "6", "12", "30"}; + static const char* options[] = {"0", "0.4", "0.8", "1.6", "3", "6", "12", "30"}; return convert_enum_idx(options, 8, value, "lc_ch_cfg_s::bit_rate_query_prohibit_timer_r14_e_"); } std::string lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::setup_opts::to_string() const { - static constexpr const char* options[] = {"spucch", "pucch"}; + static const char* options[] = {"spucch", "pucch"}; return convert_enum_idx(options, 2, value, "lc_ch_cfg_s::lc_ch_sr_restrict_r15_c_::setup_e_"); } // P-a ::= ENUMERATED std::string p_a_opts::to_string() const { - static constexpr const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; + static const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; return convert_enum_idx(options, 8, value, "p_a_e"); } float p_a_opts::to_number() const { - static constexpr float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; - return convert_enum_idx(options, 8, value, "p_a_e"); + static const float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return map_enum_number(options, 8, value, "p_a_e"); } std::string p_a_opts::to_number_string() const { - static constexpr const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; + static const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; return convert_enum_idx(options, 8, value, "p_a_e"); } std::string pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::crs_ports_count_r11_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "spare1"}; + static const char* options[] = {"n1", "n2", "n4", "spare1"}; return convert_enum_idx( options, 4, value, "pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::crs_ports_count_r11_e_"); } uint8_t pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::crs_ports_count_r11_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number( options, 3, value, "pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::crs_ports_count_r11_e_"); } std::string pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::pdsch_start_r11_opts::to_string() const { - static constexpr const char* options[] = {"reserved", "n1", "n2", "n3", "n4", "assigned"}; + static const char* options[] = {"reserved", "n1", "n2", "n3", "n4", "assigned"}; return convert_enum_idx( options, 6, value, "pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::pdsch_start_r11_e_"); } @@ -3813,20 +3787,20 @@ uint8_t pdsch_re_map_qcl_cfg_r11_s::optional_set_of_fields_r11_s_::pdsch_start_r std::string pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::crs_ports_count_v1530_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "spare1"}; + static const char* options[] = {"n1", "n2", "n4", "spare1"}; return convert_enum_idx( options, 4, value, "pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::crs_ports_count_v1530_e_"); } uint8_t pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::crs_ports_count_v1530_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number( options, 3, value, "pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::crs_ports_count_v1530_e_"); } std::string pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::pdsch_start_v1530_opts::to_string() const { - static constexpr const char* options[] = {"reserved", "n1", "n2", "n3", "n4", "assigned"}; + static const char* options[] = {"reserved", "n1", "n2", "n3", "n4", "assigned"}; return convert_enum_idx( options, 6, value, "pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::pdsch_start_v1530_e_"); } @@ -3851,18 +3825,18 @@ uint8_t pdsch_re_map_qcl_cfg_r11_s::codeword_one_cfg_v1530_c_::setup_s_::pdsch_s // PollPDU-v1310 ::= ENUMERATED std::string poll_pdu_v1310_opts::to_string() const { - static constexpr const char* options[] = {"p512", "p1024", "p2048", "p4096", "p6144", "p8192", "p12288", "p16384"}; + static const char* options[] = {"p512", "p1024", "p2048", "p4096", "p6144", "p8192", "p12288", "p16384"}; return convert_enum_idx(options, 8, value, "poll_pdu_v1310_e"); } uint16_t poll_pdu_v1310_opts::to_number() const { - static constexpr uint16_t options[] = {512, 1024, 2048, 4096, 6144, 8192, 12288, 16384}; - return convert_enum_idx(options, 8, value, "poll_pdu_v1310_e"); + static const uint16_t options[] = {512, 1024, 2048, 4096, 6144, 8192, 12288, 16384}; + return map_enum_number(options, 8, value, "poll_pdu_v1310_e"); } std::string rlc_cfg_r15_s::mode_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "am-r15", "um-Bi-Directional-r15", "um-Uni-Directional-UL-r15", "um-Uni-Directional-DL-r15"}; return convert_enum_idx(options, 4, value, "rlc_cfg_r15_s::mode_r15_c_::types"); } @@ -3870,98 +3844,98 @@ std::string rlc_cfg_r15_s::mode_r15_c_::types_opts::to_string() const // SRS-AntennaPort ::= ENUMERATED std::string srs_ant_port_opts::to_string() const { - static constexpr const char* options[] = {"an1", "an2", "an4", "spare1"}; + static const char* options[] = {"an1", "an2", "an4", "spare1"}; return convert_enum_idx(options, 4, value, "srs_ant_port_e"); } uint8_t srs_ant_port_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "srs_ant_port_e"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "srs_ant_port_e"); } // ShortTTI-Length-r15 ::= ENUMERATED std::string short_tti_len_r15_opts::to_string() const { - static constexpr const char* options[] = {"slot", "subslot"}; + static const char* options[] = {"slot", "subslot"}; return convert_enum_idx(options, 2, value, "short_tti_len_r15_e"); } std::string ul_am_rlc_s::max_retx_thres_opts::to_string() const { - static constexpr const char* options[] = {"t1", "t2", "t3", "t4", "t6", "t8", "t16", "t32"}; + static const char* options[] = {"t1", "t2", "t3", "t4", "t6", "t8", "t16", "t32"}; return convert_enum_idx(options, 8, value, "ul_am_rlc_s::max_retx_thres_e_"); } uint8_t ul_am_rlc_s::max_retx_thres_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 6, 8, 16, 32}; - return convert_enum_idx(options, 8, value, "ul_am_rlc_s::max_retx_thres_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 6, 8, 16, 32}; + return map_enum_number(options, 8, value, "ul_am_rlc_s::max_retx_thres_e_"); } std::string ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_mbsfn_r15_opts::to_string() const { - static constexpr const char* options[] = {"tm9", "tm10"}; + static const char* options[] = {"tm9", "tm10"}; return convert_enum_idx(options, 2, value, "ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_mbsfn_r15_e_"); } uint8_t ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_mbsfn_r15_opts::to_number() const { - static constexpr uint8_t options[] = {9, 10}; - return convert_enum_idx(options, 2, value, "ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_mbsfn_r15_e_"); + static const uint8_t options[] = {9, 10}; + return map_enum_number(options, 2, value, "ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_mbsfn_r15_e_"); } std::string ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_non_mbsfn_r15_opts::to_string() const { - static constexpr const char* options[] = {"tm1", "tm2", "tm3", "tm4", "tm6", "tm8", "tm9", "tm10"}; + static const char* options[] = {"tm1", "tm2", "tm3", "tm4", "tm6", "tm8", "tm9", "tm10"}; return convert_enum_idx(options, 8, value, "ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_non_mbsfn_r15_e_"); } uint8_t ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_non_mbsfn_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 6, 8, 9, 10}; - return convert_enum_idx(options, 8, value, "ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_non_mbsfn_r15_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 6, 8, 9, 10}; + return map_enum_number(options, 8, value, "ant_info_ded_stti_r15_c::setup_s_::tx_mode_dl_non_mbsfn_r15_e_"); } std::string ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"n2TxAntenna-tm3-r15", - "n4TxAntenna-tm3-r15", - "n2TxAntenna-tm4-r15", - "n4TxAntenna-tm4-r15", - "n2TxAntenna-tm5-r15", - "n4TxAntenna-tm5-r15", - "n2TxAntenna-tm6-r15", - "n4TxAntenna-tm6-r15", - "n2TxAntenna-tm8-r15", - "n4TxAntenna-tm8-r15", - "n2TxAntenna-tm9and10-r15", - "n4TxAntenna-tm9and10-r15", - "n8TxAntenna-tm9and10-r15"}; + static const char* options[] = {"n2TxAntenna-tm3-r15", + "n4TxAntenna-tm3-r15", + "n2TxAntenna-tm4-r15", + "n4TxAntenna-tm4-r15", + "n2TxAntenna-tm5-r15", + "n4TxAntenna-tm5-r15", + "n2TxAntenna-tm6-r15", + "n4TxAntenna-tm6-r15", + "n2TxAntenna-tm8-r15", + "n4TxAntenna-tm8-r15", + "n2TxAntenna-tm9and10-r15", + "n4TxAntenna-tm9and10-r15", + "n8TxAntenna-tm9and10-r15"}; return convert_enum_idx(options, 13, value, "ant_info_ded_stti_r15_c::setup_s_::codebook_subset_restrict_c_::types"); } std::string ant_info_ded_stti_r15_c::setup_s_::max_layers_mimo_stti_r15_opts::to_string() const { - static constexpr const char* options[] = {"twoLayers", "fourLayers"}; + static const char* options[] = {"twoLayers", "fourLayers"}; return convert_enum_idx(options, 2, value, "ant_info_ded_stti_r15_c::setup_s_::max_layers_mimo_stti_r15_e_"); } uint8_t ant_info_ded_stti_r15_c::setup_s_::max_layers_mimo_stti_r15_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "ant_info_ded_stti_r15_c::setup_s_::max_layers_mimo_stti_r15_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "ant_info_ded_stti_r15_c::setup_s_::max_layers_mimo_stti_r15_e_"); } std::string ant_info_ul_stti_r15_s::tx_mode_ul_stti_r15_opts::to_string() const { - static constexpr const char* options[] = {"tm1", "tm2"}; + static const char* options[] = {"tm1", "tm2"}; return convert_enum_idx(options, 2, value, "ant_info_ul_stti_r15_s::tx_mode_ul_stti_r15_e_"); } uint8_t ant_info_ul_stti_r15_s::tx_mode_ul_stti_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "ant_info_ul_stti_r15_s::tx_mode_ul_stti_r15_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "ant_info_ul_stti_r15_s::tx_mode_ul_stti_r15_e_"); } std::string cqi_report_cfg_r15_c::setup_s_::alt_cqi_table_minus1024_qam_r15_opts::to_string() const { - static constexpr const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; + static const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; return convert_enum_idx(options, 4, value, "cqi_report_cfg_r15_c::setup_s_::alt_cqi_table_minus1024_qam_r15_e_"); } uint8_t cqi_report_cfg_r15_c::setup_s_::alt_cqi_table_minus1024_qam_r15_opts::to_number() const @@ -3979,659 +3953,656 @@ uint8_t cqi_report_cfg_r15_c::setup_s_::alt_cqi_table_minus1024_qam_r15_opts::to std::string cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"widebandCQI", "subbandCQI"}; + static const char* options[] = {"widebandCQI", "subbandCQI"}; return convert_enum_idx(options, 2, value, "cqi_report_periodic_c::setup_s_::cqi_format_ind_periodic_c_::types"); } std::string crs_assist_info_r11_s::ant_ports_count_r11_opts::to_string() const { - static constexpr const char* options[] = {"an1", "an2", "an4", "spare1"}; + static const char* options[] = {"an1", "an2", "an4", "spare1"}; return convert_enum_idx(options, 4, value, "crs_assist_info_r11_s::ant_ports_count_r11_e_"); } uint8_t crs_assist_info_r11_s::ant_ports_count_r11_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "crs_assist_info_r11_s::ant_ports_count_r11_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "crs_assist_info_r11_s::ant_ports_count_r11_e_"); } std::string crs_assist_info_r13_s::ant_ports_count_r13_opts::to_string() const { - static constexpr const char* options[] = {"an1", "an2", "an4", "spare1"}; + static const char* options[] = {"an1", "an2", "an4", "spare1"}; return convert_enum_idx(options, 4, value, "crs_assist_info_r13_s::ant_ports_count_r13_e_"); } uint8_t crs_assist_info_r13_s::ant_ports_count_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "crs_assist_info_r13_s::ant_ports_count_r13_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "crs_assist_info_r13_s::ant_ports_count_r13_e_"); } std::string delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1_r10_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB-2"}; + static const char* options[] = {"dB0", "dB-2"}; return convert_enum_idx( options, 2, value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1_r10_e_"); } int8_t delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1_r10_opts::to_number() const { - static constexpr int8_t options[] = {0, -2}; - return convert_enum_idx( + static const int8_t options[] = {0, -2}; + return map_enum_number( options, 2, value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1_r10_e_"); } std::string delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1a1b_r10_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB-2"}; + static const char* options[] = {"dB0", "dB-2"}; return convert_enum_idx( options, 2, value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1a1b_r10_e_"); } int8_t delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1a1b_r10_opts::to_number() const { - static constexpr int8_t options[] = {0, -2}; - return convert_enum_idx( + static const int8_t options[] = {0, -2}; + return map_enum_number( options, 2, value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format1a1b_r10_e_"); } std::string delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format22a2b_r10_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB-2"}; + static const char* options[] = {"dB0", "dB-2"}; return convert_enum_idx( options, 2, value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format22a2b_r10_e_"); } int8_t delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format22a2b_r10_opts::to_number() const { - static constexpr int8_t options[] = {0, -2}; - return convert_enum_idx( + static const int8_t options[] = {0, -2}; + return map_enum_number( options, 2, value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format22a2b_r10_e_"); } std::string delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format3_r10_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB-2"}; + static const char* options[] = {"dB0", "dB-2"}; return convert_enum_idx( options, 2, value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format3_r10_e_"); } int8_t delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format3_r10_opts::to_number() const { - static constexpr int8_t options[] = {0, -2}; - return convert_enum_idx( + static const int8_t options[] = {0, -2}; + return map_enum_number( options, 2, value, "delta_tx_d_offset_list_pucch_r10_s::delta_tx_d_offset_pucch_format3_r10_e_"); } std::string delta_tx_d_offset_list_pucch_v1130_s::delta_tx_d_offset_pucch_format1b_cs_r11_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB-1"}; + static const char* options[] = {"dB0", "dB-1"}; return convert_enum_idx( options, 2, value, "delta_tx_d_offset_list_pucch_v1130_s::delta_tx_d_offset_pucch_format1b_cs_r11_e_"); } int8_t delta_tx_d_offset_list_pucch_v1130_s::delta_tx_d_offset_pucch_format1b_cs_r11_opts::to_number() const { - static constexpr int8_t options[] = {0, -1}; - return convert_enum_idx( + static const int8_t options[] = {0, -1}; + return map_enum_number( options, 2, value, "delta_tx_d_offset_list_pucch_v1130_s::delta_tx_d_offset_pucch_format1b_cs_r11_e_"); } std::string eimta_main_cfg_r12_c::setup_s_::eimta_cmd_periodicity_r12_opts::to_string() const { - static constexpr const char* options[] = {"sf10", "sf20", "sf40", "sf80"}; + static const char* options[] = {"sf10", "sf20", "sf40", "sf80"}; return convert_enum_idx(options, 4, value, "eimta_main_cfg_r12_c::setup_s_::eimta_cmd_periodicity_r12_e_"); } uint8_t eimta_main_cfg_r12_c::setup_s_::eimta_cmd_periodicity_r12_opts::to_number() const { - static constexpr uint8_t options[] = {10, 20, 40, 80}; - return convert_enum_idx(options, 4, value, "eimta_main_cfg_r12_c::setup_s_::eimta_cmd_periodicity_r12_e_"); + static const uint8_t options[] = {10, 20, 40, 80}; + return map_enum_number(options, 4, value, "eimta_main_cfg_r12_c::setup_s_::eimta_cmd_periodicity_r12_e_"); } std::string eimta_main_cfg_serv_cell_r12_c::setup_s_::eimta_harq_ref_cfg_r12_opts::to_string() const { - static constexpr const char* options[] = {"sa2", "sa4", "sa5"}; + static const char* options[] = {"sa2", "sa4", "sa5"}; return convert_enum_idx(options, 3, value, "eimta_main_cfg_serv_cell_r12_c::setup_s_::eimta_harq_ref_cfg_r12_e_"); } uint8_t eimta_main_cfg_serv_cell_r12_c::setup_s_::eimta_harq_ref_cfg_r12_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 5}; - return convert_enum_idx(options, 3, value, "eimta_main_cfg_serv_cell_r12_c::setup_s_::eimta_harq_ref_cfg_r12_e_"); + static const uint8_t options[] = {2, 4, 5}; + return map_enum_number(options, 3, value, "eimta_main_cfg_serv_cell_r12_c::setup_s_::eimta_harq_ref_cfg_r12_e_"); } std::string neigh_cells_info_r12_s::crs_ports_count_r12_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "spare"}; + static const char* options[] = {"n1", "n2", "n4", "spare"}; return convert_enum_idx(options, 4, value, "neigh_cells_info_r12_s::crs_ports_count_r12_e_"); } uint8_t neigh_cells_info_r12_s::crs_ports_count_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "neigh_cells_info_r12_s::crs_ports_count_r12_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "neigh_cells_info_r12_s::crs_ports_count_r12_e_"); } // PDCCH-CandidateReductionValue-r13 ::= ENUMERATED std::string pdcch_candidate_reduction_value_r13_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n33", "n66", "n100"}; + static const char* options[] = {"n0", "n33", "n66", "n100"}; return convert_enum_idx(options, 4, value, "pdcch_candidate_reduction_value_r13_e"); } uint8_t pdcch_candidate_reduction_value_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 33, 66, 100}; - return convert_enum_idx(options, 4, value, "pdcch_candidate_reduction_value_r13_e"); + static const uint8_t options[] = {0, 33, 66, 100}; + return map_enum_number(options, 4, value, "pdcch_candidate_reduction_value_r13_e"); } std::string pdcp_cfg_s::discard_timer_opts::to_string() const { - static constexpr const char* options[] = {"ms50", "ms100", "ms150", "ms300", "ms500", "ms750", "ms1500", "infinity"}; + static const char* options[] = {"ms50", "ms100", "ms150", "ms300", "ms500", "ms750", "ms1500", "infinity"}; return convert_enum_idx(options, 8, value, "pdcp_cfg_s::discard_timer_e_"); } int16_t pdcp_cfg_s::discard_timer_opts::to_number() const { - static constexpr int16_t options[] = {50, 100, 150, 300, 500, 750, 1500, -1}; - return convert_enum_idx(options, 8, value, "pdcp_cfg_s::discard_timer_e_"); + static const int16_t options[] = {50, 100, 150, 300, 500, 750, 1500, -1}; + return map_enum_number(options, 8, value, "pdcp_cfg_s::discard_timer_e_"); } std::string pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_opts::to_string() const { - static constexpr const char* options[] = {"len7bits", "len12bits"}; + static const char* options[] = {"len7bits", "len12bits"}; return convert_enum_idx(options, 2, value, "pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_"); } uint8_t pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_opts::to_number() const { - static constexpr uint8_t options[] = {7, 12}; - return convert_enum_idx(options, 2, value, "pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_"); + static const uint8_t options[] = {7, 12}; + return map_enum_number(options, 2, value, "pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_"); } std::string pdcp_cfg_s::hdr_compress_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"notUsed", "rohc"}; + static const char* options[] = {"notUsed", "rohc"}; return convert_enum_idx(options, 2, value, "pdcp_cfg_s::hdr_compress_c_::types"); } std::string pdcp_cfg_s::t_reordering_r12_opts::to_string() const { - static constexpr const char* options[] = { - "ms0", "ms20", "ms40", "ms60", "ms80", "ms100", "ms120", "ms140", "ms160", "ms180", "ms200", - "ms220", "ms240", "ms260", "ms280", "ms300", "ms500", "ms750", "spare14", "spare13", "spare12", "spare11", - "spare10", "spare9", "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ms0", "ms20", "ms40", "ms60", "ms80", "ms100", "ms120", "ms140", + "ms160", "ms180", "ms200", "ms220", "ms240", "ms260", "ms280", "ms300", + "ms500", "ms750", "spare14", "spare13", "spare12", "spare11", "spare10", "spare9", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "pdcp_cfg_s::t_reordering_r12_e_"); } uint16_t pdcp_cfg_s::t_reordering_r12_opts::to_number() const { - static constexpr uint16_t options[] = { + static const uint16_t options[] = { 0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 500, 750}; - return convert_enum_idx(options, 18, value, "pdcp_cfg_s::t_reordering_r12_e_"); + return map_enum_number(options, 18, value, "pdcp_cfg_s::t_reordering_r12_e_"); } std::string pdcp_cfg_s::ul_data_split_thres_r13_c_::setup_opts::to_string() const { - static constexpr const char* options[] = {"b0", - "b100", - "b200", - "b400", - "b800", - "b1600", - "b3200", - "b6400", - "b12800", - "b25600", - "b51200", - "b102400", - "b204800", - "b409600", - "b819200", - "spare1"}; + static const char* options[] = {"b0", + "b100", + "b200", + "b400", + "b800", + "b1600", + "b3200", + "b6400", + "b12800", + "b25600", + "b51200", + "b102400", + "b204800", + "b409600", + "b819200", + "spare1"}; return convert_enum_idx(options, 16, value, "pdcp_cfg_s::ul_data_split_thres_r13_c_::setup_e_"); } uint32_t pdcp_cfg_s::ul_data_split_thres_r13_c_::setup_opts::to_number() const { - static constexpr uint32_t options[] = { + static const uint32_t options[] = { 0, 100, 200, 400, 800, 1600, 3200, 6400, 12800, 25600, 51200, 102400, 204800, 409600, 819200}; - return convert_enum_idx(options, 15, value, "pdcp_cfg_s::ul_data_split_thres_r13_c_::setup_e_"); + return map_enum_number(options, 15, value, "pdcp_cfg_s::ul_data_split_thres_r13_c_::setup_e_"); } std::string pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_type_for_polling_r13_opts::to_string() const { - static constexpr const char* options[] = {"type1", "type2"}; + static const char* options[] = {"type1", "type2"}; return convert_enum_idx( options, 2, value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_type_for_polling_r13_e_"); } uint8_t pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_type_for_polling_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2}; + return map_enum_number( options, 2, value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_type_for_polling_r13_e_"); } std::string pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type1_r13_opts::to_string() const { - static constexpr const char* options[] = {"ms5", "ms10", "ms20", "ms30", "ms40", "ms50", "ms60", - "ms70", "ms80", "ms90", "ms100", "ms150", "ms200", "ms300", - "ms500", "ms1000", "ms2000", "ms5000", "ms10000", "ms20000", "ms50000"}; + static const char* options[] = {"ms5", "ms10", "ms20", "ms30", "ms40", "ms50", "ms60", + "ms70", "ms80", "ms90", "ms100", "ms150", "ms200", "ms300", + "ms500", "ms1000", "ms2000", "ms5000", "ms10000", "ms20000", "ms50000"}; return convert_enum_idx( options, 21, value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type1_r13_e_"); } uint16_t pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type1_r13_opts::to_number() const { - static constexpr uint16_t options[] = {5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, - 150, 200, 300, 500, 1000, 2000, 5000, 10000, 20000, 50000}; - return convert_enum_idx( + static const uint16_t options[] = {5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, + 150, 200, 300, 500, 1000, 2000, 5000, 10000, 20000, 50000}; + return map_enum_number( options, 21, value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type1_r13_e_"); } std::string pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type2_r13_opts::to_string() const { - static constexpr const char* options[] = {"ms5", "ms10", "ms20", "ms30", "ms40", "ms50", "ms60", - "ms70", "ms80", "ms90", "ms100", "ms150", "ms200", "ms300", - "ms500", "ms1000", "ms2000", "ms5000", "ms10000", "ms20000", "ms50000"}; + static const char* options[] = {"ms5", "ms10", "ms20", "ms30", "ms40", "ms50", "ms60", + "ms70", "ms80", "ms90", "ms100", "ms150", "ms200", "ms300", + "ms500", "ms1000", "ms2000", "ms5000", "ms10000", "ms20000", "ms50000"}; return convert_enum_idx( options, 21, value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type2_r13_e_"); } uint16_t pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type2_r13_opts::to_number() const { - static constexpr uint16_t options[] = {5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, - 150, 200, 300, 500, 1000, 2000, 5000, 10000, 20000, 50000}; - return convert_enum_idx( + static const uint16_t options[] = {5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, + 150, 200, 300, 500, 1000, 2000, 5000, 10000, 20000, 50000}; + return map_enum_number( options, 21, value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_type2_r13_e_"); } std::string pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_offset_r13_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ms1", "ms2", "ms5", "ms10", "ms25", "ms50", "ms100", "ms250", "ms500", "ms2500", "ms5000", "ms25000"}; return convert_enum_idx( options, 12, value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_offset_r13_e_"); } uint16_t pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_offset_r13_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 5, 10, 25, 50, 100, 250, 500, 2500, 5000, 25000}; - return convert_enum_idx( + static const uint16_t options[] = {1, 2, 5, 10, 25, 50, 100, 250, 500, 2500, 5000, 25000}; + return map_enum_number( options, 12, value, "pdcp_cfg_s::status_feedback_r13_c_::setup_s_::status_pdu_periodicity_offset_r13_e_"); } std::string pdcp_cfg_s::ul_lwa_cfg_r14_c_::setup_s_::ul_lwa_data_split_thres_r14_opts::to_string() const { - static constexpr const char* options[] = {"b0", - "b100", - "b200", - "b400", - "b800", - "b1600", - "b3200", - "b6400", - "b12800", - "b25600", - "b51200", - "b102400", - "b204800", - "b409600", - "b819200"}; + static const char* options[] = {"b0", + "b100", + "b200", + "b400", + "b800", + "b1600", + "b3200", + "b6400", + "b12800", + "b25600", + "b51200", + "b102400", + "b204800", + "b409600", + "b819200"}; return convert_enum_idx( options, 15, value, "pdcp_cfg_s::ul_lwa_cfg_r14_c_::setup_s_::ul_lwa_data_split_thres_r14_e_"); } uint32_t pdcp_cfg_s::ul_lwa_cfg_r14_c_::setup_s_::ul_lwa_data_split_thres_r14_opts::to_number() const { - static constexpr uint32_t options[] = { + static const uint32_t options[] = { 0, 100, 200, 400, 800, 1600, 3200, 6400, 12800, 25600, 51200, 102400, 204800, 409600, 819200}; - return convert_enum_idx( - options, 15, value, "pdcp_cfg_s::ul_lwa_cfg_r14_c_::setup_s_::ul_lwa_data_split_thres_r14_e_"); + return map_enum_number(options, 15, value, "pdcp_cfg_s::ul_lwa_cfg_r14_c_::setup_s_::ul_lwa_data_split_thres_r14_e_"); } std::string pdcp_cfg_s::ul_only_hdr_compress_r14_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"notUsed-r14", "rohc-r14"}; + static const char* options[] = {"notUsed-r14", "rohc-r14"}; return convert_enum_idx(options, 2, value, "pdcp_cfg_s::ul_only_hdr_compress_r14_c_::types"); } std::string pdcp_cfg_s::ul_data_compress_r15_s_::buffer_size_r15_opts::to_string() const { - static constexpr const char* options[] = {"kbyte2", "kbyte4", "kbyte8", "spare1"}; + static const char* options[] = {"kbyte2", "kbyte4", "kbyte8", "spare1"}; return convert_enum_idx(options, 4, value, "pdcp_cfg_s::ul_data_compress_r15_s_::buffer_size_r15_e_"); } uint8_t pdcp_cfg_s::ul_data_compress_r15_s_::buffer_size_r15_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8}; - return convert_enum_idx(options, 3, value, "pdcp_cfg_s::ul_data_compress_r15_s_::buffer_size_r15_e_"); + static const uint8_t options[] = {2, 4, 8}; + return map_enum_number(options, 3, value, "pdcp_cfg_s::ul_data_compress_r15_s_::buffer_size_r15_e_"); } std::string pdcp_cfg_s::ul_data_compress_r15_s_::dictionary_r15_opts::to_string() const { - static constexpr const char* options[] = {"sip-SDP", "operator"}; + static const char* options[] = {"sip-SDP", "operator"}; return convert_enum_idx(options, 2, value, "pdcp_cfg_s::ul_data_compress_r15_s_::dictionary_r15_e_"); } std::string pdcp_cfg_s::pdcp_dupl_cfg_r15_c_::setup_s_::pdcp_dupl_r15_opts::to_string() const { - static constexpr const char* options[] = {"configured", "activated"}; + static const char* options[] = {"configured", "activated"}; return convert_enum_idx(options, 2, value, "pdcp_cfg_s::pdcp_dupl_cfg_r15_c_::setup_s_::pdcp_dupl_r15_e_"); } std::string pucch_cfg_ded_v1530_s::codebooksize_determination_stti_r15_opts::to_string() const { - static constexpr const char* options[] = {"dai", "cc"}; + static const char* options[] = {"dai", "cc"}; return convert_enum_idx(options, 2, value, "pucch_cfg_ded_v1530_s::codebooksize_determination_stti_r15_e_"); } std::string rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"logicalChannelIdentity-r15", "logicalChannelIdentityExt-r15"}; + static const char* options[] = {"logicalChannelIdentity-r15", "logicalChannelIdentityExt-r15"}; return convert_enum_idx(options, 2, value, "rlc_bearer_cfg_r15_c::setup_s_::lc_ch_id_cfg_r15_c_::types"); } std::string rlc_cfg_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "am", "um-Bi-Directional", "um-Uni-Directional-UL", "um-Uni-Directional-DL"}; + static const char* options[] = {"am", "um-Bi-Directional", "um-Uni-Directional-UL", "um-Uni-Directional-DL"}; return convert_enum_idx(options, 4, value, "rlc_cfg_c::types"); } std::string spdcch_cfg_r15_c::setup_s_::spdcch_l1_reuse_ind_r15_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1", "n2"}; + static const char* options[] = {"n0", "n1", "n2"}; return convert_enum_idx(options, 3, value, "spdcch_cfg_r15_c::setup_s_::spdcch_l1_reuse_ind_r15_e_"); } uint8_t spdcch_cfg_r15_c::setup_s_::spdcch_l1_reuse_ind_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2}; - return convert_enum_idx(options, 3, value, "spdcch_cfg_r15_c::setup_s_::spdcch_l1_reuse_ind_r15_e_"); + static const uint8_t options[] = {0, 1, 2}; + return map_enum_number(options, 3, value, "spdcch_cfg_r15_c::setup_s_::spdcch_l1_reuse_ind_r15_e_"); } std::string sps_cfg_sl_r14_s::semi_persist_sched_interv_sl_r14_opts::to_string() const { - static constexpr const char* options[] = {"sf20", - "sf50", - "sf100", - "sf200", - "sf300", - "sf400", - "sf500", - "sf600", - "sf700", - "sf800", - "sf900", - "sf1000", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"sf20", + "sf50", + "sf100", + "sf200", + "sf300", + "sf400", + "sf500", + "sf600", + "sf700", + "sf800", + "sf900", + "sf1000", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "sps_cfg_sl_r14_s::semi_persist_sched_interv_sl_r14_e_"); } uint16_t sps_cfg_sl_r14_s::semi_persist_sched_interv_sl_r14_opts::to_number() const { - static constexpr uint16_t options[] = {20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; - return convert_enum_idx(options, 12, value, "sps_cfg_sl_r14_s::semi_persist_sched_interv_sl_r14_e_"); + static const uint16_t options[] = {20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; + return map_enum_number(options, 12, value, "sps_cfg_sl_r14_s::semi_persist_sched_interv_sl_r14_e_"); } std::string sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_opts::to_string() const { - static constexpr const char* options[] = {"sf10", - "sf20", - "sf32", - "sf40", - "sf64", - "sf80", - "sf128", - "sf160", - "sf320", - "sf640", - "sf1-v1430", - "sf2-v1430", - "sf3-v1430", - "sf4-v1430", - "sf5-v1430", - "spare1"}; + static const char* options[] = {"sf10", + "sf20", + "sf32", + "sf40", + "sf64", + "sf80", + "sf128", + "sf160", + "sf320", + "sf640", + "sf1-v1430", + "sf2-v1430", + "sf3-v1430", + "sf4-v1430", + "sf5-v1430", + "spare1"}; return convert_enum_idx(options, 16, value, "sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_e_"); } uint16_t sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1, 2, 3, 4, 5}; - return convert_enum_idx(options, 15, value, "sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_e_"); + static const uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1, 2, 3, 4, 5}; + return map_enum_number(options, 15, value, "sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_e_"); } std::string sps_cfg_ul_c::setup_s_::implicit_release_after_opts::to_string() const { - static constexpr const char* options[] = {"e2", "e3", "e4", "e8"}; + static const char* options[] = {"e2", "e3", "e4", "e8"}; return convert_enum_idx(options, 4, value, "sps_cfg_ul_c::setup_s_::implicit_release_after_e_"); } uint8_t sps_cfg_ul_c::setup_s_::implicit_release_after_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4, 8}; - return convert_enum_idx(options, 4, value, "sps_cfg_ul_c::setup_s_::implicit_release_after_e_"); + static const uint8_t options[] = {2, 3, 4, 8}; + return map_enum_number(options, 4, value, "sps_cfg_ul_c::setup_s_::implicit_release_after_e_"); } std::string sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_v1430_opts::to_string() const { - static constexpr const char* options[] = {"sf50", - "sf100", - "sf200", - "sf300", - "sf400", - "sf500", - "sf600", - "sf700", - "sf800", - "sf900", - "sf1000", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"sf50", + "sf100", + "sf200", + "sf300", + "sf400", + "sf500", + "sf600", + "sf700", + "sf800", + "sf900", + "sf1000", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_v1430_e_"); } uint16_t sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_v1430_opts::to_number() const { - static constexpr uint16_t options[] = {50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; - return convert_enum_idx(options, 11, value, "sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_v1430_e_"); + static const uint16_t options[] = {50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; + return map_enum_number(options, 11, value, "sps_cfg_ul_c::setup_s_::semi_persist_sched_interv_ul_v1430_e_"); } std::string sps_cfg_ul_c::setup_s_::cyclic_shift_sps_r15_opts::to_string() const { - static constexpr const char* options[] = {"cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7"}; + static const char* options[] = {"cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7"}; return convert_enum_idx(options, 8, value, "sps_cfg_ul_c::setup_s_::cyclic_shift_sps_r15_e_"); } uint8_t sps_cfg_ul_c::setup_s_::cyclic_shift_sps_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; - return convert_enum_idx(options, 8, value, "sps_cfg_ul_c::setup_s_::cyclic_shift_sps_r15_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; + return map_enum_number(options, 8, value, "sps_cfg_ul_c::setup_s_::cyclic_shift_sps_r15_e_"); } std::string sps_cfg_ul_c::setup_s_::rv_sps_ul_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"ulrvseq1", "ulrvseq2", "ulrvseq3"}; + static const char* options[] = {"ulrvseq1", "ulrvseq2", "ulrvseq3"}; return convert_enum_idx(options, 3, value, "sps_cfg_ul_c::setup_s_::rv_sps_ul_repeats_r15_e_"); } uint8_t sps_cfg_ul_c::setup_s_::rv_sps_ul_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx(options, 3, value, "sps_cfg_ul_c::setup_s_::rv_sps_ul_repeats_r15_e_"); + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number(options, 3, value, "sps_cfg_ul_c::setup_s_::rv_sps_ul_repeats_r15_e_"); } std::string sps_cfg_ul_c::setup_s_::total_num_pusch_sps_ul_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n3", "n4", "n6"}; + static const char* options[] = {"n2", "n3", "n4", "n6"}; return convert_enum_idx(options, 4, value, "sps_cfg_ul_c::setup_s_::total_num_pusch_sps_ul_repeats_r15_e_"); } uint8_t sps_cfg_ul_c::setup_s_::total_num_pusch_sps_ul_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4, 6}; - return convert_enum_idx(options, 4, value, "sps_cfg_ul_c::setup_s_::total_num_pusch_sps_ul_repeats_r15_e_"); + static const uint8_t options[] = {2, 3, 4, 6}; + return map_enum_number(options, 4, value, "sps_cfg_ul_c::setup_s_::total_num_pusch_sps_ul_repeats_r15_e_"); } std::string sps_cfg_ul_stti_r15_c::setup_s_::semi_persist_sched_interv_ul_stti_r15_opts::to_string() const { - static constexpr const char* options[] = {"sTTI1", - "sTTI2", - "sTTI3", - "sTTI4", - "sTTI6", - "sTTI8", - "sTTI12", - "sTTI16", - "sTTI20", - "sTTI40", - "sTTI60", - "sTTI80", - "sTTI120", - "sTTI240", - "spare2", - "spare1"}; + static const char* options[] = {"sTTI1", + "sTTI2", + "sTTI3", + "sTTI4", + "sTTI6", + "sTTI8", + "sTTI12", + "sTTI16", + "sTTI20", + "sTTI40", + "sTTI60", + "sTTI80", + "sTTI120", + "sTTI240", + "spare2", + "spare1"}; return convert_enum_idx( options, 16, value, "sps_cfg_ul_stti_r15_c::setup_s_::semi_persist_sched_interv_ul_stti_r15_e_"); } uint8_t sps_cfg_ul_stti_r15_c::setup_s_::semi_persist_sched_interv_ul_stti_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 6, 8, 12, 16, 20, 40, 60, 80, 120, 240}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 3, 4, 6, 8, 12, 16, 20, 40, 60, 80, 120, 240}; + return map_enum_number( options, 14, value, "sps_cfg_ul_stti_r15_c::setup_s_::semi_persist_sched_interv_ul_stti_r15_e_"); } std::string sps_cfg_ul_stti_r15_c::setup_s_::implicit_release_after_opts::to_string() const { - static constexpr const char* options[] = {"e2", "e3", "e4", "e8"}; + static const char* options[] = {"e2", "e3", "e4", "e8"}; return convert_enum_idx(options, 4, value, "sps_cfg_ul_stti_r15_c::setup_s_::implicit_release_after_e_"); } uint8_t sps_cfg_ul_stti_r15_c::setup_s_::implicit_release_after_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4, 8}; - return convert_enum_idx(options, 4, value, "sps_cfg_ul_stti_r15_c::setup_s_::implicit_release_after_e_"); + static const uint8_t options[] = {2, 3, 4, 8}; + return map_enum_number(options, 4, value, "sps_cfg_ul_stti_r15_c::setup_s_::implicit_release_after_e_"); } std::string sps_cfg_ul_stti_r15_c::setup_s_::cyclic_shift_sps_s_tti_r15_opts::to_string() const { - static constexpr const char* options[] = {"cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7"}; + static const char* options[] = {"cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7"}; return convert_enum_idx(options, 8, value, "sps_cfg_ul_stti_r15_c::setup_s_::cyclic_shift_sps_s_tti_r15_e_"); } uint8_t sps_cfg_ul_stti_r15_c::setup_s_::cyclic_shift_sps_s_tti_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; - return convert_enum_idx(options, 8, value, "sps_cfg_ul_stti_r15_c::setup_s_::cyclic_shift_sps_s_tti_r15_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; + return map_enum_number(options, 8, value, "sps_cfg_ul_stti_r15_c::setup_s_::cyclic_shift_sps_s_tti_r15_e_"); } std::string sps_cfg_ul_stti_r15_c::setup_s_::rv_sps_stti_ul_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"ulrvseq1", "ulrvseq2", "ulrvseq3"}; + static const char* options[] = {"ulrvseq1", "ulrvseq2", "ulrvseq3"}; return convert_enum_idx(options, 3, value, "sps_cfg_ul_stti_r15_c::setup_s_::rv_sps_stti_ul_repeats_r15_e_"); } uint8_t sps_cfg_ul_stti_r15_c::setup_s_::rv_sps_stti_ul_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx(options, 3, value, "sps_cfg_ul_stti_r15_c::setup_s_::rv_sps_stti_ul_repeats_r15_e_"); + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number(options, 3, value, "sps_cfg_ul_stti_r15_c::setup_s_::rv_sps_stti_ul_repeats_r15_e_"); } std::string sps_cfg_ul_stti_r15_c::setup_s_::tbs_scaling_factor_subslot_sps_ul_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n12"}; + static const char* options[] = {"n6", "n12"}; return convert_enum_idx( options, 2, value, "sps_cfg_ul_stti_r15_c::setup_s_::tbs_scaling_factor_subslot_sps_ul_repeats_r15_e_"); } uint8_t sps_cfg_ul_stti_r15_c::setup_s_::tbs_scaling_factor_subslot_sps_ul_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {6, 12}; - return convert_enum_idx( + static const uint8_t options[] = {6, 12}; + return map_enum_number( options, 2, value, "sps_cfg_ul_stti_r15_c::setup_s_::tbs_scaling_factor_subslot_sps_ul_repeats_r15_e_"); } std::string sps_cfg_ul_stti_r15_c::setup_s_::total_num_pusch_sps_stti_ul_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n3", "n4", "n6"}; + static const char* options[] = {"n2", "n3", "n4", "n6"}; return convert_enum_idx( options, 4, value, "sps_cfg_ul_stti_r15_c::setup_s_::total_num_pusch_sps_stti_ul_repeats_r15_e_"); } uint8_t sps_cfg_ul_stti_r15_c::setup_s_::total_num_pusch_sps_stti_ul_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4, 6}; - return convert_enum_idx( + static const uint8_t options[] = {2, 3, 4, 6}; + return map_enum_number( options, 4, value, "sps_cfg_ul_stti_r15_c::setup_s_::total_num_pusch_sps_stti_ul_repeats_r15_e_"); } std::string srs_cfg_ap_r10_s::srs_bw_ap_r10_opts::to_string() const { - static constexpr const char* options[] = {"bw0", "bw1", "bw2", "bw3"}; + static const char* options[] = {"bw0", "bw1", "bw2", "bw3"}; return convert_enum_idx(options, 4, value, "srs_cfg_ap_r10_s::srs_bw_ap_r10_e_"); } uint8_t srs_cfg_ap_r10_s::srs_bw_ap_r10_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "srs_cfg_ap_r10_s::srs_bw_ap_r10_e_"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "srs_cfg_ap_r10_s::srs_bw_ap_r10_e_"); } std::string srs_cfg_ap_r10_s::cyclic_shift_ap_r10_opts::to_string() const { - static constexpr const char* options[] = {"cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7"}; + static const char* options[] = {"cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7"}; return convert_enum_idx(options, 8, value, "srs_cfg_ap_r10_s::cyclic_shift_ap_r10_e_"); } uint8_t srs_cfg_ap_r10_s::cyclic_shift_ap_r10_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; - return convert_enum_idx(options, 8, value, "srs_cfg_ap_r10_s::cyclic_shift_ap_r10_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; + return map_enum_number(options, 8, value, "srs_cfg_ap_r10_s::cyclic_shift_ap_r10_e_"); } std::string srs_cfg_ap_r13_s::srs_bw_ap_r13_opts::to_string() const { - static constexpr const char* options[] = {"bw0", "bw1", "bw2", "bw3"}; + static const char* options[] = {"bw0", "bw1", "bw2", "bw3"}; return convert_enum_idx(options, 4, value, "srs_cfg_ap_r13_s::srs_bw_ap_r13_e_"); } uint8_t srs_cfg_ap_r13_s::srs_bw_ap_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "srs_cfg_ap_r13_s::srs_bw_ap_r13_e_"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "srs_cfg_ap_r13_s::srs_bw_ap_r13_e_"); } std::string srs_cfg_ap_r13_s::cyclic_shift_ap_r13_opts::to_string() const { - static constexpr const char* options[] = { - "cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7", "cs8", "cs9", "cs10", "cs11"}; + static const char* options[] = {"cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7", "cs8", "cs9", "cs10", "cs11"}; return convert_enum_idx(options, 12, value, "srs_cfg_ap_r13_s::cyclic_shift_ap_r13_e_"); } uint8_t srs_cfg_ap_r13_s::cyclic_shift_ap_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; - return convert_enum_idx(options, 12, value, "srs_cfg_ap_r13_s::cyclic_shift_ap_r13_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; + return map_enum_number(options, 12, value, "srs_cfg_ap_r13_s::cyclic_shift_ap_r13_e_"); } std::string srs_cfg_ap_r13_s::tx_comb_num_r13_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "srs_cfg_ap_r13_s::tx_comb_num_r13_e_"); } uint8_t srs_cfg_ap_r13_s::tx_comb_num_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "srs_cfg_ap_r13_s::tx_comb_num_r13_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "srs_cfg_ap_r13_s::tx_comb_num_r13_e_"); } std::string srs_cfg_ap_v1310_s::cyclic_shift_ap_v1310_opts::to_string() const { - static constexpr const char* options[] = {"cs8", "cs9", "cs10", "cs11"}; + static const char* options[] = {"cs8", "cs9", "cs10", "cs11"}; return convert_enum_idx(options, 4, value, "srs_cfg_ap_v1310_s::cyclic_shift_ap_v1310_e_"); } uint8_t srs_cfg_ap_v1310_s::cyclic_shift_ap_v1310_opts::to_number() const { - static constexpr uint8_t options[] = {8, 9, 10, 11}; - return convert_enum_idx(options, 4, value, "srs_cfg_ap_v1310_s::cyclic_shift_ap_v1310_e_"); + static const uint8_t options[] = {8, 9, 10, 11}; + return map_enum_number(options, 4, value, "srs_cfg_ap_v1310_s::cyclic_shift_ap_v1310_e_"); } std::string srs_cfg_ap_v1310_s::tx_comb_num_r13_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "srs_cfg_ap_v1310_s::tx_comb_num_r13_e_"); } uint8_t srs_cfg_ap_v1310_s::tx_comb_num_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "srs_cfg_ap_v1310_s::tx_comb_num_r13_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "srs_cfg_ap_v1310_s::tx_comb_num_r13_e_"); } std::string sched_request_cfg_v1530_c::setup_s_::dssr_trans_max_r15_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8", "n16", "n32", "n64", "spare3", "spare2", "spare1"}; + static const char* options[] = {"n4", "n8", "n16", "n32", "n64", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "sched_request_cfg_v1530_c::setup_s_::dssr_trans_max_r15_e_"); } uint8_t sched_request_cfg_v1530_c::setup_s_::dssr_trans_max_r15_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16, 32, 64}; - return convert_enum_idx(options, 5, value, "sched_request_cfg_v1530_c::setup_s_::dssr_trans_max_r15_e_"); + static const uint8_t options[] = {4, 8, 16, 32, 64}; + return map_enum_number(options, 5, value, "sched_request_cfg_v1530_c::setup_s_::dssr_trans_max_r15_e_"); } std::string slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table_stti_r15_opts::to_string() const { - static constexpr const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; + static const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; return convert_enum_idx(options, 4, value, "slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table_stti_r15_e_"); } uint8_t slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table_stti_r15_opts::to_number() const @@ -4649,7 +4620,7 @@ uint8_t slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table_stti_r15_opts:: std::string slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table1024_qam_stti_r15_opts::to_string() const { - static constexpr const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; + static const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; return convert_enum_idx( options, 4, value, "slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table1024_qam_stti_r15_e_"); } @@ -4668,138 +4639,138 @@ uint8_t slot_or_subslot_pdsch_cfg_r15_c::setup_s_::alt_cqi_table1024_qam_stti_r1 std::string slot_or_subslot_pdsch_cfg_r15_c::setup_s_::res_alloc_r15_opts::to_string() const { - static constexpr const char* options[] = {"resourceAllocationType0", "resourceAllocationType2"}; + static const char* options[] = {"resourceAllocationType0", "resourceAllocationType2"}; return convert_enum_idx(options, 2, value, "slot_or_subslot_pdsch_cfg_r15_c::setup_s_::res_alloc_r15_e_"); } uint8_t slot_or_subslot_pdsch_cfg_r15_c::setup_s_::res_alloc_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 2}; - return convert_enum_idx(options, 2, value, "slot_or_subslot_pdsch_cfg_r15_c::setup_s_::res_alloc_r15_e_"); + static const uint8_t options[] = {0, 2}; + return map_enum_number(options, 2, value, "slot_or_subslot_pdsch_cfg_r15_c::setup_s_::res_alloc_r15_e_"); } std::string tdd_pusch_up_pts_r14_c::setup_s_::sym_pusch_up_pts_r14_opts::to_string() const { - static constexpr const char* options[] = {"sym1", "sym2", "sym3", "sym4", "sym5", "sym6"}; + static const char* options[] = {"sym1", "sym2", "sym3", "sym4", "sym5", "sym6"}; return convert_enum_idx(options, 6, value, "tdd_pusch_up_pts_r14_c::setup_s_::sym_pusch_up_pts_r14_e_"); } uint8_t tdd_pusch_up_pts_r14_c::setup_s_::sym_pusch_up_pts_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6}; - return convert_enum_idx(options, 6, value, "tdd_pusch_up_pts_r14_c::setup_s_::sym_pusch_up_pts_r14_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6}; + return map_enum_number(options, 6, value, "tdd_pusch_up_pts_r14_c::setup_s_::sym_pusch_up_pts_r14_e_"); } std::string ant_info_ded_s::tx_mode_opts::to_string() const { - static constexpr const char* options[] = {"tm1", "tm2", "tm3", "tm4", "tm5", "tm6", "tm7", "tm8-v920"}; + static const char* options[] = {"tm1", "tm2", "tm3", "tm4", "tm5", "tm6", "tm7", "tm8-v920"}; return convert_enum_idx(options, 8, value, "ant_info_ded_s::tx_mode_e_"); } uint8_t ant_info_ded_s::tx_mode_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8}; - return convert_enum_idx(options, 8, value, "ant_info_ded_s::tx_mode_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8}; + return map_enum_number(options, 8, value, "ant_info_ded_s::tx_mode_e_"); } std::string ant_info_ded_s::codebook_subset_restrict_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"n2TxAntenna-tm3", - "n4TxAntenna-tm3", - "n2TxAntenna-tm4", - "n4TxAntenna-tm4", - "n2TxAntenna-tm5", - "n4TxAntenna-tm5", - "n2TxAntenna-tm6", - "n4TxAntenna-tm6"}; + static const char* options[] = {"n2TxAntenna-tm3", + "n4TxAntenna-tm3", + "n2TxAntenna-tm4", + "n4TxAntenna-tm4", + "n2TxAntenna-tm5", + "n4TxAntenna-tm5", + "n2TxAntenna-tm6", + "n4TxAntenna-tm6"}; return convert_enum_idx(options, 8, value, "ant_info_ded_s::codebook_subset_restrict_c_::types"); } std::string ant_info_ded_s::ue_tx_ant_sel_c_::setup_opts::to_string() const { - static constexpr const char* options[] = {"closedLoop", "openLoop"}; + static const char* options[] = {"closedLoop", "openLoop"}; return convert_enum_idx(options, 2, value, "ant_info_ded_s::ue_tx_ant_sel_c_::setup_e_"); } std::string ant_info_ded_r10_s::tx_mode_r10_opts::to_string() const { - static constexpr const char* options[] = {"tm1", - "tm2", - "tm3", - "tm4", - "tm5", - "tm6", - "tm7", - "tm8-v920", - "tm9-v1020", - "tm10-v1130", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"tm1", + "tm2", + "tm3", + "tm4", + "tm5", + "tm6", + "tm7", + "tm8-v920", + "tm9-v1020", + "tm10-v1130", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "ant_info_ded_r10_s::tx_mode_r10_e_"); } uint8_t ant_info_ded_r10_s::tx_mode_r10_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - return convert_enum_idx(options, 10, value, "ant_info_ded_r10_s::tx_mode_r10_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; + return map_enum_number(options, 10, value, "ant_info_ded_r10_s::tx_mode_r10_e_"); } std::string ant_info_ded_r10_s::ue_tx_ant_sel_c_::setup_opts::to_string() const { - static constexpr const char* options[] = {"closedLoop", "openLoop"}; + static const char* options[] = {"closedLoop", "openLoop"}; return convert_enum_idx(options, 2, value, "ant_info_ded_r10_s::ue_tx_ant_sel_c_::setup_e_"); } std::string ant_info_ded_v1530_c::setup_c_::ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_opts::to_string() const { - static constexpr const char* options[] = {"two", "three"}; + static const char* options[] = {"two", "three"}; return convert_enum_idx( options, 2, value, "ant_info_ded_v1530_c::setup_c_::ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_"); } uint8_t ant_info_ded_v1530_c::setup_c_::ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3}; - return convert_enum_idx( + static const uint8_t options[] = {2, 3}; + return map_enum_number( options, 2, value, "ant_info_ded_v1530_c::setup_c_::ue_tx_ant_sel_srs_minus2_t4_r_nr_of_pairs_r15_e_"); } std::string ant_info_ded_v1530_c::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ue-TxAntennaSelection-SRS-1T4R-Config-r15", - "ue-TxAntennaSelection-SRS-2T4R-NrOfPairs-r15"}; + static const char* options[] = {"ue-TxAntennaSelection-SRS-1T4R-Config-r15", + "ue-TxAntennaSelection-SRS-2T4R-NrOfPairs-r15"}; return convert_enum_idx(options, 2, value, "ant_info_ded_v1530_c::setup_c_::types"); } int8_t ant_info_ded_v1530_c::setup_c_::types_opts::to_number() const { - static constexpr int8_t options[] = {-1, -2}; - return convert_enum_idx(options, 2, value, "ant_info_ded_v1530_c::setup_c_::types"); + static const int8_t options[] = {-1, -2}; + return map_enum_number(options, 2, value, "ant_info_ded_v1530_c::setup_c_::types"); } std::string ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"n2TxAntenna-tm8-r9", "n4TxAntenna-tm8-r9"}; + static const char* options[] = {"n2TxAntenna-tm8-r9", "n4TxAntenna-tm8-r9"}; return convert_enum_idx(options, 2, value, "ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::types"); } uint8_t ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::types"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "ant_info_ded_v920_s::codebook_subset_restrict_v920_c_::types"); } std::string ant_info_ul_r10_s::tx_mode_ul_r10_opts::to_string() const { - static constexpr const char* options[] = {"tm1", "tm2", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"tm1", "tm2", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ant_info_ul_r10_s::tx_mode_ul_r10_e_"); } uint8_t ant_info_ul_r10_s::tx_mode_ul_r10_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "ant_info_ul_r10_s::tx_mode_ul_r10_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "ant_info_ul_r10_s::tx_mode_ul_r10_e_"); } std::string cqi_report_cfg_v1530_s::alt_cqi_table_minus1024_qam_r15_opts::to_string() const { - static constexpr const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; + static const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; return convert_enum_idx(options, 4, value, "cqi_report_cfg_v1530_s::alt_cqi_table_minus1024_qam_r15_e_"); } uint8_t cqi_report_cfg_v1530_s::alt_cqi_table_minus1024_qam_r15_opts::to_number() const @@ -4817,344 +4788,343 @@ uint8_t cqi_report_cfg_v1530_s::alt_cqi_table_minus1024_qam_r15_opts::to_number( std::string drb_to_add_mod_s::drb_type_lwip_r13_opts::to_string() const { - static constexpr const char* options[] = {"lwip", "lwip-DL-only", "lwip-UL-only", "eutran"}; + static const char* options[] = {"lwip", "lwip-DL-only", "lwip-UL-only", "eutran"}; return convert_enum_idx(options, 4, value, "drb_to_add_mod_s::drb_type_lwip_r13_e_"); } std::string drb_to_add_mod_s::lwa_wlan_ac_r14_opts::to_string() const { - static constexpr const char* options[] = {"ac-bk", "ac-be", "ac-vi", "ac-vo"}; + static const char* options[] = {"ac-bk", "ac-be", "ac-vi", "ac-vo"}; return convert_enum_idx(options, 4, value, "drb_to_add_mod_s::lwa_wlan_ac_r14_e_"); } std::string drx_cfg_c::setup_s_::on_dur_timer_opts::to_string() const { - static constexpr const char* options[] = {"psf1", - "psf2", - "psf3", - "psf4", - "psf5", - "psf6", - "psf8", - "psf10", - "psf20", - "psf30", - "psf40", - "psf50", - "psf60", - "psf80", - "psf100", - "psf200"}; + static const char* options[] = {"psf1", + "psf2", + "psf3", + "psf4", + "psf5", + "psf6", + "psf8", + "psf10", + "psf20", + "psf30", + "psf40", + "psf50", + "psf60", + "psf80", + "psf100", + "psf200"}; return convert_enum_idx(options, 16, value, "drx_cfg_c::setup_s_::on_dur_timer_e_"); } uint8_t drx_cfg_c::setup_s_::on_dur_timer_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, 60, 80, 100, 200}; - return convert_enum_idx(options, 16, value, "drx_cfg_c::setup_s_::on_dur_timer_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, 60, 80, 100, 200}; + return map_enum_number(options, 16, value, "drx_cfg_c::setup_s_::on_dur_timer_e_"); } std::string drx_cfg_c::setup_s_::drx_inactivity_timer_opts::to_string() const { - static constexpr const char* options[] = {"psf1", "psf2", "psf3", "psf4", "psf5", "psf6", "psf8", - "psf10", "psf20", "psf30", "psf40", "psf50", "psf60", "psf80", - "psf100", "psf200", "psf300", "psf500", "psf750", "psf1280", "psf1920", - "psf2560", "psf0-v1020", "spare9", "spare8", "spare7", "spare6", "spare5", - "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"psf1", "psf2", "psf3", "psf4", "psf5", "psf6", "psf8", + "psf10", "psf20", "psf30", "psf40", "psf50", "psf60", "psf80", + "psf100", "psf200", "psf300", "psf500", "psf750", "psf1280", "psf1920", + "psf2560", "psf0-v1020", "spare9", "spare8", "spare7", "spare6", "spare5", + "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "drx_cfg_c::setup_s_::drx_inactivity_timer_e_"); } uint16_t drx_cfg_c::setup_s_::drx_inactivity_timer_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, - 60, 80, 100, 200, 300, 500, 750, 1280, 1920, 2560, 0}; - return convert_enum_idx(options, 23, value, "drx_cfg_c::setup_s_::drx_inactivity_timer_e_"); + static const uint16_t options[] = {1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, + 60, 80, 100, 200, 300, 500, 750, 1280, 1920, 2560, 0}; + return map_enum_number(options, 23, value, "drx_cfg_c::setup_s_::drx_inactivity_timer_e_"); } std::string drx_cfg_c::setup_s_::drx_retx_timer_opts::to_string() const { - static constexpr const char* options[] = {"psf1", "psf2", "psf4", "psf6", "psf8", "psf16", "psf24", "psf33"}; + static const char* options[] = {"psf1", "psf2", "psf4", "psf6", "psf8", "psf16", "psf24", "psf33"}; return convert_enum_idx(options, 8, value, "drx_cfg_c::setup_s_::drx_retx_timer_e_"); } uint8_t drx_cfg_c::setup_s_::drx_retx_timer_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 6, 8, 16, 24, 33}; - return convert_enum_idx(options, 8, value, "drx_cfg_c::setup_s_::drx_retx_timer_e_"); + static const uint8_t options[] = {1, 2, 4, 6, 8, 16, 24, 33}; + return map_enum_number(options, 8, value, "drx_cfg_c::setup_s_::drx_retx_timer_e_"); } std::string drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sf10", - "sf20", - "sf32", - "sf40", - "sf64", - "sf80", - "sf128", - "sf160", - "sf256", - "sf320", - "sf512", - "sf640", - "sf1024", - "sf1280", - "sf2048", - "sf2560"}; + static const char* options[] = {"sf10", + "sf20", + "sf32", + "sf40", + "sf64", + "sf80", + "sf128", + "sf160", + "sf256", + "sf320", + "sf512", + "sf640", + "sf1024", + "sf1280", + "sf2048", + "sf2560"}; return convert_enum_idx(options, 16, value, "drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::types"); } uint16_t drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 1280, 2048, 2560}; - return convert_enum_idx(options, 16, value, "drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::types"); + static const uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 1280, 2048, 2560}; + return map_enum_number(options, 16, value, "drx_cfg_c::setup_s_::long_drx_cycle_start_offset_c_::types"); } std::string drx_cfg_c::setup_s_::short_drx_s_::short_drx_cycle_opts::to_string() const { - static constexpr const char* options[] = {"sf2", - "sf5", - "sf8", - "sf10", - "sf16", - "sf20", - "sf32", - "sf40", - "sf64", - "sf80", - "sf128", - "sf160", - "sf256", - "sf320", - "sf512", - "sf640"}; + static const char* options[] = {"sf2", + "sf5", + "sf8", + "sf10", + "sf16", + "sf20", + "sf32", + "sf40", + "sf64", + "sf80", + "sf128", + "sf160", + "sf256", + "sf320", + "sf512", + "sf640"}; return convert_enum_idx(options, 16, value, "drx_cfg_c::setup_s_::short_drx_s_::short_drx_cycle_e_"); } uint16_t drx_cfg_c::setup_s_::short_drx_s_::short_drx_cycle_opts::to_number() const { - static constexpr uint16_t options[] = {2, 5, 8, 10, 16, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640}; - return convert_enum_idx(options, 16, value, "drx_cfg_c::setup_s_::short_drx_s_::short_drx_cycle_e_"); + static const uint16_t options[] = {2, 5, 8, 10, 16, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640}; + return map_enum_number(options, 16, value, "drx_cfg_c::setup_s_::short_drx_s_::short_drx_cycle_e_"); } std::string drx_cfg_r13_s::on_dur_timer_v1310_opts::to_string() const { - static constexpr const char* options[] = { - "psf300", "psf400", "psf500", "psf600", "psf800", "psf1000", "psf1200", "psf1600"}; + static const char* options[] = {"psf300", "psf400", "psf500", "psf600", "psf800", "psf1000", "psf1200", "psf1600"}; return convert_enum_idx(options, 8, value, "drx_cfg_r13_s::on_dur_timer_v1310_e_"); } uint16_t drx_cfg_r13_s::on_dur_timer_v1310_opts::to_number() const { - static constexpr uint16_t options[] = {300, 400, 500, 600, 800, 1000, 1200, 1600}; - return convert_enum_idx(options, 8, value, "drx_cfg_r13_s::on_dur_timer_v1310_e_"); + static const uint16_t options[] = {300, 400, 500, 600, 800, 1000, 1200, 1600}; + return map_enum_number(options, 8, value, "drx_cfg_r13_s::on_dur_timer_v1310_e_"); } std::string drx_cfg_r13_s::drx_retx_timer_v1310_opts::to_string() const { - static constexpr const char* options[] = {"psf40", "psf64", "psf80", "psf96", "psf112", "psf128", "psf160", "psf320"}; + static const char* options[] = {"psf40", "psf64", "psf80", "psf96", "psf112", "psf128", "psf160", "psf320"}; return convert_enum_idx(options, 8, value, "drx_cfg_r13_s::drx_retx_timer_v1310_e_"); } uint16_t drx_cfg_r13_s::drx_retx_timer_v1310_opts::to_number() const { - static constexpr uint16_t options[] = {40, 64, 80, 96, 112, 128, 160, 320}; - return convert_enum_idx(options, 8, value, "drx_cfg_r13_s::drx_retx_timer_v1310_e_"); + static const uint16_t options[] = {40, 64, 80, 96, 112, 128, 160, 320}; + return map_enum_number(options, 8, value, "drx_cfg_r13_s::drx_retx_timer_v1310_e_"); } std::string drx_cfg_r13_s::drx_ul_retx_timer_r13_opts::to_string() const { - static constexpr const char* options[] = {"psf0", - "psf1", - "psf2", - "psf4", - "psf6", - "psf8", - "psf16", - "psf24", - "psf33", - "psf40", - "psf64", - "psf80", - "psf96", - "psf112", - "psf128", - "psf160", - "psf320"}; + static const char* options[] = {"psf0", + "psf1", + "psf2", + "psf4", + "psf6", + "psf8", + "psf16", + "psf24", + "psf33", + "psf40", + "psf64", + "psf80", + "psf96", + "psf112", + "psf128", + "psf160", + "psf320"}; return convert_enum_idx(options, 17, value, "drx_cfg_r13_s::drx_ul_retx_timer_r13_e_"); } uint16_t drx_cfg_r13_s::drx_ul_retx_timer_r13_opts::to_number() const { - static constexpr uint16_t options[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; - return convert_enum_idx(options, 17, value, "drx_cfg_r13_s::drx_ul_retx_timer_r13_e_"); + static const uint16_t options[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; + return map_enum_number(options, 17, value, "drx_cfg_r13_s::drx_ul_retx_timer_r13_e_"); } std::string drx_cfg_r15_s::drx_retx_timer_short_tti_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "tti10", "tti20", "tti40", "tti64", "tti80", "tti96", "tti112", "tti128", "tti160", "tti320"}; return convert_enum_idx(options, 10, value, "drx_cfg_r15_s::drx_retx_timer_short_tti_r15_e_"); } uint16_t drx_cfg_r15_s::drx_retx_timer_short_tti_r15_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 40, 64, 80, 96, 112, 128, 160, 320}; - return convert_enum_idx(options, 10, value, "drx_cfg_r15_s::drx_retx_timer_short_tti_r15_e_"); + static const uint16_t options[] = {10, 20, 40, 64, 80, 96, 112, 128, 160, 320}; + return map_enum_number(options, 10, value, "drx_cfg_r15_s::drx_retx_timer_short_tti_r15_e_"); } std::string drx_cfg_r15_s::drx_ul_retx_timer_short_tti_r15_opts::to_string() const { - static constexpr const char* options[] = {"tti0", - "tti1", - "tti2", - "tti4", - "tti6", - "tti8", - "tti16", - "tti24", - "tti33", - "tti40", - "tti64", - "tti80", - "tti96", - "tti112", - "tti128", - "tti160", - "tti320"}; + static const char* options[] = {"tti0", + "tti1", + "tti2", + "tti4", + "tti6", + "tti8", + "tti16", + "tti24", + "tti33", + "tti40", + "tti64", + "tti80", + "tti96", + "tti112", + "tti128", + "tti160", + "tti320"}; return convert_enum_idx(options, 17, value, "drx_cfg_r15_s::drx_ul_retx_timer_short_tti_r15_e_"); } uint16_t drx_cfg_r15_s::drx_ul_retx_timer_short_tti_r15_opts::to_number() const { - static constexpr uint16_t options[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; - return convert_enum_idx(options, 17, value, "drx_cfg_r15_s::drx_ul_retx_timer_short_tti_r15_e_"); + static const uint16_t options[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; + return map_enum_number(options, 17, value, "drx_cfg_r15_s::drx_ul_retx_timer_short_tti_r15_e_"); } std::string drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sf60-v1130", "sf70-v1130"}; + static const char* options[] = {"sf60-v1130", "sf70-v1130"}; return convert_enum_idx(options, 2, value, "drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::types"); } uint8_t drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {60, 70}; - return convert_enum_idx(options, 2, value, "drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::types"); + static const uint8_t options[] = {60, 70}; + return map_enum_number(options, 2, value, "drx_cfg_v1130_s::long_drx_cycle_start_offset_v1130_c_::types"); } // DataInactivityTimer-r14 ::= ENUMERATED std::string data_inactivity_timer_r14_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "s1", "s2", "s3", "s5", "s7", "s10", "s15", "s20", "s40", "s50", "s60", "s80", "s100", "s120", "s150", "s180"}; return convert_enum_idx(options, 16, value, "data_inactivity_timer_r14_e"); } uint8_t data_inactivity_timer_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 5, 7, 10, 15, 20, 40, 50, 60, 80, 100, 120, 150, 180}; - return convert_enum_idx(options, 16, value, "data_inactivity_timer_r14_e"); + static const uint8_t options[] = {1, 2, 3, 5, 7, 10, 15, 20, 40, 50, 60, 80, 100, 120, 150, 180}; + return map_enum_number(options, 16, value, "data_inactivity_timer_r14_e"); } std::string pdsch_cfg_ded_s::p_a_opts::to_string() const { - static constexpr const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; + static const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; return convert_enum_idx(options, 8, value, "pdsch_cfg_ded_s::p_a_e_"); } float pdsch_cfg_ded_s::p_a_opts::to_number() const { - static constexpr float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; - return convert_enum_idx(options, 8, value, "pdsch_cfg_ded_s::p_a_e_"); + static const float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return map_enum_number(options, 8, value, "pdsch_cfg_ded_s::p_a_e_"); } std::string pdsch_cfg_ded_s::p_a_opts::to_number_string() const { - static constexpr const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; + static const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; return convert_enum_idx(options, 8, value, "pdsch_cfg_ded_s::p_a_e_"); } std::string pdsch_cfg_ded_v1130_s::qcl_operation_opts::to_string() const { - static constexpr const char* options[] = {"typeA", "typeB"}; + static const char* options[] = {"typeA", "typeB"}; return convert_enum_idx(options, 2, value, "pdsch_cfg_ded_v1130_s::qcl_operation_e_"); } std::string pdsch_cfg_ded_v1280_s::tbs_idx_alt_r12_opts::to_string() const { - static constexpr const char* options[] = {"a26", "a33"}; + static const char* options[] = {"a26", "a33"}; return convert_enum_idx(options, 2, value, "pdsch_cfg_ded_v1280_s::tbs_idx_alt_r12_e_"); } uint8_t pdsch_cfg_ded_v1280_s::tbs_idx_alt_r12_opts::to_number() const { - static constexpr uint8_t options[] = {26, 33}; - return convert_enum_idx(options, 2, value, "pdsch_cfg_ded_v1280_s::tbs_idx_alt_r12_e_"); + static const uint8_t options[] = {26, 33}; + return map_enum_number(options, 2, value, "pdsch_cfg_ded_v1280_s::tbs_idx_alt_r12_e_"); } std::string pdsch_cfg_ded_v1430_s::ce_pdsch_max_bw_r14_opts::to_string() const { - static constexpr const char* options[] = {"bw5", "bw20"}; + static const char* options[] = {"bw5", "bw20"}; return convert_enum_idx(options, 2, value, "pdsch_cfg_ded_v1430_s::ce_pdsch_max_bw_r14_e_"); } uint8_t pdsch_cfg_ded_v1430_s::ce_pdsch_max_bw_r14_opts::to_number() const { - static constexpr uint8_t options[] = {5, 20}; - return convert_enum_idx(options, 2, value, "pdsch_cfg_ded_v1430_s::ce_pdsch_max_bw_r14_e_"); + static const uint8_t options[] = {5, 20}; + return map_enum_number(options, 2, value, "pdsch_cfg_ded_v1430_s::ce_pdsch_max_bw_r14_e_"); } std::string pdsch_cfg_ded_v1430_s::ce_sched_enhancement_r14_opts::to_string() const { - static constexpr const char* options[] = {"range1", "range2"}; + static const char* options[] = {"range1", "range2"}; return convert_enum_idx(options, 2, value, "pdsch_cfg_ded_v1430_s::ce_sched_enhancement_r14_e_"); } uint8_t pdsch_cfg_ded_v1430_s::ce_sched_enhancement_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "pdsch_cfg_ded_v1430_s::ce_sched_enhancement_r14_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "pdsch_cfg_ded_v1430_s::ce_sched_enhancement_r14_e_"); } std::string pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_opts::to_string() const { - static constexpr const char* options[] = {"oDot5", "oDot625", "oDot75", "oDot875"}; + static const char* options[] = {"oDot5", "oDot625", "oDot75", "oDot875"}; return convert_enum_idx(options, 4, value, "pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_e_"); } float pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_opts::to_number() const { - static constexpr float options[] = {0.5, 0.625, 0.75, 0.875}; - return convert_enum_idx(options, 4, value, "pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_e_"); + static const float options[] = {0.5, 0.625, 0.75, 0.875}; + return map_enum_number(options, 4, value, "pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_e_"); } std::string pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_opts::to_number_string() const { - static constexpr const char* options[] = {"0.5", "0.625", "0.75", "0.875"}; + static const char* options[] = {"0.5", "0.625", "0.75", "0.875"}; return convert_enum_idx(options, 4, value, "pdsch_cfg_ded_v1530_s::alt_mcs_table_scaling_cfg_r15_e_"); } std::string pucch_cfg_ded_s::ack_nack_repeat_c_::setup_s_::repeat_factor_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n6", "spare1"}; + static const char* options[] = {"n2", "n4", "n6", "spare1"}; return convert_enum_idx(options, 4, value, "pucch_cfg_ded_s::ack_nack_repeat_c_::setup_s_::repeat_factor_e_"); } uint8_t pucch_cfg_ded_s::ack_nack_repeat_c_::setup_s_::repeat_factor_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 6}; - return convert_enum_idx(options, 3, value, "pucch_cfg_ded_s::ack_nack_repeat_c_::setup_s_::repeat_factor_e_"); + static const uint8_t options[] = {2, 4, 6}; + return map_enum_number(options, 3, value, "pucch_cfg_ded_s::ack_nack_repeat_c_::setup_s_::repeat_factor_e_"); } std::string pucch_cfg_ded_s::tdd_ack_nack_feedback_mode_opts::to_string() const { - static constexpr const char* options[] = {"bundling", "multiplexing"}; + static const char* options[] = {"bundling", "multiplexing"}; return convert_enum_idx(options, 2, value, "pucch_cfg_ded_s::tdd_ack_nack_feedback_mode_e_"); } std::string pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_::setup_s_::repeat_factor_r13_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n6", "spare1"}; + static const char* options[] = {"n2", "n4", "n6", "spare1"}; return convert_enum_idx( options, 4, value, "pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_::setup_s_::repeat_factor_r13_e_"); } uint8_t pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_::setup_s_::repeat_factor_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 6}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 6}; + return map_enum_number( options, 3, value, "pucch_cfg_ded_r13_s::ack_nack_repeat_r13_c_::setup_s_::repeat_factor_r13_e_"); } std::string pucch_cfg_ded_r13_s::tdd_ack_nack_feedback_mode_r13_opts::to_string() const { - static constexpr const char* options[] = {"bundling", "multiplexing"}; + static const char* options[] = {"bundling", "multiplexing"}; return convert_enum_idx(options, 2, value, "pucch_cfg_ded_r13_s::tdd_ack_nack_feedback_mode_r13_e_"); } std::string pucch_cfg_ded_r13_s::pucch_format_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"format3-r13", "channelSelection-r13", "format4-r13", "format5-r13"}; + static const char* options[] = {"format3-r13", "channelSelection-r13", "format4-r13", "format5-r13"}; return convert_enum_idx(options, 4, value, "pucch_cfg_ded_r13_s::pucch_format_r13_c_::types"); } uint8_t pucch_cfg_ded_r13_s::pucch_format_r13_c_::types_opts::to_number() const @@ -5174,7 +5144,7 @@ uint8_t pucch_cfg_ded_r13_s::pucch_format_r13_c_::types_opts::to_number() const std::string pucch_cfg_ded_r13_s::codebooksize_determination_r13_opts::to_string() const { - static constexpr const char* options[] = {"dai", "cc"}; + static const char* options[] = {"dai", "cc"}; return convert_enum_idx(options, 2, value, "pucch_cfg_ded_r13_s::codebooksize_determination_r13_e_"); } @@ -5182,7 +5152,7 @@ std::string pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format1_r13_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8"}; + static const char* options[] = {"r1", "r2", "r4", "r8"}; return convert_enum_idx( options, 4, @@ -5193,8 +5163,8 @@ uint8_t pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format1_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number( options, 4, value, @@ -5205,7 +5175,7 @@ std::string pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format2_r13_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8"}; + static const char* options[] = {"r1", "r2", "r4", "r8"}; return convert_enum_idx( options, 4, @@ -5216,8 +5186,8 @@ uint8_t pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_a_s_::pucch_num_repeat_ce_format2_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number( options, 4, value, @@ -5228,7 +5198,7 @@ std::string pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format1_r13_opts::to_string() const { - static constexpr const char* options[] = {"r4", "r8", "r16", "r32"}; + static const char* options[] = {"r4", "r8", "r16", "r32"}; return convert_enum_idx( options, 4, @@ -5239,8 +5209,8 @@ uint8_t pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format1_r13_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16, 32}; - return convert_enum_idx( + static const uint8_t options[] = {4, 8, 16, 32}; + return map_enum_number( options, 4, value, @@ -5251,7 +5221,7 @@ std::string pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format2_r13_opts::to_string() const { - static constexpr const char* options[] = {"r4", "r8", "r16", "r32"}; + static const char* options[] = {"r4", "r8", "r16", "r32"}; return convert_enum_idx( options, 4, @@ -5262,8 +5232,8 @@ uint8_t pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_repeat_ce_format2_r13_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16, 32}; - return convert_enum_idx( + static const uint8_t options[] = {4, 8, 16, 32}; + return map_enum_number( options, 4, value, @@ -5272,36 +5242,36 @@ pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::mode_b_s_::pucch_num_ std::string pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"modeA", "modeB"}; + static const char* options[] = {"modeA", "modeB"}; return convert_enum_idx(options, 2, value, "pucch_cfg_ded_r13_s::pucch_num_repeat_ce_r13_c_::setup_c_::types"); } std::string pucch_cfg_ded_v1020_s::pucch_format_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"format3-r10", "channelSelection-r10"}; + static const char* options[] = {"format3-r10", "channelSelection-r10"}; return convert_enum_idx(options, 2, value, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_::types"); } uint8_t pucch_cfg_ded_v1020_s::pucch_format_r10_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {3}; - return convert_enum_idx(options, 1, value, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_::types"); + static const uint8_t options[] = {3}; + return map_enum_number(options, 1, value, "pucch_cfg_ded_v1020_s::pucch_format_r10_c_::types"); } std::string pucch_cfg_ded_v1430_s::pucch_num_repeat_ce_format1_r14_opts::to_string() const { - static constexpr const char* options[] = {"r64", "r128"}; + static const char* options[] = {"r64", "r128"}; return convert_enum_idx(options, 2, value, "pucch_cfg_ded_v1430_s::pucch_num_repeat_ce_format1_r14_e_"); } uint8_t pucch_cfg_ded_v1430_s::pucch_num_repeat_ce_format1_r14_opts::to_number() const { - static constexpr uint8_t options[] = {64, 128}; - return convert_enum_idx(options, 2, value, "pucch_cfg_ded_v1430_s::pucch_num_repeat_ce_format1_r14_e_"); + static const uint8_t options[] = {64, 128}; + return map_enum_number(options, 2, value, "pucch_cfg_ded_v1430_s::pucch_num_repeat_ce_format1_r14_e_"); } std::string pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_fdd_pusch_enh_r14_opts::to_string() const { - static constexpr const char* options[] = {"int1", "int2", "int4", "int8"}; + static const char* options[] = {"int1", "int2", "int4", "int8"}; return convert_enum_idx( options, 4, @@ -5311,8 +5281,8 @@ pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_fdd_pu uint8_t pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_fdd_pusch_enh_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number( options, 4, value, @@ -5322,7 +5292,7 @@ pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_fdd_pu std::string pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_tdd_pusch_enh_r14_opts::to_string() const { - static constexpr const char* options[] = {"int1", "int5", "int10", "int20"}; + static const char* options[] = {"int1", "int5", "int10", "int20"}; return convert_enum_idx( options, 4, @@ -5332,8 +5302,8 @@ pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_tdd_pu uint8_t pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_tdd_pusch_enh_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 5, 10, 20}; - return convert_enum_idx( + static const uint8_t options[] = {1, 5, 10, 20}; + return map_enum_number( options, 4, value, @@ -5342,7 +5312,7 @@ pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::interv_tdd_pu std::string pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"interval-FDD-PUSCH-Enh-r14", "interval-TDD-PUSCH-Enh-r14"}; + static const char* options[] = {"interval-FDD-PUSCH-Enh-r14", "interval-TDD-PUSCH-Enh-r14"}; return convert_enum_idx( options, 2, value, "pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::types"); } @@ -5350,400 +5320,398 @@ std::string pusch_enhance_cfg_r14_c::setup_s_::interv_ul_hop_pusch_enh_r14_c_::t // PeriodicBSR-Timer-r12 ::= ENUMERATED std::string periodic_bsr_timer_r12_opts::to_string() const { - static constexpr const char* options[] = {"sf5", - "sf10", - "sf16", - "sf20", - "sf32", - "sf40", - "sf64", - "sf80", - "sf128", - "sf160", - "sf320", - "sf640", - "sf1280", - "sf2560", - "infinity", - "spare1"}; + static const char* options[] = {"sf5", + "sf10", + "sf16", + "sf20", + "sf32", + "sf40", + "sf64", + "sf80", + "sf128", + "sf160", + "sf320", + "sf640", + "sf1280", + "sf2560", + "infinity", + "spare1"}; return convert_enum_idx(options, 16, value, "periodic_bsr_timer_r12_e"); } int16_t periodic_bsr_timer_r12_opts::to_number() const { - static constexpr int16_t options[] = {5, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, -1}; - return convert_enum_idx(options, 15, value, "periodic_bsr_timer_r12_e"); + static const int16_t options[] = {5, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, -1}; + return map_enum_number(options, 15, value, "periodic_bsr_timer_r12_e"); } std::string rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_type_r11_opts::to_string() const { - static constexpr const char* options[] = {"frequency", "e-utra"}; + static const char* options[] = {"frequency", "e-utra"}; return convert_enum_idx( options, 2, value, "rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_type_r11_e_"); } std::string rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_timer_r11_opts::to_string() const { - static constexpr const char* options[] = {"min5", "min10", "min15", "min30"}; + static const char* options[] = {"min5", "min10", "min15", "min30"}; return convert_enum_idx( options, 4, value, "rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_timer_r11_e_"); } uint8_t rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_timer_r11_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 15, 30}; - return convert_enum_idx( + static const uint8_t options[] = {5, 10, 15, 30}; + return map_enum_number( options, 4, value, "rrc_conn_reject_v1130_ies_s::depriorit_req_r11_s_::depriorit_timer_r11_e_"); } // RetxBSR-Timer-r12 ::= ENUMERATED std::string retx_bsr_timer_r12_opts::to_string() const { - static constexpr const char* options[] = { - "sf320", "sf640", "sf1280", "sf2560", "sf5120", "sf10240", "spare2", "spare1"}; + static const char* options[] = {"sf320", "sf640", "sf1280", "sf2560", "sf5120", "sf10240", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "retx_bsr_timer_r12_e"); } uint16_t retx_bsr_timer_r12_opts::to_number() const { - static constexpr uint16_t options[] = {320, 640, 1280, 2560, 5120, 10240}; - return convert_enum_idx(options, 6, value, "retx_bsr_timer_r12_e"); + static const uint16_t options[] = {320, 640, 1280, 2560, 5120, 10240}; + return map_enum_number(options, 6, value, "retx_bsr_timer_r12_e"); } std::string sps_cfg_dl_c::setup_s_::semi_persist_sched_interv_dl_opts::to_string() const { - static constexpr const char* options[] = {"sf10", - "sf20", - "sf32", - "sf40", - "sf64", - "sf80", - "sf128", - "sf160", - "sf320", - "sf640", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"sf10", + "sf20", + "sf32", + "sf40", + "sf64", + "sf80", + "sf128", + "sf160", + "sf320", + "sf640", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "sps_cfg_dl_c::setup_s_::semi_persist_sched_interv_dl_e_"); } uint16_t sps_cfg_dl_c::setup_s_::semi_persist_sched_interv_dl_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 320, 640}; - return convert_enum_idx(options, 10, value, "sps_cfg_dl_c::setup_s_::semi_persist_sched_interv_dl_e_"); + static const uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 320, 640}; + return map_enum_number(options, 10, value, "sps_cfg_dl_c::setup_s_::semi_persist_sched_interv_dl_e_"); } std::string srb_to_add_mod_s::rlc_cfg_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"explicitValue", "defaultValue"}; + static const char* options[] = {"explicitValue", "defaultValue"}; return convert_enum_idx(options, 2, value, "srb_to_add_mod_s::rlc_cfg_c_::types"); } std::string srb_to_add_mod_s::lc_ch_cfg_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"explicitValue", "defaultValue"}; + static const char* options[] = {"explicitValue", "defaultValue"}; return convert_enum_idx(options, 2, value, "srb_to_add_mod_s::lc_ch_cfg_c_::types"); } std::string sched_request_cfg_c::setup_s_::dsr_trans_max_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8", "n16", "n32", "n64", "spare3", "spare2", "spare1"}; + static const char* options[] = {"n4", "n8", "n16", "n32", "n64", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "sched_request_cfg_c::setup_s_::dsr_trans_max_e_"); } uint8_t sched_request_cfg_c::setup_s_::dsr_trans_max_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16, 32, 64}; - return convert_enum_idx(options, 5, value, "sched_request_cfg_c::setup_s_::dsr_trans_max_e_"); + static const uint8_t options[] = {4, 8, 16, 32, 64}; + return map_enum_number(options, 5, value, "sched_request_cfg_c::setup_s_::dsr_trans_max_e_"); } std::string srs_ul_cfg_ded_c::setup_s_::srs_bw_opts::to_string() const { - static constexpr const char* options[] = {"bw0", "bw1", "bw2", "bw3"}; + static const char* options[] = {"bw0", "bw1", "bw2", "bw3"}; return convert_enum_idx(options, 4, value, "srs_ul_cfg_ded_c::setup_s_::srs_bw_e_"); } uint8_t srs_ul_cfg_ded_c::setup_s_::srs_bw_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "srs_ul_cfg_ded_c::setup_s_::srs_bw_e_"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "srs_ul_cfg_ded_c::setup_s_::srs_bw_e_"); } std::string srs_ul_cfg_ded_c::setup_s_::srs_hop_bw_opts::to_string() const { - static constexpr const char* options[] = {"hbw0", "hbw1", "hbw2", "hbw3"}; + static const char* options[] = {"hbw0", "hbw1", "hbw2", "hbw3"}; return convert_enum_idx(options, 4, value, "srs_ul_cfg_ded_c::setup_s_::srs_hop_bw_e_"); } uint8_t srs_ul_cfg_ded_c::setup_s_::srs_hop_bw_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "srs_ul_cfg_ded_c::setup_s_::srs_hop_bw_e_"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "srs_ul_cfg_ded_c::setup_s_::srs_hop_bw_e_"); } std::string srs_ul_cfg_ded_c::setup_s_::cyclic_shift_opts::to_string() const { - static constexpr const char* options[] = {"cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7"}; + static const char* options[] = {"cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7"}; return convert_enum_idx(options, 8, value, "srs_ul_cfg_ded_c::setup_s_::cyclic_shift_e_"); } uint8_t srs_ul_cfg_ded_c::setup_s_::cyclic_shift_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; - return convert_enum_idx(options, 8, value, "srs_ul_cfg_ded_c::setup_s_::cyclic_shift_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7}; + return map_enum_number(options, 8, value, "srs_ul_cfg_ded_c::setup_s_::cyclic_shift_e_"); } std::string srs_ul_cfg_ded_v1310_c::setup_s_::cyclic_shift_v1310_opts::to_string() const { - static constexpr const char* options[] = {"cs8", "cs9", "cs10", "cs11"}; + static const char* options[] = {"cs8", "cs9", "cs10", "cs11"}; return convert_enum_idx(options, 4, value, "srs_ul_cfg_ded_v1310_c::setup_s_::cyclic_shift_v1310_e_"); } uint8_t srs_ul_cfg_ded_v1310_c::setup_s_::cyclic_shift_v1310_opts::to_number() const { - static constexpr uint8_t options[] = {8, 9, 10, 11}; - return convert_enum_idx(options, 4, value, "srs_ul_cfg_ded_v1310_c::setup_s_::cyclic_shift_v1310_e_"); + static const uint8_t options[] = {8, 9, 10, 11}; + return map_enum_number(options, 4, value, "srs_ul_cfg_ded_v1310_c::setup_s_::cyclic_shift_v1310_e_"); } std::string srs_ul_cfg_ded_v1310_c::setup_s_::tx_comb_num_r13_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "srs_ul_cfg_ded_v1310_c::setup_s_::tx_comb_num_r13_e_"); } uint8_t srs_ul_cfg_ded_v1310_c::setup_s_::tx_comb_num_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "srs_ul_cfg_ded_v1310_c::setup_s_::tx_comb_num_r13_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "srs_ul_cfg_ded_v1310_c::setup_s_::tx_comb_num_r13_e_"); } std::string srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_opts::to_string() const { - static constexpr const char* options[] = {"sym2", "sym4"}; + static const char* options[] = {"sym2", "sym4"}; return convert_enum_idx( options, 2, value, "srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_"); } uint8_t srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4}; + return map_enum_number( options, 2, value, "srs_ul_cfg_ded_aperiodic_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_"); } std::string srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_opts::to_string() const { - static constexpr const char* options[] = {"sym2", "sym4"}; + static const char* options[] = {"sym2", "sym4"}; return convert_enum_idx(options, 2, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_"); } uint8_t srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_up_pts_add_r13_e_"); } std::string srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_bw_r13_opts::to_string() const { - static constexpr const char* options[] = {"bw0", "bw1", "bw2", "bw3"}; + static const char* options[] = {"bw0", "bw1", "bw2", "bw3"}; return convert_enum_idx(options, 4, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_bw_r13_e_"); } uint8_t srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_bw_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_bw_r13_e_"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_bw_r13_e_"); } std::string srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_hop_bw_r13_opts::to_string() const { - static constexpr const char* options[] = {"hbw0", "hbw1", "hbw2", "hbw3"}; + static const char* options[] = {"hbw0", "hbw1", "hbw2", "hbw3"}; return convert_enum_idx(options, 4, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_hop_bw_r13_e_"); } uint8_t srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_hop_bw_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_hop_bw_r13_e_"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::srs_hop_bw_r13_e_"); } std::string srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::cyclic_shift_r13_opts::to_string() const { - static constexpr const char* options[] = { - "cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7", "cs8", "cs9", "cs10", "cs11"}; + static const char* options[] = {"cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7", "cs8", "cs9", "cs10", "cs11"}; return convert_enum_idx(options, 12, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::cyclic_shift_r13_e_"); } uint8_t srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::cyclic_shift_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; - return convert_enum_idx(options, 12, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::cyclic_shift_r13_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; + return map_enum_number(options, 12, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::cyclic_shift_r13_e_"); } std::string srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::tx_comb_num_r13_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::tx_comb_num_r13_e_"); } uint8_t srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::tx_comb_num_r13_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::tx_comb_num_r13_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "srs_ul_cfg_ded_up_pts_ext_r13_c::setup_s_::tx_comb_num_r13_e_"); } std::string ul_pwr_ctrl_ded_s::delta_mcs_enabled_opts::to_string() const { - static constexpr const char* options[] = {"en0", "en1"}; + static const char* options[] = {"en0", "en1"}; return convert_enum_idx(options, 2, value, "ul_pwr_ctrl_ded_s::delta_mcs_enabled_e_"); } uint8_t ul_pwr_ctrl_ded_s::delta_mcs_enabled_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "ul_pwr_ctrl_ded_s::delta_mcs_enabled_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "ul_pwr_ctrl_ded_s::delta_mcs_enabled_e_"); } std::string mac_main_cfg_s::ul_sch_cfg_s_::max_harq_tx_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "n1", "n2", "n3", "n4", "n5", "n6", "n7", "n8", "n10", "n12", "n16", "n20", "n24", "n28", "spare2", "spare1"}; return convert_enum_idx(options, 16, value, "mac_main_cfg_s::ul_sch_cfg_s_::max_harq_tx_e_"); } uint8_t mac_main_cfg_s::ul_sch_cfg_s_::max_harq_tx_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 16, 20, 24, 28}; - return convert_enum_idx(options, 14, value, "mac_main_cfg_s::ul_sch_cfg_s_::max_harq_tx_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 16, 20, 24, 28}; + return map_enum_number(options, 14, value, "mac_main_cfg_s::ul_sch_cfg_s_::max_harq_tx_e_"); } std::string mac_main_cfg_s::phr_cfg_c_::setup_s_::periodic_phr_timer_opts::to_string() const { - static constexpr const char* options[] = {"sf10", "sf20", "sf50", "sf100", "sf200", "sf500", "sf1000", "infinity"}; + static const char* options[] = {"sf10", "sf20", "sf50", "sf100", "sf200", "sf500", "sf1000", "infinity"}; return convert_enum_idx(options, 8, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::periodic_phr_timer_e_"); } int16_t mac_main_cfg_s::phr_cfg_c_::setup_s_::periodic_phr_timer_opts::to_number() const { - static constexpr int16_t options[] = {10, 20, 50, 100, 200, 500, 1000, -1}; - return convert_enum_idx(options, 8, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::periodic_phr_timer_e_"); + static const int16_t options[] = {10, 20, 50, 100, 200, 500, 1000, -1}; + return map_enum_number(options, 8, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::periodic_phr_timer_e_"); } std::string mac_main_cfg_s::phr_cfg_c_::setup_s_::prohibit_phr_timer_opts::to_string() const { - static constexpr const char* options[] = {"sf0", "sf10", "sf20", "sf50", "sf100", "sf200", "sf500", "sf1000"}; + static const char* options[] = {"sf0", "sf10", "sf20", "sf50", "sf100", "sf200", "sf500", "sf1000"}; return convert_enum_idx(options, 8, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::prohibit_phr_timer_e_"); } uint16_t mac_main_cfg_s::phr_cfg_c_::setup_s_::prohibit_phr_timer_opts::to_number() const { - static constexpr uint16_t options[] = {0, 10, 20, 50, 100, 200, 500, 1000}; - return convert_enum_idx(options, 8, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::prohibit_phr_timer_e_"); + static const uint16_t options[] = {0, 10, 20, 50, 100, 200, 500, 1000}; + return map_enum_number(options, 8, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::prohibit_phr_timer_e_"); } std::string mac_main_cfg_s::phr_cfg_c_::setup_s_::dl_pathloss_change_opts::to_string() const { - static constexpr const char* options[] = {"dB1", "dB3", "dB6", "infinity"}; + static const char* options[] = {"dB1", "dB3", "dB6", "infinity"}; return convert_enum_idx(options, 4, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::dl_pathloss_change_e_"); } int8_t mac_main_cfg_s::phr_cfg_c_::setup_s_::dl_pathloss_change_opts::to_number() const { - static constexpr int8_t options[] = {1, 3, 6, -1}; - return convert_enum_idx(options, 4, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::dl_pathloss_change_e_"); + static const int8_t options[] = {1, 3, 6, -1}; + return map_enum_number(options, 4, value, "mac_main_cfg_s::phr_cfg_c_::setup_s_::dl_pathloss_change_e_"); } std::string mac_main_cfg_s::mac_main_cfg_v1020_s_::scell_deactivation_timer_r10_opts::to_string() const { - static constexpr const char* options[] = {"rf2", "rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "spare"}; + static const char* options[] = {"rf2", "rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "spare"}; return convert_enum_idx(options, 8, value, "mac_main_cfg_s::mac_main_cfg_v1020_s_::scell_deactivation_timer_r10_e_"); } uint8_t mac_main_cfg_s::mac_main_cfg_v1020_s_::scell_deactivation_timer_r10_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8, 16, 32, 64, 128}; - return convert_enum_idx(options, 7, value, "mac_main_cfg_s::mac_main_cfg_v1020_s_::scell_deactivation_timer_r10_e_"); + static const uint8_t options[] = {2, 4, 8, 16, 32, 64, 128}; + return map_enum_number(options, 7, value, "mac_main_cfg_s::mac_main_cfg_v1020_s_::scell_deactivation_timer_r10_e_"); } std::string mac_main_cfg_s::dual_connect_phr_c_::setup_s_::phr_mode_other_cg_r12_opts::to_string() const { - static constexpr const char* options[] = {"real", "virtual"}; + static const char* options[] = {"real", "virtual"}; return convert_enum_idx(options, 2, value, "mac_main_cfg_s::dual_connect_phr_c_::setup_s_::phr_mode_other_cg_r12_e_"); } std::string mac_main_cfg_s::lc_ch_sr_cfg_r12_c_::setup_s_::lc_ch_sr_prohibit_timer_r12_opts::to_string() const { - static constexpr const char* options[] = {"sf20", "sf40", "sf64", "sf128", "sf512", "sf1024", "sf2560", "spare1"}; + static const char* options[] = {"sf20", "sf40", "sf64", "sf128", "sf512", "sf1024", "sf2560", "spare1"}; return convert_enum_idx( options, 8, value, "mac_main_cfg_s::lc_ch_sr_cfg_r12_c_::setup_s_::lc_ch_sr_prohibit_timer_r12_e_"); } uint16_t mac_main_cfg_s::lc_ch_sr_cfg_r12_c_::setup_s_::lc_ch_sr_prohibit_timer_r12_opts::to_number() const { - static constexpr uint16_t options[] = {20, 40, 64, 128, 512, 1024, 2560}; - return convert_enum_idx( + static const uint16_t options[] = {20, 40, 64, 128, 512, 1024, 2560}; + return map_enum_number( options, 7, value, "mac_main_cfg_s::lc_ch_sr_cfg_r12_c_::setup_s_::lc_ch_sr_prohibit_timer_r12_e_"); } std::string mac_main_cfg_s::edrx_cfg_cycle_start_offset_r13_c_::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sf5120", "sf10240"}; + static const char* options[] = {"sf5120", "sf10240"}; return convert_enum_idx(options, 2, value, "mac_main_cfg_s::edrx_cfg_cycle_start_offset_r13_c_::setup_c_::types"); } uint16_t mac_main_cfg_s::edrx_cfg_cycle_start_offset_r13_c_::setup_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {5120, 10240}; - return convert_enum_idx(options, 2, value, "mac_main_cfg_s::edrx_cfg_cycle_start_offset_r13_c_::setup_c_::types"); + static const uint16_t options[] = {5120, 10240}; + return map_enum_number(options, 2, value, "mac_main_cfg_s::edrx_cfg_cycle_start_offset_r13_c_::setup_c_::types"); } std::string mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::periodic_bsr_timer_r15_opts::to_string() const { - static constexpr const char* options[] = {"sf1", - "sf5", - "sf10", - "sf16", - "sf20", - "sf32", - "sf40", - "sf64", - "sf80", - "sf128", - "sf160", - "sf320", - "sf640", - "sf1280", - "sf2560", - "infinity"}; + static const char* options[] = {"sf1", + "sf5", + "sf10", + "sf16", + "sf20", + "sf32", + "sf40", + "sf64", + "sf80", + "sf128", + "sf160", + "sf320", + "sf640", + "sf1280", + "sf2560", + "infinity"}; return convert_enum_idx( options, 16, value, "mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::periodic_bsr_timer_r15_e_"); } int16_t mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::periodic_bsr_timer_r15_opts::to_number() const { - static constexpr int16_t options[] = {1, 5, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, -1}; - return convert_enum_idx( + static const int16_t options[] = {1, 5, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, -1}; + return map_enum_number( options, 16, value, "mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::periodic_bsr_timer_r15_e_"); } std::string mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::proc_timeline_r15_opts::to_string() const { - static constexpr const char* options[] = {"nplus4set1", "nplus6set1", "nplus6set2", "nplus8set2"}; + static const char* options[] = {"nplus4set1", "nplus6set1", "nplus6set2", "nplus8set2"}; return convert_enum_idx( options, 4, value, "mac_main_cfg_s::short_tti_and_spt_r15_c_::setup_s_::proc_timeline_r15_e_"); } std::string mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::scell_hibernation_timer_r15_opts::to_string() const { - static constexpr const char* options[] = {"rf2", "rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "spare"}; + static const char* options[] = {"rf2", "rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "spare"}; return convert_enum_idx( options, 8, value, "mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::scell_hibernation_timer_r15_e_"); } uint8_t mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::scell_hibernation_timer_r15_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8, 16, 32, 64, 128}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 8, 16, 32, 64, 128}; + return map_enum_number( options, 7, value, "mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::scell_hibernation_timer_r15_e_"); } std::string mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::dormant_scell_deactivation_timer_r15_opts::to_string() const { - static constexpr const char* options[] = {"rf2", - "rf4", - "rf8", - "rf16", - "rf32", - "rf64", - "rf128", - "rf320", - "rf640", - "rf1280", - "rf2560", - "rf5120", - "rf10240", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"rf2", + "rf4", + "rf8", + "rf16", + "rf32", + "rf64", + "rf128", + "rf320", + "rf640", + "rf1280", + "rf2560", + "rf5120", + "rf10240", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx( options, 16, @@ -5753,8 +5721,8 @@ mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::dormant_scell_deactivatio uint16_t mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::dormant_scell_deactivation_timer_r15_opts::to_number() const { - static constexpr uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 320, 640, 1280, 2560, 5120, 10240}; - return convert_enum_idx( + static const uint16_t options[] = {2, 4, 8, 16, 32, 64, 128, 320, 640, 1280, 2560, 5120, 10240}; + return map_enum_number( options, 13, value, @@ -5763,73 +5731,73 @@ mac_main_cfg_s::dormant_state_timers_r15_c_::setup_s_::dormant_scell_deactivatio std::string phys_cfg_ded_s::ant_info_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"explicitValue", "defaultValue"}; + static const char* options[] = {"explicitValue", "defaultValue"}; return convert_enum_idx(options, 2, value, "phys_cfg_ded_s::ant_info_c_::types"); } std::string phys_cfg_ded_s::ant_info_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"explicitValue-r10", "defaultValue"}; + static const char* options[] = {"explicitValue-r10", "defaultValue"}; return convert_enum_idx(options, 2, value, "phys_cfg_ded_s::ant_info_r10_c_::types"); } std::string phys_cfg_ded_s::ce_mode_r13_c_::setup_opts::to_string() const { - static constexpr const char* options[] = {"ce-ModeA", "ce-ModeB"}; + static const char* options[] = {"ce-ModeA", "ce-ModeB"}; return convert_enum_idx(options, 2, value, "phys_cfg_ded_s::ce_mode_r13_c_::setup_e_"); } std::string phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::k_max_r14_opts::to_string() const { - static constexpr const char* options[] = {"l1", "l3"}; + static const char* options[] = {"l1", "l3"}; return convert_enum_idx(options, 2, value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_"); } uint8_t phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::k_max_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3}; - return convert_enum_idx(options, 2, value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_"); + static const uint8_t options[] = {1, 3}; + return map_enum_number(options, 2, value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_"); } std::string phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_opts::to_string() const { - static constexpr const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; + static const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; return convert_enum_idx(options, 8, value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); } float phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_opts::to_number() const { - static constexpr float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; - return convert_enum_idx(options, 8, value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); + static const float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return map_enum_number(options, 8, value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); } std::string phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; + static const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; return convert_enum_idx(options, 8, value, "phys_cfg_ded_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); } std::string phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"cfi-Config-r15", "cfi-PatternConfig-r15"}; + static const char* options[] = {"cfi-Config-r15", "cfi-PatternConfig-r15"}; return convert_enum_idx(options, 2, value, "phys_cfg_ded_s::semi_static_cfi_cfg_r15_c_::setup_c_::types"); } std::string phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n6"}; + static const char* options[] = {"n4", "n6"}; return convert_enum_idx( options, 2, value, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_e_"); } uint8_t phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {4, 6}; - return convert_enum_idx( + static const uint8_t options[] = {4, 6}; + return map_enum_number( options, 2, value, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_e_"); } std::string phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_subslot_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n6"}; + static const char* options[] = {"n4", "n6"}; return convert_enum_idx( options, 2, @@ -5839,8 +5807,8 @@ phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_subslot_pd uint8_t phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_subslot_pdsch_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {4, 6}; - return convert_enum_idx( + static const uint8_t options[] = {4, 6}; + return map_enum_number( options, 2, value, @@ -5849,35 +5817,35 @@ phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_subslot_pd std::string phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"dlrvseq1", "dlrvseq2"}; + static const char* options[] = {"dlrvseq1", "dlrvseq2"}; return convert_enum_idx( options, 2, value, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_e_"); } uint8_t phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2}; + return map_enum_number( options, 2, value, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_e_"); } std::string phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"dlrvseq1", "dlrvseq2"}; + static const char* options[] = {"dlrvseq1", "dlrvseq2"}; return convert_enum_idx( options, 2, value, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_e_"); } uint8_t phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2}; + return map_enum_number( options, 2, value, "phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_e_"); } std::string phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1"}; + static const char* options[] = {"n0", "n1"}; return convert_enum_idx( options, 2, @@ -5887,8 +5855,8 @@ phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_r uint8_t phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx( + static const uint8_t options[] = {0, 1}; + return map_enum_number( options, 2, value, @@ -5899,7 +5867,7 @@ std::string phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_slot_subslot_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1"}; + static const char* options[] = {"n0", "n1"}; return convert_enum_idx( options, 2, @@ -5910,8 +5878,8 @@ uint8_t phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_slot_subslot_pdsch_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx( + static const uint8_t options[] = {0, 1}; + return map_enum_number( options, 2, value, @@ -5920,297 +5888,296 @@ phys_cfg_ded_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_slot_subsl std::string rlf_timers_and_consts_r13_c::setup_s_::t301_v1310_opts::to_string() const { - static constexpr const char* options[] = { - "ms2500", "ms3000", "ms3500", "ms4000", "ms5000", "ms6000", "ms8000", "ms10000"}; + static const char* options[] = {"ms2500", "ms3000", "ms3500", "ms4000", "ms5000", "ms6000", "ms8000", "ms10000"}; return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_r13_c::setup_s_::t301_v1310_e_"); } uint16_t rlf_timers_and_consts_r13_c::setup_s_::t301_v1310_opts::to_number() const { - static constexpr uint16_t options[] = {2500, 3000, 3500, 4000, 5000, 6000, 8000, 10000}; - return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_r13_c::setup_s_::t301_v1310_e_"); + static const uint16_t options[] = {2500, 3000, 3500, 4000, 5000, 6000, 8000, 10000}; + return map_enum_number(options, 8, value, "rlf_timers_and_consts_r13_c::setup_s_::t301_v1310_e_"); } std::string rlf_timers_and_consts_r13_c::setup_s_::t310_v1330_opts::to_string() const { - static constexpr const char* options[] = {"ms4000", "ms6000"}; + static const char* options[] = {"ms4000", "ms6000"}; return convert_enum_idx(options, 2, value, "rlf_timers_and_consts_r13_c::setup_s_::t310_v1330_e_"); } uint16_t rlf_timers_and_consts_r13_c::setup_s_::t310_v1330_opts::to_number() const { - static constexpr uint16_t options[] = {4000, 6000}; - return convert_enum_idx(options, 2, value, "rlf_timers_and_consts_r13_c::setup_s_::t310_v1330_e_"); + static const uint16_t options[] = {4000, 6000}; + return map_enum_number(options, 2, value, "rlf_timers_and_consts_r13_c::setup_s_::t310_v1330_e_"); } std::string rlf_timers_and_consts_r9_c::setup_s_::t301_r9_opts::to_string() const { - static constexpr const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + static const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::t301_r9_e_"); } uint16_t rlf_timers_and_consts_r9_c::setup_s_::t301_r9_opts::to_number() const { - static constexpr uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::t301_r9_e_"); + static const uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::t301_r9_e_"); } std::string rlf_timers_and_consts_r9_c::setup_s_::t310_r9_opts::to_string() const { - static constexpr const char* options[] = {"ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000"}; + static const char* options[] = {"ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000"}; return convert_enum_idx(options, 7, value, "rlf_timers_and_consts_r9_c::setup_s_::t310_r9_e_"); } uint16_t rlf_timers_and_consts_r9_c::setup_s_::t310_r9_opts::to_number() const { - static constexpr uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000}; - return convert_enum_idx(options, 7, value, "rlf_timers_and_consts_r9_c::setup_s_::t310_r9_e_"); + static const uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000}; + return map_enum_number(options, 7, value, "rlf_timers_and_consts_r9_c::setup_s_::t310_r9_e_"); } std::string rlf_timers_and_consts_r9_c::setup_s_::n310_r9_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::n310_r9_e_"); } uint8_t rlf_timers_and_consts_r9_c::setup_s_::n310_r9_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; - return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::n310_r9_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; + return map_enum_number(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::n310_r9_e_"); } std::string rlf_timers_and_consts_r9_c::setup_s_::t311_r9_opts::to_string() const { - static constexpr const char* options[] = {"ms1000", "ms3000", "ms5000", "ms10000", "ms15000", "ms20000", "ms30000"}; + static const char* options[] = {"ms1000", "ms3000", "ms5000", "ms10000", "ms15000", "ms20000", "ms30000"}; return convert_enum_idx(options, 7, value, "rlf_timers_and_consts_r9_c::setup_s_::t311_r9_e_"); } uint16_t rlf_timers_and_consts_r9_c::setup_s_::t311_r9_opts::to_number() const { - static constexpr uint16_t options[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; - return convert_enum_idx(options, 7, value, "rlf_timers_and_consts_r9_c::setup_s_::t311_r9_e_"); + static const uint16_t options[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; + return map_enum_number(options, 7, value, "rlf_timers_and_consts_r9_c::setup_s_::t311_r9_e_"); } std::string rlf_timers_and_consts_r9_c::setup_s_::n311_r9_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::n311_r9_e_"); } uint8_t rlf_timers_and_consts_r9_c::setup_s_::n311_r9_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::n311_r9_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(options, 8, value, "rlf_timers_and_consts_r9_c::setup_s_::n311_r9_e_"); } std::string idle_mode_mob_ctrl_info_s::t320_opts::to_string() const { - static constexpr const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min180", "spare1"}; + static const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min180", "spare1"}; return convert_enum_idx(options, 8, value, "idle_mode_mob_ctrl_info_s::t320_e_"); } uint8_t idle_mode_mob_ctrl_info_s::t320_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 20, 30, 60, 120, 180}; - return convert_enum_idx(options, 7, value, "idle_mode_mob_ctrl_info_s::t320_e_"); + static const uint8_t options[] = {5, 10, 20, 30, 60, 120, 180}; + return map_enum_number(options, 7, value, "idle_mode_mob_ctrl_info_s::t320_e_"); } std::string rr_cfg_ded_s::mac_main_cfg_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"explicitValue", "defaultValue"}; + static const char* options[] = {"explicitValue", "defaultValue"}; return convert_enum_idx(options, 2, value, "rr_cfg_ded_s::mac_main_cfg_c_::types"); } std::string rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n24"}; + static const char* options[] = {"n6", "n24"}; return convert_enum_idx( options, 2, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_e_"); } uint8_t rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_opts::to_number() const { - static constexpr uint8_t options[] = {6, 24}; - return convert_enum_idx( + static const uint8_t options[] = {6, 24}; + return map_enum_number( options, 2, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::crs_intf_mitig_num_prbs_r15_e_"); } std::string rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"crs-IntfMitigEnabled-15", "crs-IntfMitigNumPRBs-r15"}; + static const char* options[] = {"crs-IntfMitigEnabled-15", "crs-IntfMitigNumPRBs-r15"}; return convert_enum_idx(options, 2, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types"); } int8_t rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types_opts::to_number() const { - static constexpr int8_t options[] = {-15}; - return convert_enum_idx(options, 1, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types"); + static const int8_t options[] = {-15}; + return map_enum_number(options, 1, value, "rr_cfg_ded_s::crs_intf_mitig_cfg_r15_c_::setup_c_::types"); } std::string redirected_carrier_info_r15_ies_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "eutra-r15", "geran-r15", "utra-FDD-r15", "cdma2000-HRPD-r15", "cdma2000-1xRTT-r15", "utra-TDD-r15"}; return convert_enum_idx(options, 6, value, "redirected_carrier_info_r15_ies_c::types"); } std::string c1_or_crit_ext_opts::to_string() const { - static constexpr const char* options[] = {"c1", "criticalExtensionsFuture"}; + static const char* options[] = {"c1", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "c1_or_crit_ext_e"); } uint8_t c1_or_crit_ext_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "c1_or_crit_ext_e"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "c1_or_crit_ext_e"); } std::string rrc_conn_reest_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "rrcConnectionReestablishment-r8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "rrc_conn_reest_s::crit_exts_c_::c1_c_::types"); } std::string rrc_conn_reest_reject_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionReestablishmentReject-r8", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcConnectionReestablishmentReject-r8", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_conn_reest_reject_s::crit_exts_c_::types"); } std::string rrc_conn_reject_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionReject-r8", "spare3", "spare2", "spare1"}; + static const char* options[] = {"rrcConnectionReject-r8", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "rrc_conn_reject_s::crit_exts_c_::c1_c_::types"); } std::string rrc_conn_setup_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "rrcConnectionSetup-r8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "rrc_conn_setup_s::crit_exts_c_::c1_c_::types"); } std::string rrc_early_data_complete_r15_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcEarlyDataComplete-r15", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcEarlyDataComplete-r15", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_early_data_complete_r15_s::crit_exts_c_::types"); } std::string dl_ccch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionReestablishment", - "rrcConnectionReestablishmentReject", - "rrcConnectionReject", - "rrcConnectionSetup"}; + static const char* options[] = {"rrcConnectionReestablishment", + "rrcConnectionReestablishmentReject", + "rrcConnectionReject", + "rrcConnectionSetup"}; return convert_enum_idx(options, 4, value, "dl_ccch_msg_type_c::c1_c_::types"); } std::string dl_ccch_msg_type_c::msg_class_ext_c_::c2_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcEarlyDataComplete-r15", "spare3", "spare2", "spare1"}; + static const char* options[] = {"rrcEarlyDataComplete-r15", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "dl_ccch_msg_type_c::msg_class_ext_c_::c2_c_::types"); } std::string dl_ccch_msg_type_c::msg_class_ext_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c2", "messageClassExtensionFuture-r15"}; + static const char* options[] = {"c2", "messageClassExtensionFuture-r15"}; return convert_enum_idx(options, 2, value, "dl_ccch_msg_type_c::msg_class_ext_c_::types"); } uint8_t dl_ccch_msg_type_c::msg_class_ext_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx(options, 1, value, "dl_ccch_msg_type_c::msg_class_ext_c_::types"); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "dl_ccch_msg_type_c::msg_class_ext_c_::types"); } std::string dl_ccch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "dl_ccch_msg_type_c::types"); } uint8_t dl_ccch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "dl_ccch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "dl_ccch_msg_type_c::types"); } // PDCCH-CandidateReductionValue-r14 ::= ENUMERATED std::string pdcch_candidate_reduction_value_r14_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n50", "n100", "n150"}; + static const char* options[] = {"n0", "n50", "n100", "n150"}; return convert_enum_idx(options, 4, value, "pdcch_candidate_reduction_value_r14_e"); } uint8_t pdcch_candidate_reduction_value_r14_opts::to_number() const { - static constexpr uint8_t options[] = {0, 50, 100, 150}; - return convert_enum_idx(options, 4, value, "pdcch_candidate_reduction_value_r14_e"); + static const uint8_t options[] = {0, 50, 100, 150}; + return map_enum_number(options, 4, value, "pdcch_candidate_reduction_value_r14_e"); } std::string aul_cfg_r15_c::setup_s_::tx_mode_ul_aul_r15_opts::to_string() const { - static constexpr const char* options[] = {"tm1", "tm2"}; + static const char* options[] = {"tm1", "tm2"}; return convert_enum_idx(options, 2, value, "aul_cfg_r15_c::setup_s_::tx_mode_ul_aul_r15_e_"); } uint8_t aul_cfg_r15_c::setup_s_::tx_mode_ul_aul_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "aul_cfg_r15_c::setup_s_::tx_mode_ul_aul_r15_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "aul_cfg_r15_c::setup_s_::tx_mode_ul_aul_r15_e_"); } std::string aul_cfg_r15_c::setup_s_::aul_start_partial_bw_inside_mcot_r15_opts::to_string() const { - static constexpr const char* options[] = {"o34", "o43", "o52", "o61", "oOS1"}; + static const char* options[] = {"o34", "o43", "o52", "o61", "oOS1"}; return convert_enum_idx(options, 5, value, "aul_cfg_r15_c::setup_s_::aul_start_partial_bw_inside_mcot_r15_e_"); } uint8_t aul_cfg_r15_c::setup_s_::aul_start_partial_bw_inside_mcot_r15_opts::to_number() const { - static constexpr uint8_t options[] = {34, 43, 52, 61, 1}; - return convert_enum_idx(options, 5, value, "aul_cfg_r15_c::setup_s_::aul_start_partial_bw_inside_mcot_r15_e_"); + static const uint8_t options[] = {34, 43, 52, 61, 1}; + return map_enum_number(options, 5, value, "aul_cfg_r15_c::setup_s_::aul_start_partial_bw_inside_mcot_r15_e_"); } std::string aul_cfg_r15_c::setup_s_::aul_start_partial_bw_outside_mcot_r15_opts::to_string() const { - static constexpr const char* options[] = {"o16", "o25", "o34", "o43", "o52", "o61", "oOS1"}; + static const char* options[] = {"o16", "o25", "o34", "o43", "o52", "o61", "oOS1"}; return convert_enum_idx(options, 7, value, "aul_cfg_r15_c::setup_s_::aul_start_partial_bw_outside_mcot_r15_e_"); } uint8_t aul_cfg_r15_c::setup_s_::aul_start_partial_bw_outside_mcot_r15_opts::to_number() const { - static constexpr uint8_t options[] = {16, 25, 34, 43, 52, 61, 1}; - return convert_enum_idx(options, 7, value, "aul_cfg_r15_c::setup_s_::aul_start_partial_bw_outside_mcot_r15_e_"); + static const uint8_t options[] = {16, 25, 34, 43, 52, 61, 1}; + return map_enum_number(options, 7, value, "aul_cfg_r15_c::setup_s_::aul_start_partial_bw_outside_mcot_r15_e_"); } std::string aul_cfg_r15_c::setup_s_::aul_retx_timer_r15_opts::to_string() const { - static constexpr const char* options[] = {"psf4", - "psf5", - "psf6", - "psf8", - "psf10", - "psf12", - "psf20", - "psf28", - "psf37", - "psf44", - "psf68", - "psf84", - "psf100", - "psf116", - "psf132", - "psf164", - "psf324"}; + static const char* options[] = {"psf4", + "psf5", + "psf6", + "psf8", + "psf10", + "psf12", + "psf20", + "psf28", + "psf37", + "psf44", + "psf68", + "psf84", + "psf100", + "psf116", + "psf132", + "psf164", + "psf324"}; return convert_enum_idx(options, 17, value, "aul_cfg_r15_c::setup_s_::aul_retx_timer_r15_e_"); } uint16_t aul_cfg_r15_c::setup_s_::aul_retx_timer_r15_opts::to_number() const { - static constexpr uint16_t options[] = {4, 5, 6, 8, 10, 12, 20, 28, 37, 44, 68, 84, 100, 116, 132, 164, 324}; - return convert_enum_idx(options, 17, value, "aul_cfg_r15_c::setup_s_::aul_retx_timer_r15_e_"); + static const uint16_t options[] = {4, 5, 6, 8, 10, 12, 20, 28, 37, 44, 68, 84, 100, 116, 132, 164, 324}; + return map_enum_number(options, 17, value, "aul_cfg_r15_c::setup_s_::aul_retx_timer_r15_e_"); } std::string aul_cfg_r15_c::setup_s_::contention_win_size_timer_r15_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n5", "n10"}; + static const char* options[] = {"n0", "n5", "n10"}; return convert_enum_idx(options, 3, value, "aul_cfg_r15_c::setup_s_::contention_win_size_timer_r15_e_"); } uint8_t aul_cfg_r15_c::setup_s_::contention_win_size_timer_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 5, 10}; - return convert_enum_idx(options, 3, value, "aul_cfg_r15_c::setup_s_::contention_win_size_timer_r15_e_"); + static const uint8_t options[] = {0, 5, 10}; + return map_enum_number(options, 3, value, "aul_cfg_r15_c::setup_s_::contention_win_size_timer_r15_e_"); } std::string cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::wideband_cqi_r15_s_:: csi_report_mode_r15_opts::to_string() const { - static constexpr const char* options[] = {"submode1", "submode2"}; + static const char* options[] = {"submode1", "submode2"}; return convert_enum_idx(options, 2, value, @@ -6220,18 +6187,18 @@ std::string cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r1 uint8_t cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::wideband_cqi_r15_s_:: csi_report_mode_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, - 2, - value, - "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::wideband_cqi_r15_" - "s_::csi_report_mode_r15_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, + 2, + value, + "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::wideband_cqi_r15_s_" + "::csi_report_mode_r15_e_"); } std::string cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::subband_cqi_r15_s_:: periodicity_factor_r15_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, @@ -6241,52 +6208,52 @@ std::string cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r1 uint8_t cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::subband_cqi_r15_s_:: periodicity_factor_r15_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, - 2, - value, - "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::subband_cqi_r15_s_" - "::periodicity_factor_r15_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, + 2, + value, + "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::subband_cqi_r15_s_:" + ":periodicity_factor_r15_e_"); } std::string cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"widebandCQI-r15", "subbandCQI-r15"}; + static const char* options[] = {"widebandCQI-r15", "subbandCQI-r15"}; return convert_enum_idx( options, 2, value, "cqi_report_periodic_scell_r15_c::setup_s_::cqi_format_ind_dormant_r15_c_::types"); } std::string lbt_cfg_r14_c::types_opts::to_string() const { - static constexpr const char* options[] = {"maxEnergyDetectionThreshold-r14", "energyDetectionThresholdOffset-r14"}; + static const char* options[] = {"maxEnergyDetectionThreshold-r14", "energyDetectionThresholdOffset-r14"}; return convert_enum_idx(options, 2, value, "lbt_cfg_r14_c::types"); } std::string pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format0_b_r14_opts::to_string() const { - static constexpr const char* options[] = {"sf2", "sf3", "sf4"}; + static const char* options[] = {"sf2", "sf3", "sf4"}; return convert_enum_idx(options, 3, value, "pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format0_b_r14_e_"); } uint8_t pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format0_b_r14_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4}; - return convert_enum_idx(options, 3, value, "pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format0_b_r14_e_"); + static const uint8_t options[] = {2, 3, 4}; + return map_enum_number(options, 3, value, "pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format0_b_r14_e_"); } std::string pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format4_b_r14_opts::to_string() const { - static constexpr const char* options[] = {"sf2", "sf3", "sf4"}; + static const char* options[] = {"sf2", "sf3", "sf4"}; return convert_enum_idx(options, 3, value, "pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format4_b_r14_e_"); } uint8_t pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format4_b_r14_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4}; - return convert_enum_idx(options, 3, value, "pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format4_b_r14_e_"); + static const uint8_t options[] = {2, 3, 4}; + return map_enum_number(options, 3, value, "pdcch_cfg_laa_r14_s::max_nof_sched_sfs_format4_b_r14_e_"); } std::string cqi_report_cfg_scell_r15_s::alt_cqi_table_minus1024_qam_r15_opts::to_string() const { - static constexpr const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; + static const char* options[] = {"allSubframes", "csi-SubframeSet1", "csi-SubframeSet2", "spare1"}; return convert_enum_idx(options, 4, value, "cqi_report_cfg_scell_r15_s::alt_cqi_table_minus1024_qam_r15_e_"); } uint8_t cqi_report_cfg_scell_r15_s::alt_cqi_table_minus1024_qam_r15_opts::to_number() const @@ -6305,7 +6272,7 @@ uint8_t cqi_report_cfg_scell_r15_s::alt_cqi_table_minus1024_qam_r15_opts::to_num std::string cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::wideband_cqi_short_r15_s_:: csi_report_mode_short_r15_opts::to_string() const { - static constexpr const char* options[] = {"submode1", "submode2"}; + static const char* options[] = {"submode1", "submode2"}; return convert_enum_idx(options, 2, value, @@ -6315,18 +6282,18 @@ std::string cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::wi uint8_t cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::wideband_cqi_short_r15_s_:: csi_report_mode_short_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, - 2, - value, - "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::wideband_cqi_short_r15_s_:" - ":csi_report_mode_short_r15_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, + 2, + value, + "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::wideband_cqi_short_r15_s_::" + "csi_report_mode_short_r15_e_"); } std::string cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::subband_cqi_short_r15_s_:: periodicity_factor_r15_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, @@ -6336,256 +6303,256 @@ std::string cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::su uint8_t cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::subband_cqi_short_r15_s_:: periodicity_factor_r15_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, - 2, - value, - "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::subband_cqi_short_r15_s_::" - "periodicity_factor_r15_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, + 2, + value, + "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::subband_cqi_short_r15_s_::" + "periodicity_factor_r15_e_"); } std::string cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"widebandCQI-Short-r15", "subbandCQI-Short-r15"}; + static const char* options[] = {"widebandCQI-Short-r15", "subbandCQI-Short-r15"}; return convert_enum_idx(options, 2, value, "cqi_short_cfg_scell_r15_c::setup_s_::cqi_format_ind_short_r15_c_::types"); } std::string cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"own-r10", "other-r10"}; + static const char* options[] = {"own-r10", "other-r10"}; return convert_enum_idx(options, 2, value, "cross_carrier_sched_cfg_r10_s::sched_cell_info_r10_c_::types"); } std::string cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"own-r13", "other-r13"}; + static const char* options[] = {"own-r13", "other-r13"}; return convert_enum_idx(options, 2, value, "cross_carrier_sched_cfg_r13_s::sched_cell_info_r13_c_::types"); } std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF-1", "deltaF0", "deltaF1", "deltaF2", "deltaF3", "deltaF4", "deltaF5", "deltaF6"}; return convert_enum_idx(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1_r15_e_"); } int8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1_r15_opts::to_number() const { - static constexpr int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; - return convert_enum_idx(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1_r15_e_"); + static const int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; + return map_enum_number(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1_r15_e_"); } std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1a_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF1", "deltaF2", "deltaF3", "deltaF4", "deltaF5", "deltaF6", "deltaF7", "deltaF8"}; return convert_enum_idx(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1a_r15_e_"); } uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1a_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8}; - return convert_enum_idx(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1a_r15_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8}; + return map_enum_number(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1a_r15_e_"); } std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1b_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF3", "deltaF4", "deltaF5", "deltaF6", "deltaF7", "deltaF8", "deltaF9", "deltaF10"}; return convert_enum_idx(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1b_r15_e_"); } uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1b_r15_opts::to_number() const { - static constexpr uint8_t options[] = {3, 4, 5, 6, 7, 8, 9, 10}; - return convert_enum_idx(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1b_r15_e_"); + static const uint8_t options[] = {3, 4, 5, 6, 7, 8, 9, 10}; + return map_enum_number(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format1b_r15_e_"); } std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format3_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF4", "deltaF5", "deltaF6", "deltaF7", "deltaF8", "deltaF9", "deltaF10", "deltaF11"}; return convert_enum_idx(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format3_r15_e_"); } uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format3_r15_opts::to_number() const { - static constexpr uint8_t options[] = {4, 5, 6, 7, 8, 9, 10, 11}; - return convert_enum_idx(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format3_r15_e_"); + static const uint8_t options[] = {4, 5, 6, 7, 8, 9, 10, 11}; + return map_enum_number(options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_format3_r15_e_"); } std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_rm_format4_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF13", "deltaF14", "deltaF15", "deltaF16", "deltaF17", "deltaF18", "deltaF19", "deltaF20"}; return convert_enum_idx( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_rm_format4_r15_e_"); } uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_rm_format4_r15_opts::to_number() const { - static constexpr uint8_t options[] = {13, 14, 15, 16, 17, 18, 19, 20}; - return convert_enum_idx( + static const uint8_t options[] = {13, 14, 15, 16, 17, 18, 19, 20}; + return map_enum_number( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_rm_format4_r15_e_"); } std::string delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_tbcc_format4_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF10", "deltaF11", "deltaF12", "deltaF13", "deltaF14", "deltaF15", "deltaF16", "deltaF17"}; return convert_enum_idx( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_tbcc_format4_r15_e_"); } uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_tbcc_format4_r15_opts::to_number() const { - static constexpr uint8_t options[] = {10, 11, 12, 13, 14, 15, 16, 17}; - return convert_enum_idx( + static const uint8_t options[] = {10, 11, 12, 13, 14, 15, 16, 17}; + return map_enum_number( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_slot_spucch_tbcc_format4_r15_e_"); } std::string delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1and1a_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF5", "deltaF6", "deltaF7", "deltaF8", "deltaF9", "deltaF10", "deltaF11", "deltaF12"}; return convert_enum_idx( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1and1a_r15_e_"); } uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1and1a_r15_opts::to_number() const { - static constexpr uint8_t options[] = {5, 6, 7, 8, 9, 10, 11, 12}; - return convert_enum_idx( + static const uint8_t options[] = {5, 6, 7, 8, 9, 10, 11, 12}; + return map_enum_number( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1and1a_r15_e_"); } std::string delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1b_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF6", "deltaF7", "deltaF8", "deltaF9", "deltaF10", "deltaF11", "deltaF12", "deltaF13"}; return convert_enum_idx( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1b_r15_e_"); } uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1b_r15_opts::to_number() const { - static constexpr uint8_t options[] = {6, 7, 8, 9, 10, 11, 12, 13}; - return convert_enum_idx( + static const uint8_t options[] = {6, 7, 8, 9, 10, 11, 12, 13}; + return map_enum_number( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_format1b_r15_e_"); } std::string delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_rm_format4_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF15", "deltaF16", "deltaF17", "deltaF18", "deltaF19", "deltaF20", "deltaF21", "deltaF22"}; return convert_enum_idx( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_rm_format4_r15_e_"); } uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_rm_format4_r15_opts::to_number() const { - static constexpr uint8_t options[] = {15, 16, 17, 18, 19, 20, 21, 22}; - return convert_enum_idx( + static const uint8_t options[] = {15, 16, 17, 18, 19, 20, 21, 22}; + return map_enum_number( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_rm_format4_r15_e_"); } std::string delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_tbcc_format4_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF10", "deltaF11", "deltaF12", "deltaF13", "deltaF14", "deltaF15", "deltaF16", "deltaF17"}; return convert_enum_idx( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_tbcc_format4_r15_e_"); } uint8_t delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_tbcc_format4_r15_opts::to_number() const { - static constexpr uint8_t options[] = {10, 11, 12, 13, 14, 15, 16, 17}; - return convert_enum_idx( + static const uint8_t options[] = {10, 11, 12, 13, 14, 15, 16, 17}; + return map_enum_number( options, 8, value, "delta_flist_spucch_r15_c::setup_s_::delta_f_subslot_spucch_tbcc_format4_r15_e_"); } std::string laa_scell_cfg_r13_s::sf_start_position_r13_opts::to_string() const { - static constexpr const char* options[] = {"s0", "s07"}; + static const char* options[] = {"s0", "s07"}; return convert_enum_idx(options, 2, value, "laa_scell_cfg_r13_s::sf_start_position_r13_e_"); } float laa_scell_cfg_r13_s::sf_start_position_r13_opts::to_number() const { - static constexpr float options[] = {0.0, 0.7}; - return convert_enum_idx(options, 2, value, "laa_scell_cfg_r13_s::sf_start_position_r13_e_"); + static const float options[] = {0.0, 0.7}; + return map_enum_number(options, 2, value, "laa_scell_cfg_r13_s::sf_start_position_r13_e_"); } std::string laa_scell_cfg_r13_s::sf_start_position_r13_opts::to_number_string() const { - static constexpr const char* options[] = {"0", "0.7"}; + static const char* options[] = {"0", "0.7"}; return convert_enum_idx(options, 2, value, "laa_scell_cfg_r13_s::sf_start_position_r13_e_"); } std::string sched_request_cfg_scell_r13_c::setup_s_::dsr_trans_max_r13_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8", "n16", "n32", "n64", "spare3", "spare2", "spare1"}; + static const char* options[] = {"n4", "n8", "n16", "n32", "n64", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "sched_request_cfg_scell_r13_c::setup_s_::dsr_trans_max_r13_e_"); } uint8_t sched_request_cfg_scell_r13_c::setup_s_::dsr_trans_max_r13_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16, 32, 64}; - return convert_enum_idx(options, 5, value, "sched_request_cfg_scell_r13_c::setup_s_::dsr_trans_max_r13_e_"); + static const uint8_t options[] = {4, 8, 16, 32, 64}; + return map_enum_number(options, 5, value, "sched_request_cfg_scell_r13_c::setup_s_::dsr_trans_max_r13_e_"); } std::string ul_pwr_ctrl_ded_scell_r10_s::delta_mcs_enabled_r10_opts::to_string() const { - static constexpr const char* options[] = {"en0", "en1"}; + static const char* options[] = {"en0", "en1"}; return convert_enum_idx(options, 2, value, "ul_pwr_ctrl_ded_scell_r10_s::delta_mcs_enabled_r10_e_"); } uint8_t ul_pwr_ctrl_ded_scell_r10_s::delta_mcs_enabled_r10_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "ul_pwr_ctrl_ded_scell_r10_s::delta_mcs_enabled_r10_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "ul_pwr_ctrl_ded_scell_r10_s::delta_mcs_enabled_r10_e_"); } std::string ul_pwr_ctrl_ded_scell_r10_s::pathloss_ref_linking_r10_opts::to_string() const { - static constexpr const char* options[] = {"pCell", "sCell"}; + static const char* options[] = {"pCell", "sCell"}; return convert_enum_idx(options, 2, value, "ul_pwr_ctrl_ded_scell_r10_s::pathloss_ref_linking_r10_e_"); } std::string ant_info_common_s::ant_ports_count_opts::to_string() const { - static constexpr const char* options[] = {"an1", "an2", "an4", "spare1"}; + static const char* options[] = {"an1", "an2", "an4", "spare1"}; return convert_enum_idx(options, 4, value, "ant_info_common_s::ant_ports_count_e_"); } uint8_t ant_info_common_s::ant_ports_count_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "ant_info_common_s::ant_ports_count_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "ant_info_common_s::ant_ports_count_e_"); } std::string phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::k_max_r14_opts::to_string() const { - static constexpr const char* options[] = {"l1", "l3"}; + static const char* options[] = {"l1", "l3"}; return convert_enum_idx(options, 2, value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_"); } uint8_t phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::k_max_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3}; - return convert_enum_idx(options, 2, value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_"); + static const uint8_t options[] = {1, 3}; + return map_enum_number(options, 2, value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::k_max_r14_e_"); } std::string phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_opts::to_string() const { - static constexpr const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; + static const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; return convert_enum_idx(options, 8, value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); } float phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_opts::to_number() const { - static constexpr float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; - return convert_enum_idx(options, 8, value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); + static const float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return map_enum_number(options, 8, value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); } std::string phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; + static const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; return convert_enum_idx(options, 8, value, "phys_cfg_ded_scell_r10_s::must_cfg_r14_c_::setup_s_::p_a_must_r14_e_"); } std::string phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"cfi-Config-r15", "cfi-PatternConfig-r15"}; + static const char* options[] = {"cfi-Config-r15", "cfi-PatternConfig-r15"}; return convert_enum_idx(options, 2, value, "phys_cfg_ded_scell_r10_s::semi_static_cfi_cfg_r15_c_::setup_c_::types"); } std::string phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n6"}; + static const char* options[] = {"n4", "n6"}; return convert_enum_idx( options, 2, @@ -6595,8 +6562,8 @@ phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pd uint8_t phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pdsch_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {4, 6}; - return convert_enum_idx( + static const uint8_t options[] = {4, 6}; + return map_enum_number( options, 2, value, @@ -6606,7 +6573,7 @@ phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_sf_pd std::string phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_:: max_num_slot_subslot_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n6"}; + static const char* options[] = {"n4", "n6"}; return convert_enum_idx( options, 2, @@ -6616,8 +6583,8 @@ std::string phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_:: uint8_t phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_num_slot_subslot_pdsch_repeats_r15_opts:: to_number() const { - static constexpr uint8_t options[] = {4, 6}; - return convert_enum_idx( + static const uint8_t options[] = {4, 6}; + return map_enum_number( options, 2, value, @@ -6627,7 +6594,7 @@ uint8_t phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::max_n std::string phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"dlrvseq1", "dlrvseq2"}; + static const char* options[] = {"dlrvseq1", "dlrvseq2"}; return convert_enum_idx( options, 2, @@ -6637,8 +6604,8 @@ phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_r uint8_t phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_sf_pdsch_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2}; + return map_enum_number( options, 2, value, @@ -6649,7 +6616,7 @@ std::string phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"dlrvseq1", "dlrvseq2"}; + static const char* options[] = {"dlrvseq1", "dlrvseq2"}; return convert_enum_idx( options, 2, @@ -6660,8 +6627,8 @@ uint8_t phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::rv_slotsublot_pdsch_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2}; + return map_enum_number( options, 2, value, @@ -6672,7 +6639,7 @@ std::string phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1"}; + static const char* options[] = {"n0", "n1"}; return convert_enum_idx( options, 2, @@ -6683,8 +6650,8 @@ uint8_t phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_sf_pdsch_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx( + static const uint8_t options[] = {0, 1}; + return map_enum_number( options, 2, value, @@ -6694,7 +6661,7 @@ phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_ std::string phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_:: mcs_restrict_slot_subslot_pdsch_repeats_r15_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1"}; + static const char* options[] = {"n0", "n1"}; return convert_enum_idx(options, 2, value, @@ -6704,891 +6671,883 @@ std::string phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_:: uint8_t phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_:: mcs_restrict_slot_subslot_pdsch_repeats_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, - 2, - value, - "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_slot_" - "subslot_pdsch_repeats_r15_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, + 2, + value, + "phys_cfg_ded_scell_r10_s::blind_pdsch_repeat_cfg_r15_c_::setup_s_::mcs_restrict_slot_subslot_" + "pdsch_repeats_r15_e_"); } std::string ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format3_r12_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF-1", "deltaF0", "deltaF1", "deltaF2", "deltaF3", "deltaF4", "deltaF5", "deltaF6"}; return convert_enum_idx(options, 8, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format3_r12_e_"); } int8_t ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format3_r12_opts::to_number() const { - static constexpr int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; - return convert_enum_idx(options, 8, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format3_r12_e_"); + static const int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; + return map_enum_number(options, 8, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format3_r12_e_"); } std::string ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format1b_cs_r12_opts::to_string() const { - static constexpr const char* options[] = {"deltaF1", "deltaF2", "spare2", "spare1"}; + static const char* options[] = {"deltaF1", "deltaF2", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format1b_cs_r12_e_"); } uint8_t ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format1b_cs_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format1b_cs_r12_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format1b_cs_r12_e_"); } std::string ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format4_r13_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF16", "deltaF15", "deltaF14", "deltaF13", "deltaF12", "deltaF11", "deltaF10", "spare1"}; return convert_enum_idx(options, 8, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format4_r13_e_"); } uint8_t ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format4_r13_opts::to_number() const { - static constexpr uint8_t options[] = {16, 15, 14, 13, 12, 11, 10}; - return convert_enum_idx(options, 7, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format4_r13_e_"); + static const uint8_t options[] = {16, 15, 14, 13, 12, 11, 10}; + return map_enum_number(options, 7, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format4_r13_e_"); } std::string ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format5_minus13_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF13", "deltaF12", "deltaF11", "deltaF10", "deltaF9", "deltaF8", "deltaF7", "spare1"}; return convert_enum_idx(options, 8, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format5_minus13_e_"); } uint8_t ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format5_minus13_opts::to_number() const { - static constexpr uint8_t options[] = {13, 12, 11, 10, 9, 8, 7}; - return convert_enum_idx(options, 7, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format5_minus13_e_"); + static const uint8_t options[] = {13, 12, 11, 10, 9, 8, 7}; + return map_enum_number(options, 7, value, "ul_pwr_ctrl_common_scell_v1310_s::delta_f_pucch_format5_minus13_e_"); } std::string ant_info_ded_v10i0_s::max_layers_mimo_r10_opts::to_string() const { - static constexpr const char* options[] = {"twoLayers", "fourLayers", "eightLayers"}; + static const char* options[] = {"twoLayers", "fourLayers", "eightLayers"}; return convert_enum_idx(options, 3, value, "ant_info_ded_v10i0_s::max_layers_mimo_r10_e_"); } uint8_t ant_info_ded_v10i0_s::max_layers_mimo_r10_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8}; - return convert_enum_idx(options, 3, value, "ant_info_ded_v10i0_s::max_layers_mimo_r10_e_"); + static const uint8_t options[] = {2, 4, 8}; + return map_enum_number(options, 3, value, "ant_info_ded_v10i0_s::max_layers_mimo_r10_e_"); } std::string rr_cfg_common_scell_r10_s::non_ul_cfg_r10_s_::dl_bw_r10_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx(options, 6, value, "rr_cfg_common_scell_r10_s::non_ul_cfg_r10_s_::dl_bw_r10_e_"); } uint8_t rr_cfg_common_scell_r10_s::non_ul_cfg_r10_s_::dl_bw_r10_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "rr_cfg_common_scell_r10_s::non_ul_cfg_r10_s_::dl_bw_r10_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "rr_cfg_common_scell_r10_s::non_ul_cfg_r10_s_::dl_bw_r10_e_"); } std::string rr_cfg_common_scell_r10_s::ul_cfg_r10_s_::ul_freq_info_r10_s_::ul_bw_r10_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx( options, 6, value, "rr_cfg_common_scell_r10_s::ul_cfg_r10_s_::ul_freq_info_r10_s_::ul_bw_r10_e_"); } uint8_t rr_cfg_common_scell_r10_s::ul_cfg_r10_s_::ul_freq_info_r10_s_::ul_bw_r10_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx( + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number( options, 6, value, "rr_cfg_common_scell_r10_s::ul_cfg_r10_s_::ul_freq_info_r10_s_::ul_bw_r10_e_"); } std::string rr_cfg_common_scell_r10_s::ul_cfg_r14_s_::ul_freq_info_r14_s_::ul_bw_r14_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx( options, 6, value, "rr_cfg_common_scell_r10_s::ul_cfg_r14_s_::ul_freq_info_r14_s_::ul_bw_r14_e_"); } uint8_t rr_cfg_common_scell_r10_s::ul_cfg_r14_s_::ul_freq_info_r14_s_::ul_bw_r14_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx( + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number( options, 6, value, "rr_cfg_common_scell_r10_s::ul_cfg_r14_s_::ul_freq_info_r14_s_::ul_bw_r14_e_"); } std::string rr_cfg_common_scell_r10_s::harq_ref_cfg_r14_opts::to_string() const { - static constexpr const char* options[] = {"sa2", "sa4", "sa5"}; + static const char* options[] = {"sa2", "sa4", "sa5"}; return convert_enum_idx(options, 3, value, "rr_cfg_common_scell_r10_s::harq_ref_cfg_r14_e_"); } uint8_t rr_cfg_common_scell_r10_s::harq_ref_cfg_r14_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 5}; - return convert_enum_idx(options, 3, value, "rr_cfg_common_scell_r10_s::harq_ref_cfg_r14_e_"); + static const uint8_t options[] = {2, 4, 5}; + return map_enum_number(options, 3, value, "rr_cfg_common_scell_r10_s::harq_ref_cfg_r14_e_"); } // CipheringAlgorithm-r12 ::= ENUMERATED std::string ciphering_algorithm_r12_opts::to_string() const { - static constexpr const char* options[] = { - "eea0", "eea1", "eea2", "eea3-v1130", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"eea0", "eea1", "eea2", "eea3-v1130", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ciphering_algorithm_r12_e"); } uint8_t ciphering_algorithm_r12_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "ciphering_algorithm_r12_e"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "ciphering_algorithm_r12_e"); } std::string sl_hop_cfg_disc_r12_s::c_r12_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n5"}; + static const char* options[] = {"n1", "n5"}; return convert_enum_idx(options, 2, value, "sl_hop_cfg_disc_r12_s::c_r12_e_"); } uint8_t sl_hop_cfg_disc_r12_s::c_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 5}; - return convert_enum_idx(options, 2, value, "sl_hop_cfg_disc_r12_s::c_r12_e_"); + static const uint8_t options[] = {1, 5}; + return map_enum_number(options, 2, value, "sl_hop_cfg_disc_r12_s::c_r12_e_"); } std::string security_algorithm_cfg_s::integrity_prot_algorithm_opts::to_string() const { - static constexpr const char* options[] = { - "eia0-v920", "eia1", "eia2", "eia3-v1130", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"eia0-v920", "eia1", "eia2", "eia3-v1130", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "security_algorithm_cfg_s::integrity_prot_algorithm_e_"); } uint8_t security_algorithm_cfg_s::integrity_prot_algorithm_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "security_algorithm_cfg_s::integrity_prot_algorithm_e_"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "security_algorithm_cfg_s::integrity_prot_algorithm_e_"); } std::string drb_to_add_mod_scg_r12_s::drb_type_r12_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"split-r12", "scg-r12"}; + static const char* options[] = {"split-r12", "scg-r12"}; return convert_enum_idx(options, 2, value, "drb_to_add_mod_scg_r12_s::drb_type_r12_c_::types"); } std::string ip_address_r13_c::types_opts::to_string() const { - static constexpr const char* options[] = {"ipv4-r13", "ipv6-r13"}; + static const char* options[] = {"ipv4-r13", "ipv6-r13"}; return convert_enum_idx(options, 2, value, "ip_address_r13_c::types"); } uint8_t ip_address_r13_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {4, 6}; - return convert_enum_idx(options, 2, value, "ip_address_r13_c::types"); + static const uint8_t options[] = {4, 6}; + return map_enum_number(options, 2, value, "ip_address_r13_c::types"); } std::string security_cfg_ho_v1530_s::handov_type_v1530_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"intra5GC-r15", "ngc-ToEPC-r15", "epc-ToNGC-r15"}; + static const char* options[] = {"intra5GC-r15", "ngc-ToEPC-r15", "epc-ToNGC-r15"}; return convert_enum_idx(options, 3, value, "security_cfg_ho_v1530_s::handov_type_v1530_c_::types"); } uint8_t security_cfg_ho_v1530_s::handov_type_v1530_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {5}; - return convert_enum_idx(options, 1, value, "security_cfg_ho_v1530_s::handov_type_v1530_c_::types"); + static const uint8_t options[] = {5}; + return map_enum_number(options, 1, value, "security_cfg_ho_v1530_s::handov_type_v1530_c_::types"); } std::string ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format4_r13_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF16", "deltaF15", "deltaF14", "deltaF13", "deltaF12", "deltaF11", "deltaF10", "spare1"}; return convert_enum_idx(options, 8, value, "ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format4_r13_e_"); } uint8_t ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format4_r13_opts::to_number() const { - static constexpr uint8_t options[] = {16, 15, 14, 13, 12, 11, 10}; - return convert_enum_idx(options, 7, value, "ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format4_r13_e_"); + static const uint8_t options[] = {16, 15, 14, 13, 12, 11, 10}; + return map_enum_number(options, 7, value, "ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format4_r13_e_"); } std::string ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format5_minus13_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF13", "deltaF12", "deltaF11", "deltaF10", "deltaF9", "deltaF8", "deltaF7", "spare1"}; return convert_enum_idx(options, 8, value, "ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format5_minus13_e_"); } uint8_t ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format5_minus13_opts::to_number() const { - static constexpr uint8_t options[] = {13, 12, 11, 10, 9, 8, 7}; - return convert_enum_idx(options, 7, value, "ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format5_minus13_e_"); + static const uint8_t options[] = {13, 12, 11, 10, 9, 8, 7}; + return map_enum_number(options, 7, value, "ul_pwr_ctrl_common_v1310_s::delta_f_pucch_format5_minus13_e_"); } std::string ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format3_r12_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "deltaF-1", "deltaF0", "deltaF1", "deltaF2", "deltaF3", "deltaF4", "deltaF5", "deltaF6"}; return convert_enum_idx(options, 8, value, "ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format3_r12_e_"); } int8_t ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format3_r12_opts::to_number() const { - static constexpr int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; - return convert_enum_idx(options, 8, value, "ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format3_r12_e_"); + static const int8_t options[] = {-1, 0, 1, 2, 3, 4, 5, 6}; + return map_enum_number(options, 8, value, "ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format3_r12_e_"); } std::string ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format1b_cs_r12_opts::to_string() const { - static constexpr const char* options[] = {"deltaF1", "deltaF2", "spare2", "spare1"}; + static const char* options[] = {"deltaF1", "deltaF2", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format1b_cs_r12_e_"); } uint8_t ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format1b_cs_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format1b_cs_r12_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "ul_pwr_ctrl_common_ps_cell_r12_s::delta_f_pucch_format1b_cs_r12_e_"); } std::string rach_skip_r14_s::target_ta_r14_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ta0-r14", "mcg-PTAG-r14", "scg-PTAG-r14", "mcg-STAG-r14", "scg-STAG-r14"}; + static const char* options[] = {"ta0-r14", "mcg-PTAG-r14", "scg-PTAG-r14", "mcg-STAG-r14", "scg-STAG-r14"}; return convert_enum_idx(options, 5, value, "rach_skip_r14_s::target_ta_r14_c_::types"); } uint8_t rach_skip_r14_s::target_ta_r14_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {0}; - return convert_enum_idx(options, 1, value, "rach_skip_r14_s::target_ta_r14_c_::types"); + static const uint8_t options[] = {0}; + return map_enum_number(options, 1, value, "rach_skip_r14_s::target_ta_r14_c_::types"); } std::string rach_skip_r14_s::ul_cfg_info_r14_s_::ul_sched_interv_r14_opts::to_string() const { - static constexpr const char* options[] = {"sf2", "sf5", "sf10"}; + static const char* options[] = {"sf2", "sf5", "sf10"}; return convert_enum_idx(options, 3, value, "rach_skip_r14_s::ul_cfg_info_r14_s_::ul_sched_interv_r14_e_"); } uint8_t rach_skip_r14_s::ul_cfg_info_r14_s_::ul_sched_interv_r14_opts::to_number() const { - static constexpr uint8_t options[] = {2, 5, 10}; - return convert_enum_idx(options, 3, value, "rach_skip_r14_s::ul_cfg_info_r14_s_::ul_sched_interv_r14_e_"); + static const uint8_t options[] = {2, 5, 10}; + return map_enum_number(options, 3, value, "rach_skip_r14_s::ul_cfg_info_r14_s_::ul_sched_interv_r14_e_"); } std::string rlf_timers_and_consts_scg_r12_c::setup_s_::t313_r12_opts::to_string() const { - static constexpr const char* options[] = {"ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000"}; + static const char* options[] = {"ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000"}; return convert_enum_idx(options, 7, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::t313_r12_e_"); } uint16_t rlf_timers_and_consts_scg_r12_c::setup_s_::t313_r12_opts::to_number() const { - static constexpr uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000}; - return convert_enum_idx(options, 7, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::t313_r12_e_"); + static const uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000}; + return map_enum_number(options, 7, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::t313_r12_e_"); } std::string rlf_timers_and_consts_scg_r12_c::setup_s_::n313_r12_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::n313_r12_e_"); } uint8_t rlf_timers_and_consts_scg_r12_c::setup_s_::n313_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; - return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::n313_r12_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; + return map_enum_number(options, 8, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::n313_r12_e_"); } std::string rlf_timers_and_consts_scg_r12_c::setup_s_::n314_r12_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::n314_r12_e_"); } uint8_t rlf_timers_and_consts_scg_r12_c::setup_s_::n314_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::n314_r12_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(options, 8, value, "rlf_timers_and_consts_scg_r12_c::setup_s_::n314_r12_e_"); } std::string scell_to_add_mod_r10_s::scell_state_r15_opts::to_string() const { - static constexpr const char* options[] = {"activated", "dormant"}; + static const char* options[] = {"activated", "dormant"}; return convert_enum_idx(options, 2, value, "scell_to_add_mod_r10_s::scell_state_r15_e_"); } std::string scell_to_add_mod_ext_v1430_s::scell_state_r15_opts::to_string() const { - static constexpr const char* options[] = {"activated", "dormant"}; + static const char* options[] = {"activated", "dormant"}; return convert_enum_idx(options, 2, value, "scell_to_add_mod_ext_v1430_s::scell_state_r15_e_"); } std::string sl_disc_tx_ref_carrier_ded_r13_c::types_opts::to_string() const { - static constexpr const char* options[] = {"pCell", "sCell"}; + static const char* options[] = {"pCell", "sCell"}; return convert_enum_idx(options, 2, value, "sl_disc_tx_ref_carrier_ded_r13_c::types"); } std::string sl_disc_tx_res_r13_c::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"scheduled-r13", "ue-Selected-r13"}; + static const char* options[] = {"scheduled-r13", "ue-Selected-r13"}; return convert_enum_idx(options, 2, value, "sl_disc_tx_res_r13_c::setup_c_::types"); } std::string sl_gap_pattern_r13_s::gap_period_r13_opts::to_string() const { - static constexpr const char* options[] = {"sf40", - "sf60", - "sf70", - "sf80", - "sf120", - "sf140", - "sf160", - "sf240", - "sf280", - "sf320", - "sf640", - "sf1280", - "sf2560", - "sf5120", - "sf10240"}; + static const char* options[] = {"sf40", + "sf60", + "sf70", + "sf80", + "sf120", + "sf140", + "sf160", + "sf240", + "sf280", + "sf320", + "sf640", + "sf1280", + "sf2560", + "sf5120", + "sf10240"}; return convert_enum_idx(options, 15, value, "sl_gap_pattern_r13_s::gap_period_r13_e_"); } uint16_t sl_gap_pattern_r13_s::gap_period_r13_opts::to_number() const { - static constexpr uint16_t options[] = {40, 60, 70, 80, 120, 140, 160, 240, 280, 320, 640, 1280, 2560, 5120, 10240}; - return convert_enum_idx(options, 15, value, "sl_gap_pattern_r13_s::gap_period_r13_e_"); + static const uint16_t options[] = {40, 60, 70, 80, 120, 140, 160, 240, 280, 320, 640, 1280, 2560, 5120, 10240}; + return map_enum_number(options, 15, value, "sl_gap_pattern_r13_s::gap_period_r13_e_"); } // SubframeAssignment-r15 ::= ENUMERATED std::string sf_assign_r15_opts::to_string() const { - static constexpr const char* options[] = {"sa0", "sa1", "sa2", "sa3", "sa4", "sa5", "sa6"}; + static const char* options[] = {"sa0", "sa1", "sa2", "sa3", "sa4", "sa5", "sa6"}; return convert_enum_idx(options, 7, value, "sf_assign_r15_e"); } uint8_t sf_assign_r15_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6}; - return convert_enum_idx(options, 7, value, "sf_assign_r15_e"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6}; + return map_enum_number(options, 7, value, "sf_assign_r15_e"); } std::string wlan_mob_cfg_r13_s::assoc_timer_r13_opts::to_string() const { - static constexpr const char* options[] = {"s10", "s30", "s60", "s120", "s240"}; + static const char* options[] = {"s10", "s30", "s60", "s120", "s240"}; return convert_enum_idx(options, 5, value, "wlan_mob_cfg_r13_s::assoc_timer_r13_e_"); } uint8_t wlan_mob_cfg_r13_s::assoc_timer_r13_opts::to_number() const { - static constexpr uint8_t options[] = {10, 30, 60, 120, 240}; - return convert_enum_idx(options, 5, value, "wlan_mob_cfg_r13_s::assoc_timer_r13_e_"); + static const uint8_t options[] = {10, 30, 60, 120, 240}; + return map_enum_number(options, 5, value, "wlan_mob_cfg_r13_s::assoc_timer_r13_e_"); } // CA-BandwidthClass-r10 ::= ENUMERATED std::string ca_bw_class_r10_opts::to_string() const { - static constexpr const char* options[] = {"a", "b", "c", "d", "e", "f"}; + static const char* options[] = {"a", "b", "c", "d", "e", "f"}; return convert_enum_idx(options, 6, value, "ca_bw_class_r10_e"); } std::string mob_ctrl_info_scg_r12_s::t307_r12_opts::to_string() const { - static constexpr const char* options[] = {"ms50", "ms100", "ms150", "ms200", "ms500", "ms1000", "ms2000", "spare1"}; + static const char* options[] = {"ms50", "ms100", "ms150", "ms200", "ms500", "ms1000", "ms2000", "spare1"}; return convert_enum_idx(options, 8, value, "mob_ctrl_info_scg_r12_s::t307_r12_e_"); } uint16_t mob_ctrl_info_scg_r12_s::t307_r12_opts::to_number() const { - static constexpr uint16_t options[] = {50, 100, 150, 200, 500, 1000, 2000}; - return convert_enum_idx(options, 7, value, "mob_ctrl_info_scg_r12_s::t307_r12_e_"); + static const uint16_t options[] = {50, 100, 150, 200, 500, 1000, 2000}; + return map_enum_number(options, 7, value, "mob_ctrl_info_scg_r12_s::t307_r12_e_"); } std::string rclwi_cfg_r13_s::cmd_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"steerToWLAN-r13", "steerToLTE-r13"}; + static const char* options[] = {"steerToWLAN-r13", "steerToLTE-r13"}; return convert_enum_idx(options, 2, value, "rclwi_cfg_r13_s::cmd_c_::types"); } std::string sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"scheduled-r14", "ue-Selected-r14"}; + static const char* options[] = {"scheduled-r14", "ue-Selected-r14"}; return convert_enum_idx(options, 2, value, "sl_v2x_cfg_ded_r14_s::comm_tx_res_r14_c_::setup_c_::types"); } std::string sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"scheduled-v1530", "ue-Selected-v1530"}; + static const char* options[] = {"scheduled-v1530", "ue-Selected-v1530"}; return convert_enum_idx(options, 2, value, "sl_v2x_cfg_ded_r14_s::comm_tx_res_v1530_c_::setup_c_::types"); } std::string ran_notif_area_info_r15_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellList-r15", "ran-AreaConfigList-r15"}; + static const char* options[] = {"cellList-r15", "ran-AreaConfigList-r15"}; return convert_enum_idx(options, 2, value, "ran_notif_area_info_r15_c::types"); } std::string meas_idle_cfg_ded_r15_s::meas_idle_dur_r15_opts::to_string() const { - static constexpr const char* options[] = {"sec10", "sec30", "sec60", "sec120", "sec180", "sec240", "sec300", "spare"}; + static const char* options[] = {"sec10", "sec30", "sec60", "sec120", "sec180", "sec240", "sec300", "spare"}; return convert_enum_idx(options, 8, value, "meas_idle_cfg_ded_r15_s::meas_idle_dur_r15_e_"); } uint16_t meas_idle_cfg_ded_r15_s::meas_idle_dur_r15_opts::to_number() const { - static constexpr uint16_t options[] = {10, 30, 60, 120, 180, 240, 300}; - return convert_enum_idx(options, 7, value, "meas_idle_cfg_ded_r15_s::meas_idle_dur_r15_e_"); + static const uint16_t options[] = {10, 30, 60, 120, 180, 240, 300}; + return map_enum_number(options, 7, value, "meas_idle_cfg_ded_r15_s::meas_idle_dur_r15_e_"); } std::string rrc_inactive_cfg_r15_s::ran_paging_cycle_r15_opts::to_string() const { - static constexpr const char* options[] = {"rf32", "rf64", "rf128", "rf256"}; + static const char* options[] = {"rf32", "rf64", "rf128", "rf256"}; return convert_enum_idx(options, 4, value, "rrc_inactive_cfg_r15_s::ran_paging_cycle_r15_e_"); } uint16_t rrc_inactive_cfg_r15_s::ran_paging_cycle_r15_opts::to_number() const { - static constexpr uint16_t options[] = {32, 64, 128, 256}; - return convert_enum_idx(options, 4, value, "rrc_inactive_cfg_r15_s::ran_paging_cycle_r15_e_"); + static const uint16_t options[] = {32, 64, 128, 256}; + return map_enum_number(options, 4, value, "rrc_inactive_cfg_r15_s::ran_paging_cycle_r15_e_"); } std::string rrc_inactive_cfg_r15_s::periodic_rnau_timer_r15_opts::to_string() const { - static constexpr const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min360", "min720"}; + static const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min360", "min720"}; return convert_enum_idx(options, 8, value, "rrc_inactive_cfg_r15_s::periodic_rnau_timer_r15_e_"); } uint16_t rrc_inactive_cfg_r15_s::periodic_rnau_timer_r15_opts::to_number() const { - static constexpr uint16_t options[] = {5, 10, 20, 30, 60, 120, 360, 720}; - return convert_enum_idx(options, 8, value, "rrc_inactive_cfg_r15_s::periodic_rnau_timer_r15_e_"); + static const uint16_t options[] = {5, 10, 20, 30, 60, 120, 360, 720}; + return map_enum_number(options, 8, value, "rrc_inactive_cfg_r15_s::periodic_rnau_timer_r15_e_"); } std::string sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"scheduled-r12", "ue-Selected-r12"}; + static const char* options[] = {"scheduled-r12", "ue-Selected-r12"}; return convert_enum_idx(options, 2, value, "sl_comm_cfg_r12_s::comm_tx_res_r12_c_::setup_c_::types"); } std::string sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"scheduled-v1310", "ue-Selected-v1310"}; + static const char* options[] = {"scheduled-v1310", "ue-Selected-v1310"}; return convert_enum_idx(options, 2, value, "sl_comm_cfg_r12_s::comm_tx_res_v1310_c_::setup_c_::types"); } std::string sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"scheduled-r12", "ue-Selected-r12"}; + static const char* options[] = {"scheduled-r12", "ue-Selected-r12"}; return convert_enum_idx(options, 2, value, "sl_disc_cfg_r12_s::disc_tx_res_r12_c_::setup_c_::types"); } std::string sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"scheduled-r13", "ue-Selected-r13"}; + static const char* options[] = {"scheduled-r13", "ue-Selected-r13"}; return convert_enum_idx(options, 2, value, "sl_disc_cfg_r12_s::disc_tx_res_ps_r13_c_::setup_c_::types"); } std::string sl_sync_tx_ctrl_r12_s::network_ctrl_sync_tx_r12_opts::to_string() const { - static constexpr const char* options[] = {"on", "off"}; + static const char* options[] = {"on", "off"}; return convert_enum_idx(options, 2, value, "sl_sync_tx_ctrl_r12_s::network_ctrl_sync_tx_r12_e_"); } // CDMA2000-Type ::= ENUMERATED std::string cdma2000_type_opts::to_string() const { - static constexpr const char* options[] = {"type1XRTT", "typeHRPD"}; + static const char* options[] = {"type1XRTT", "typeHRPD"}; return convert_enum_idx(options, 2, value, "cdma2000_type_e"); } uint8_t cdma2000_type_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "cdma2000_type_e"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "cdma2000_type_e"); } // MeasCycleSCell-r10 ::= ENUMERATED std::string meas_cycle_scell_r10_opts::to_string() const { - static constexpr const char* options[] = {"sf160", "sf256", "sf320", "sf512", "sf640", "sf1024", "sf1280", "spare1"}; + static const char* options[] = {"sf160", "sf256", "sf320", "sf512", "sf640", "sf1024", "sf1280", "spare1"}; return convert_enum_idx(options, 8, value, "meas_cycle_scell_r10_e"); } uint16_t meas_cycle_scell_r10_opts::to_number() const { - static constexpr uint16_t options[] = {160, 256, 320, 512, 640, 1024, 1280}; - return convert_enum_idx(options, 7, value, "meas_cycle_scell_r10_e"); + static const uint16_t options[] = {160, 256, 320, 512, 640, 1024, 1280}; + return map_enum_number(options, 7, value, "meas_cycle_scell_r10_e"); } std::string meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ms40-r12", "ms80-r12", "ms160-r12"}; + static const char* options[] = {"ms40-r12", "ms80-r12", "ms160-r12"}; return convert_enum_idx(options, 3, value, "meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::types"); } uint8_t meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {40, 80, 160}; - return convert_enum_idx(options, 3, value, "meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::types"); + static const uint8_t options[] = {40, 80, 160}; + return map_enum_number(options, 3, value, "meas_ds_cfg_r12_c::setup_s_::dmtc_period_offset_r12_c_::types"); } std::string meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"durationFDD-r12", "durationTDD-r12"}; + static const char* options[] = {"durationFDD-r12", "durationTDD-r12"}; return convert_enum_idx(options, 2, value, "meas_ds_cfg_r12_c::setup_s_::ds_occasion_dur_r12_c_::types"); } std::string meas_gap_cfg_c::setup_s_::gap_offset_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"gp0", - "gp1", - "gp2-r14", - "gp3-r14", - "gp-ncsg0-r14", - "gp-ncsg1-r14", - "gp-ncsg2-r14", - "gp-ncsg3-r14", - "gp-nonUniform1-r14", - "gp-nonUniform2-r14", - "gp-nonUniform3-r14", - "gp-nonUniform4-r14", - "gp4-r15", - "gp5-r15", - "gp6-r15", - "gp7-r15", - "gp8-r15", - "gp9-r15", - "gp10-r15", - "gp11-r15"}; + static const char* options[] = {"gp0", + "gp1", + "gp2-r14", + "gp3-r14", + "gp-ncsg0-r14", + "gp-ncsg1-r14", + "gp-ncsg2-r14", + "gp-ncsg3-r14", + "gp-nonUniform1-r14", + "gp-nonUniform2-r14", + "gp-nonUniform3-r14", + "gp-nonUniform4-r14", + "gp4-r15", + "gp5-r15", + "gp6-r15", + "gp7-r15", + "gp8-r15", + "gp9-r15", + "gp10-r15", + "gp11-r15"}; return convert_enum_idx(options, 20, value, "meas_gap_cfg_c::setup_s_::gap_offset_c_::types"); } std::string meas_sensing_cfg_r15_s::sensing_periodicity_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ms20", "ms50", "ms100", "ms200", "ms300", "ms400", "ms500", "ms600", "ms700", "ms800", "ms900", "ms1000"}; return convert_enum_idx(options, 12, value, "meas_sensing_cfg_r15_s::sensing_periodicity_r15_e_"); } uint16_t meas_sensing_cfg_r15_s::sensing_periodicity_r15_opts::to_number() const { - static constexpr uint16_t options[] = {20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; - return convert_enum_idx(options, 12, value, "meas_sensing_cfg_r15_s::sensing_periodicity_r15_e_"); + static const uint16_t options[] = {20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; + return map_enum_number(options, 12, value, "meas_sensing_cfg_r15_s::sensing_periodicity_r15_e_"); } std::string rmtc_cfg_r13_c::setup_s_::rmtc_period_r13_opts::to_string() const { - static constexpr const char* options[] = {"ms40", "ms80", "ms160", "ms320", "ms640"}; + static const char* options[] = {"ms40", "ms80", "ms160", "ms320", "ms640"}; return convert_enum_idx(options, 5, value, "rmtc_cfg_r13_c::setup_s_::rmtc_period_r13_e_"); } uint16_t rmtc_cfg_r13_c::setup_s_::rmtc_period_r13_opts::to_number() const { - static constexpr uint16_t options[] = {40, 80, 160, 320, 640}; - return convert_enum_idx(options, 5, value, "rmtc_cfg_r13_c::setup_s_::rmtc_period_r13_e_"); + static const uint16_t options[] = {40, 80, 160, 320, 640}; + return map_enum_number(options, 5, value, "rmtc_cfg_r13_c::setup_s_::rmtc_period_r13_e_"); } std::string rmtc_cfg_r13_c::setup_s_::meas_dur_r13_opts::to_string() const { - static constexpr const char* options[] = {"sym1", "sym14", "sym28", "sym42", "sym70"}; + static const char* options[] = {"sym1", "sym14", "sym28", "sym42", "sym70"}; return convert_enum_idx(options, 5, value, "rmtc_cfg_r13_c::setup_s_::meas_dur_r13_e_"); } uint8_t rmtc_cfg_r13_c::setup_s_::meas_dur_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 14, 28, 42, 70}; - return convert_enum_idx(options, 5, value, "rmtc_cfg_r13_c::setup_s_::meas_dur_r13_e_"); + static const uint8_t options[] = {1, 14, 28, 42, 70}; + return map_enum_number(options, 5, value, "rmtc_cfg_r13_c::setup_s_::meas_dur_r13_e_"); } std::string rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::setup_s_::t350_r12_opts::to_string() const { - static constexpr const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min180", "spare1"}; + static const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min180", "spare1"}; return convert_enum_idx( options, 8, value, "rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::setup_s_::t350_r12_e_"); } uint8_t rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::setup_s_::t350_r12_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 20, 30, 60, 120, 180}; - return convert_enum_idx( + static const uint8_t options[] = {5, 10, 20, 30, 60, 120, 180}; + return map_enum_number( options, 7, value, "rrc_conn_recfg_v1250_ies_s::wlan_offload_info_r12_c_::setup_s_::t350_r12_e_"); } std::string rrc_conn_release_v1530_ies_s::cn_type_r15_opts::to_string() const { - static constexpr const char* options[] = {"epc", "fivegc"}; + static const char* options[] = {"epc", "fivegc"}; return convert_enum_idx(options, 2, value, "rrc_conn_release_v1530_ies_s::cn_type_r15_e_"); } uint8_t rrc_conn_release_v1530_ies_s::cn_type_r15_opts::to_number() const { - switch (value) { - case fivegc: - return 5; - default: - invalid_enum_number(value, "rrc_conn_release_v1530_ies_s::cn_type_r15_e_"); + if (value == fivegc) { + return 5; } + invalid_enum_number(value, "rrc_conn_release_v1530_ies_s::cn_type_r15_e_"); return 0; } std::string rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_opts::to_string() const { - static constexpr const char* options[] = {"kHz15", "kHz30", "kHz120", "kHz240"}; + static const char* options[] = {"kHz15", "kHz30", "kHz120", "kHz240"}; return convert_enum_idx(options, 4, value, "rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); } uint8_t rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_opts::to_number() const { - static constexpr uint8_t options[] = {15, 30, 120, 240}; - return convert_enum_idx(options, 4, value, "rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); + static const uint8_t options[] = {15, 30, 120, 240}; + return map_enum_number(options, 4, value, "rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); } // ReportInterval ::= ENUMERATED std::string report_interv_opts::to_string() const { - static constexpr const char* options[] = {"ms120", - "ms240", - "ms480", - "ms640", - "ms1024", - "ms2048", - "ms5120", - "ms10240", - "min1", - "min6", - "min12", - "min30", - "min60", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"ms120", + "ms240", + "ms480", + "ms640", + "ms1024", + "ms2048", + "ms5120", + "ms10240", + "min1", + "min6", + "min12", + "min30", + "min60", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "report_interv_e"); } uint16_t report_interv_opts::to_number() const { - static constexpr uint16_t options[] = {120, 240, 480, 640, 1024, 2048, 5120, 10240, 1, 6, 12, 30, 60}; - return convert_enum_idx(options, 13, value, "report_interv_e"); + static const uint16_t options[] = {120, 240, 480, 640, 1024, 2048, 5120, 10240, 1, 6, 12, 30, 60}; + return map_enum_number(options, 13, value, "report_interv_e"); } std::string thres_eutra_c::types_opts::to_string() const { - static constexpr const char* options[] = {"threshold-RSRP", "threshold-RSRQ"}; + static const char* options[] = {"threshold-RSRP", "threshold-RSRQ"}; return convert_enum_idx(options, 2, value, "thres_eutra_c::types"); } std::string thres_nr_r15_c::types_opts::to_string() const { - static constexpr const char* options[] = {"nr-RSRP-r15", "nr-RSRQ-r15", "nr-SINR-r15"}; + static const char* options[] = {"nr-RSRP-r15", "nr-RSRQ-r15", "nr-SINR-r15"}; return convert_enum_idx(options, 3, value, "thres_nr_r15_c::types"); } std::string thres_utra_c::types_opts::to_string() const { - static constexpr const char* options[] = {"utra-RSCP", "utra-EcN0"}; + static const char* options[] = {"utra-RSCP", "utra-EcN0"}; return convert_enum_idx(options, 2, value, "thres_utra_c::types"); } uint8_t thres_utra_c::types_opts::to_number() const { - switch (value) { - case utra_ec_n0: - return 0; - default: - invalid_enum_number(value, "thres_utra_c::types"); + if (value == utra_ec_n0) { + return 0; } + invalid_enum_number(value, "thres_utra_c::types"); return 0; } // TimeToTrigger ::= ENUMERATED std::string time_to_trigger_opts::to_string() const { - static constexpr const char* options[] = {"ms0", - "ms40", - "ms64", - "ms80", - "ms100", - "ms128", - "ms160", - "ms256", - "ms320", - "ms480", - "ms512", - "ms640", - "ms1024", - "ms1280", - "ms2560", - "ms5120"}; + static const char* options[] = {"ms0", + "ms40", + "ms64", + "ms80", + "ms100", + "ms128", + "ms160", + "ms256", + "ms320", + "ms480", + "ms512", + "ms640", + "ms1024", + "ms1280", + "ms2560", + "ms5120"}; return convert_enum_idx(options, 16, value, "time_to_trigger_e"); } uint16_t time_to_trigger_opts::to_number() const { - static constexpr uint16_t options[] = {0, 40, 64, 80, 100, 128, 160, 256, 320, 480, 512, 640, 1024, 1280, 2560, 5120}; - return convert_enum_idx(options, 16, value, "time_to_trigger_e"); + static const uint16_t options[] = {0, 40, 64, 80, 100, 128, 160, 256, 320, 480, 512, 640, 1024, 1280, 2560, 5120}; + return map_enum_number(options, 16, value, "time_to_trigger_e"); } std::string ul_delay_cfg_r13_c::setup_s_::delay_thres_r13_opts::to_string() const { - static constexpr const char* options[] = {"ms30", - "ms40", - "ms50", - "ms60", - "ms70", - "ms80", - "ms90", - "ms100", - "ms150", - "ms300", - "ms500", - "ms750", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"ms30", + "ms40", + "ms50", + "ms60", + "ms70", + "ms80", + "ms90", + "ms100", + "ms150", + "ms300", + "ms500", + "ms750", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "ul_delay_cfg_r13_c::setup_s_::delay_thres_r13_e_"); } uint16_t ul_delay_cfg_r13_c::setup_s_::delay_thres_r13_opts::to_number() const { - static constexpr uint16_t options[] = {30, 40, 50, 60, 70, 80, 90, 100, 150, 300, 500, 750}; - return convert_enum_idx(options, 12, value, "ul_delay_cfg_r13_c::setup_s_::delay_thres_r13_e_"); + static const uint16_t options[] = {30, 40, 50, 60, 70, 80, 90, 100, 150, 300, 500, 750}; + return map_enum_number(options, 12, value, "ul_delay_cfg_r13_c::setup_s_::delay_thres_r13_e_"); } // WLAN-BandIndicator-r13 ::= ENUMERATED std::string wlan_band_ind_r13_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "band2dot4", "band5", "band60-v1430", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "wlan_band_ind_r13_e"); } float wlan_band_ind_r13_opts::to_number() const { - static constexpr float options[] = {2.4, 5.0, 60.0}; - return convert_enum_idx(options, 3, value, "wlan_band_ind_r13_e"); + static const float options[] = {2.4, 5.0, 60.0}; + return map_enum_number(options, 3, value, "wlan_band_ind_r13_e"); } std::string wlan_band_ind_r13_opts::to_number_string() const { - static constexpr const char* options[] = {"2.4", "5", "60"}; + static const char* options[] = {"2.4", "5", "60"}; return convert_enum_idx(options, 8, value, "wlan_band_ind_r13_e"); } std::string wlan_carrier_info_r13_s::country_code_r13_opts::to_string() const { - static constexpr const char* options[] = {"unitedStates", "europe", "japan", "global"}; + static const char* options[] = {"unitedStates", "europe", "japan", "global"}; return convert_enum_idx(options, 4, value, "wlan_carrier_info_r13_s::country_code_r13_e_"); } std::string idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_sfs_r11_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n5", "n10", "n15", "n20", "n30", "spare2", "spare1"}; + static const char* options[] = {"n2", "n5", "n10", "n15", "n20", "n30", "spare2", "spare1"}; return convert_enum_idx( options, 8, value, "idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_sfs_r11_e_"); } uint8_t idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_sfs_r11_opts::to_number() const { - static constexpr uint8_t options[] = {2, 5, 10, 15, 20, 30}; - return convert_enum_idx( + static const uint8_t options[] = {2, 5, 10, 15, 20, 30}; + return map_enum_number( options, 6, value, "idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_sfs_r11_e_"); } std::string idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_validity_r11_opts::to_string() const { - static constexpr const char* options[] = { - "sf200", "sf500", "sf1000", "sf2000", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"sf200", "sf500", "sf1000", "sf2000", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx( options, 8, value, "idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_validity_r11_e_"); } uint16_t idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_validity_r11_opts::to_number() const { - static constexpr uint16_t options[] = {200, 500, 1000, 2000}; - return convert_enum_idx( + static const uint16_t options[] = {200, 500, 1000, 2000}; + return map_enum_number( options, 4, value, "idc_cfg_r11_s::autonomous_denial_params_r11_s_::autonomous_denial_validity_r11_e_"); } std::string meas_obj_eutra_s::t312_r12_c_::setup_opts::to_string() const { - static constexpr const char* options[] = {"ms0", "ms50", "ms100", "ms200", "ms300", "ms400", "ms500", "ms1000"}; + static const char* options[] = {"ms0", "ms50", "ms100", "ms200", "ms300", "ms400", "ms500", "ms1000"}; return convert_enum_idx(options, 8, value, "meas_obj_eutra_s::t312_r12_c_::setup_e_"); } uint16_t meas_obj_eutra_s::t312_r12_c_::setup_opts::to_number() const { - static constexpr uint16_t options[] = {0, 50, 100, 200, 300, 400, 500, 1000}; - return convert_enum_idx(options, 8, value, "meas_obj_eutra_s::t312_r12_c_::setup_e_"); + static const uint16_t options[] = {0, 50, 100, 200, 300, 400, 500, 1000}; + return map_enum_number(options, 8, value, "meas_obj_eutra_s::t312_r12_c_::setup_e_"); } std::string meas_obj_utra_s::cells_to_add_mod_list_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"cellsToAddModListUTRA-FDD", "cellsToAddModListUTRA-TDD"}; + static const char* options[] = {"cellsToAddModListUTRA-FDD", "cellsToAddModListUTRA-TDD"}; return convert_enum_idx(options, 2, value, "meas_obj_utra_s::cells_to_add_mod_list_c_::types"); } std::string meas_obj_utra_s::cell_for_which_to_report_cgi_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"utra-FDD", "utra-TDD"}; + static const char* options[] = {"utra-FDD", "utra-TDD"}; return convert_enum_idx(options, 2, value, "meas_obj_utra_s::cell_for_which_to_report_cgi_c_::types"); } std::string meas_obj_wlan_r13_s::carrier_freq_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"bandIndicatorListWLAN-r13", "carrierInfoListWLAN-r13"}; + static const char* options[] = {"bandIndicatorListWLAN-r13", "carrierInfoListWLAN-r13"}; return convert_enum_idx(options, 2, value, "meas_obj_wlan_r13_s::carrier_freq_r13_c_::types"); } std::string pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_opts::to_string() const { - static constexpr const char* options[] = {"s0", - "s0dot5", - "s1", - "s2", - "s5", - "s10", - "s20", - "s30", - "s60", - "s90", - "s120", - "s300", - "s600", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"s0", + "s0dot5", + "s1", + "s2", + "s5", + "s10", + "s20", + "s30", + "s60", + "s90", + "s120", + "s300", + "s600", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_e_"); } float pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; - return convert_enum_idx(options, 13, value, "pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_e_"); + static const float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; + return map_enum_number(options, 13, value, "pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_e_"); } std::string pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_opts::to_number_string() const { - static constexpr const char* options[] = { - "0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; + static const char* options[] = {"0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; return convert_enum_idx(options, 16, value, "pwr_pref_ind_cfg_r11_c::setup_s_::pwr_pref_ind_timer_r11_e_"); } std::string eutra_event_s::event_id_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"eventA1", - "eventA2", - "eventA3", - "eventA4", - "eventA5", - "eventA6-r10", - "eventC1-r12", - "eventC2-r12", - "eventV1-r14", - "eventV2-r14", - "eventH1-r15", - "eventH2-r15"}; + static const char* options[] = {"eventA1", + "eventA2", + "eventA3", + "eventA4", + "eventA5", + "eventA6-r10", + "eventC1-r12", + "eventC2-r12", + "eventV1-r14", + "eventV2-r14", + "eventH1-r15", + "eventH2-r15"}; return convert_enum_idx(options, 12, value, "eutra_event_s::event_id_c_::types"); } std::string report_cfg_eutra_s::trigger_type_c_::periodical_s_::purpose_opts::to_string() const { - static constexpr const char* options[] = {"reportStrongestCells", "reportCGI"}; + static const char* options[] = {"reportStrongestCells", "reportCGI"}; return convert_enum_idx(options, 2, value, "report_cfg_eutra_s::trigger_type_c_::periodical_s_::purpose_e_"); } std::string report_cfg_eutra_s::trigger_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"event", "periodical"}; + static const char* options[] = {"event", "periodical"}; return convert_enum_idx(options, 2, value, "report_cfg_eutra_s::trigger_type_c_::types"); } std::string report_cfg_eutra_s::trigger_quant_opts::to_string() const { - static constexpr const char* options[] = {"rsrp", "rsrq"}; + static const char* options[] = {"rsrp", "rsrq"}; return convert_enum_idx(options, 2, value, "report_cfg_eutra_s::trigger_quant_e_"); } std::string report_cfg_eutra_s::report_quant_opts::to_string() const { - static constexpr const char* options[] = {"sameAsTriggerQuantity", "both"}; + static const char* options[] = {"sameAsTriggerQuantity", "both"}; return convert_enum_idx(options, 2, value, "report_cfg_eutra_s::report_quant_e_"); } std::string report_cfg_eutra_s::report_amount_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; return convert_enum_idx(options, 8, value, "report_cfg_eutra_s::report_amount_e_"); } int8_t report_cfg_eutra_s::report_amount_opts::to_number() const { - static constexpr int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return convert_enum_idx(options, 8, value, "report_cfg_eutra_s::report_amount_e_"); + static const int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(options, 8, value, "report_cfg_eutra_s::report_amount_e_"); } std::string report_cfg_eutra_s::rs_sinr_cfg_r13_c_::setup_s_::report_quant_v1310_opts::to_string() const { - static constexpr const char* options[] = {"rsrpANDsinr", "rsrqANDsinr", "all"}; + static const char* options[] = {"rsrpANDsinr", "rsrqANDsinr", "all"}; return convert_enum_idx(options, 3, value, "report_cfg_eutra_s::rs_sinr_cfg_r13_c_::setup_s_::report_quant_v1310_e_"); } std::string report_cfg_eutra_s::purpose_v1430_opts::to_string() const { - static constexpr const char* options[] = {"reportLocation", "sidelink", "spare2", "spare1"}; + static const char* options[] = {"reportLocation", "sidelink", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "report_cfg_eutra_s::purpose_v1430_e_"); } std::string report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_thres_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"b1-ThresholdUTRA", "b1-ThresholdGERAN", "b1-ThresholdCDMA2000"}; + static const char* options[] = {"b1-ThresholdUTRA", "b1-ThresholdGERAN", "b1-ThresholdCDMA2000"}; return convert_enum_idx( options, 3, @@ -7599,7 +7558,7 @@ report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b1_s_::b1_ std::string report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_thres2_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"b2-Threshold2UTRA", "b2-Threshold2GERAN", "b2-Threshold2CDMA2000"}; + static const char* options[] = {"b2-Threshold2UTRA", "b2-Threshold2GERAN", "b2-Threshold2CDMA2000"}; return convert_enum_idx( options, 3, @@ -7609,118 +7568,113 @@ report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::event_b2_s_::b2_ std::string report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "eventB1", "eventB2", "eventW1-r13", "eventW2-r13", "eventW3-r13", "eventB1-NR-r15", "eventB2-NR-r15"}; return convert_enum_idx(options, 7, value, "report_cfg_inter_rat_s::trigger_type_c_::event_s_::event_id_c_::types"); } std::string report_cfg_inter_rat_s::trigger_type_c_::periodical_s_::purpose_opts::to_string() const { - static constexpr const char* options[] = {"reportStrongestCells", "reportStrongestCellsForSON", "reportCGI"}; + static const char* options[] = {"reportStrongestCells", "reportStrongestCellsForSON", "reportCGI"}; return convert_enum_idx(options, 3, value, "report_cfg_inter_rat_s::trigger_type_c_::periodical_s_::purpose_e_"); } std::string report_cfg_inter_rat_s::trigger_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"event", "periodical"}; + static const char* options[] = {"event", "periodical"}; return convert_enum_idx(options, 2, value, "report_cfg_inter_rat_s::trigger_type_c_::types"); } std::string report_cfg_inter_rat_s::report_amount_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; return convert_enum_idx(options, 8, value, "report_cfg_inter_rat_s::report_amount_e_"); } int8_t report_cfg_inter_rat_s::report_amount_opts::to_number() const { - static constexpr int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return convert_enum_idx(options, 8, value, "report_cfg_inter_rat_s::report_amount_e_"); + static const int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(options, 8, value, "report_cfg_inter_rat_s::report_amount_e_"); } std::string report_cfg_inter_rat_s::report_sftd_meas_r15_opts::to_string() const { - static constexpr const char* options[] = {"pSCell", "neighborCells"}; + static const char* options[] = {"pSCell", "neighborCells"}; return convert_enum_idx(options, 2, value, "report_cfg_inter_rat_s::report_sftd_meas_r15_e_"); } std::string meas_obj_to_add_mod_s::meas_obj_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"measObjectEUTRA", - "measObjectUTRA", - "measObjectGERAN", - "measObjectCDMA2000", - "measObjectWLAN-r13", - "measObjectNR-r15"}; + static const char* options[] = {"measObjectEUTRA", + "measObjectUTRA", + "measObjectGERAN", + "measObjectCDMA2000", + "measObjectWLAN-r13", + "measObjectNR-r15"}; return convert_enum_idx(options, 6, value, "meas_obj_to_add_mod_s::meas_obj_c_::types"); } uint16_t meas_obj_to_add_mod_s::meas_obj_c_::types_opts::to_number() const { - switch (value) { - case meas_obj_cdma2000: - return 2000; - default: - invalid_enum_number(value, "meas_obj_to_add_mod_s::meas_obj_c_::types"); + if (value == meas_obj_cdma2000) { + return 2000; } + invalid_enum_number(value, "meas_obj_to_add_mod_s::meas_obj_c_::types"); return 0; } std::string meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"measObjectEUTRA-r13", - "measObjectUTRA-r13", - "measObjectGERAN-r13", - "measObjectCDMA2000-r13", - "measObjectWLAN-v1320", - "measObjectNR-r15"}; + static const char* options[] = {"measObjectEUTRA-r13", + "measObjectUTRA-r13", + "measObjectGERAN-r13", + "measObjectCDMA2000-r13", + "measObjectWLAN-v1320", + "measObjectNR-r15"}; return convert_enum_idx(options, 6, value, "meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::types"); } uint16_t meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::types_opts::to_number() const { - switch (value) { - case meas_obj_cdma2000_r13: - return 2000; - default: - invalid_enum_number(value, "meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::types"); + if (value == meas_obj_cdma2000_r13) { + return 2000; } + invalid_enum_number(value, "meas_obj_to_add_mod_ext_r13_s::meas_obj_r13_c_::types"); return 0; } std::string other_cfg_r9_s::bw_pref_ind_timer_r14_opts::to_string() const { - static constexpr const char* options[] = {"s0", - "s0dot5", - "s1", - "s2", - "s5", - "s10", - "s20", - "s30", - "s60", - "s90", - "s120", - "s300", - "s600", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"s0", + "s0dot5", + "s1", + "s2", + "s5", + "s10", + "s20", + "s30", + "s60", + "s90", + "s120", + "s300", + "s600", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "other_cfg_r9_s::bw_pref_ind_timer_r14_e_"); } float other_cfg_r9_s::bw_pref_ind_timer_r14_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; - return convert_enum_idx(options, 13, value, "other_cfg_r9_s::bw_pref_ind_timer_r14_e_"); + static const float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; + return map_enum_number(options, 13, value, "other_cfg_r9_s::bw_pref_ind_timer_r14_e_"); } std::string other_cfg_r9_s::bw_pref_ind_timer_r14_opts::to_number_string() const { - static constexpr const char* options[] = { - "0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; + static const char* options[] = {"0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; return convert_enum_idx(options, 16, value, "other_cfg_r9_s::bw_pref_ind_timer_r14_e_"); } std::string other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budget_report_prohibit_timer_r14_opts::to_string() const { - static constexpr const char* options[] = {"s0", "s0dot4", "s0dot8", "s1dot6", "s3", "s6", "s12", "s30"}; + static const char* options[] = {"s0", "s0dot4", "s0dot8", "s1dot6", "s3", "s6", "s12", "s30"}; return convert_enum_idx( options, 8, @@ -7730,8 +7684,8 @@ other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budget_report_pr float other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budget_report_prohibit_timer_r14_opts::to_number() const { - static constexpr float options[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; - return convert_enum_idx( + static const float options[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; + return map_enum_number( options, 8, value, @@ -7740,7 +7694,7 @@ float other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budget_rep std::string other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budget_report_prohibit_timer_r14_opts:: to_number_string() const { - static constexpr const char* options[] = {"0", "0.4", "0.8", "1.6", "3", "6", "12", "30"}; + static const char* options[] = {"0", "0.4", "0.8", "1.6", "3", "6", "12", "30"}; return convert_enum_idx( options, 8, @@ -7750,35 +7704,34 @@ std::string other_cfg_r9_s::delay_budget_report_cfg_r14_c_::setup_s_::delay_budg std::string other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_opts::to_string() const { - static constexpr const char* options[] = {"s0", - "s0dot5", - "s1", - "s2", - "s5", - "s10", - "s20", - "s30", - "s60", - "s90", - "s120", - "s300", - "s600", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"s0", + "s0dot5", + "s1", + "s2", + "s5", + "s10", + "s20", + "s30", + "s60", + "s90", + "s120", + "s300", + "s600", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx( options, 16, value, "other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_e_"); } float other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; - return convert_enum_idx( + static const float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; + return map_enum_number( options, 13, value, "other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_e_"); } std::string other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_opts::to_number_string() const { - static constexpr const char* options[] = { - "0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; + static const char* options[] = {"0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; return convert_enum_idx( options, 16, value, "other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r14_e_"); } @@ -7786,278 +7739,271 @@ std::string other_cfg_r9_s::rlm_report_cfg_r14_c_::setup_s_::rlm_report_timer_r1 std::string other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_opts::to_string() const { - static constexpr const char* options[] = {"s0", - "s0dot5", - "s1", - "s2", - "s5", - "s10", - "s20", - "s30", - "s60", - "s90", - "s120", - "s300", - "s600", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"s0", + "s0dot5", + "s1", + "s2", + "s5", + "s10", + "s20", + "s30", + "s60", + "s90", + "s120", + "s300", + "s600", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx( options, 16, value, "other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_e_"); } float other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; - return convert_enum_idx( + static const float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; + return map_enum_number( options, 13, value, "other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_e_"); } std::string other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_opts::to_number_string() const { - static constexpr const char* options[] = { - "0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; + static const char* options[] = {"0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; return convert_enum_idx( options, 16, value, "other_cfg_r9_s::overheat_assist_cfg_r14_c_::setup_s_::overheat_ind_prohibit_timer_r14_e_"); } std::string other_cfg_r9_s::meas_cfg_app_layer_r15_c_::setup_s_::service_type_opts::to_string() const { - static constexpr const char* options[] = { - "qoe", "qoemtsi", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"qoe", "qoemtsi", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "other_cfg_r9_s::meas_cfg_app_layer_r15_c_::setup_s_::service_type_e_"); } std::string prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"v1", "v1dot5", "v2", "v2dot5", "v4", "v5", "v8", "v10"}; + static const char* options[] = {"v1", "v1dot5", "v2", "v2dot5", "v4", "v5", "v8", "v10"}; return convert_enum_idx(options, 8, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); } float prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_opts::to_number() const { - static constexpr float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; - return convert_enum_idx(options, 8, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); + static const float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; + return map_enum_number(options, 8, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); } std::string prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_opts::to_number_string() const { - static constexpr const char* options[] = {"1", "1.5", "2", "2.5", "4", "5", "8", "10"}; + static const char* options[] = {"1", "1.5", "2", "2.5", "4", "5", "8", "10"}; return convert_enum_idx(options, 8, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::fdd_r13_e_"); } std::string prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_opts::to_string() const { - static constexpr const char* options[] = {"v1", "v2", "v4", "v5", "v8", "v10", "v20", "spare"}; + static const char* options[] = {"v1", "v2", "v4", "v5", "v8", "v10", "v20", "spare"}; return convert_enum_idx(options, 8, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_"); } uint8_t prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; - return convert_enum_idx(options, 7, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_"); + static const uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; + return map_enum_number(options, 7, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::tdd_r13_e_"); } std::string prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fdd-r13", "tdd-r13"}; + static const char* options[] = {"fdd-r13", "tdd-r13"}; return convert_enum_idx(options, 2, value, "prach_cfg_v1310_s::mpdcch_start_sf_css_ra_r13_c_::types"); } std::string quant_cfg_cdma2000_s::meas_quant_cdma2000_opts::to_string() const { - static constexpr const char* options[] = {"pilotStrength", "pilotPnPhaseAndPilotStrength"}; + static const char* options[] = {"pilotStrength", "pilotPnPhaseAndPilotStrength"}; return convert_enum_idx(options, 2, value, "quant_cfg_cdma2000_s::meas_quant_cdma2000_e_"); } std::string quant_cfg_utra_s::meas_quant_utra_fdd_opts::to_string() const { - static constexpr const char* options[] = {"cpich-RSCP", "cpich-EcN0"}; + static const char* options[] = {"cpich-RSCP", "cpich-EcN0"}; return convert_enum_idx(options, 2, value, "quant_cfg_utra_s::meas_quant_utra_fdd_e_"); } uint8_t quant_cfg_utra_s::meas_quant_utra_fdd_opts::to_number() const { - switch (value) { - case cpich_ec_n0: - return 0; - default: - invalid_enum_number(value, "quant_cfg_utra_s::meas_quant_utra_fdd_e_"); + if (value == cpich_ec_n0) { + return 0; } + invalid_enum_number(value, "quant_cfg_utra_s::meas_quant_utra_fdd_e_"); return 0; } std::string report_cfg_to_add_mod_s::report_cfg_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"reportConfigEUTRA", "reportConfigInterRAT"}; + static const char* options[] = {"reportConfigEUTRA", "reportConfigInterRAT"}; return convert_enum_idx(options, 2, value, "report_cfg_to_add_mod_s::report_cfg_c_::types"); } std::string carrier_bw_eutra_s::dl_bw_opts::to_string() const { - static constexpr const char* options[] = {"n6", - "n15", - "n25", - "n50", - "n75", - "n100", - "spare10", - "spare9", - "spare8", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"n6", + "n15", + "n25", + "n50", + "n75", + "n100", + "spare10", + "spare9", + "spare8", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "carrier_bw_eutra_s::dl_bw_e_"); } uint8_t carrier_bw_eutra_s::dl_bw_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "carrier_bw_eutra_s::dl_bw_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "carrier_bw_eutra_s::dl_bw_e_"); } std::string carrier_bw_eutra_s::ul_bw_opts::to_string() const { - static constexpr const char* options[] = {"n6", - "n15", - "n25", - "n50", - "n75", - "n100", - "spare10", - "spare9", - "spare8", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"n6", + "n15", + "n25", + "n50", + "n75", + "n100", + "spare10", + "spare9", + "spare8", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "carrier_bw_eutra_s::ul_bw_e_"); } uint8_t carrier_bw_eutra_s::ul_bw_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "carrier_bw_eutra_s::ul_bw_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "carrier_bw_eutra_s::ul_bw_e_"); } std::string carrier_info_nr_r15_s::subcarrier_spacing_ssb_r15_opts::to_string() const { - static constexpr const char* options[] = {"kHz15", "kHz30", "kHz120", "kHz240"}; + static const char* options[] = {"kHz15", "kHz30", "kHz120", "kHz240"}; return convert_enum_idx(options, 4, value, "carrier_info_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); } uint8_t carrier_info_nr_r15_s::subcarrier_spacing_ssb_r15_opts::to_number() const { - static constexpr uint8_t options[] = {15, 30, 120, 240}; - return convert_enum_idx(options, 4, value, "carrier_info_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); + static const uint8_t options[] = {15, 30, 120, 240}; + return map_enum_number(options, 4, value, "carrier_info_nr_r15_s::subcarrier_spacing_ssb_r15_e_"); } std::string meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = { - "rstd0-r15", "rstd1-r15", "rstd2-r15", "rstd3-r15", "rstd4-r15", "rstd5-r15", "rstd6-r15", - "rstd7-r15", "rstd8-r15", "rstd9-r15", "rstd10-r15", "rstd11-r15", "rstd12-r15", "rstd13-r15", - "rstd14-r15", "rstd15-r15", "rstd16-r15", "rstd17-r15", "rstd18-r15", "rstd19-r15", "rstd20-r15"}; + static const char* options[] = {"rstd0-r15", "rstd1-r15", "rstd2-r15", "rstd3-r15", "rstd4-r15", "rstd5-r15", + "rstd6-r15", "rstd7-r15", "rstd8-r15", "rstd9-r15", "rstd10-r15", "rstd11-r15", + "rstd12-r15", "rstd13-r15", "rstd14-r15", "rstd15-r15", "rstd16-r15", "rstd17-r15", + "rstd18-r15", "rstd19-r15", "rstd20-r15"}; return convert_enum_idx( options, 21, value, "meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types"); } uint8_t meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; - return convert_enum_idx( + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; + return map_enum_number( options, 21, value, "meas_gap_cfg_dense_prs_r15_c::setup_s_::gap_offset_dense_prs_r15_c_::types"); } std::string meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_opts::to_string() const { - static constexpr const char* options[] = {"scheme00", "scheme01", "scheme10", "scheme11"}; + static const char* options[] = {"scheme00", "scheme01", "scheme10", "scheme11"}; return convert_enum_idx(options, 4, value, "meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_e_"); } float meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_opts::to_number() const { - static constexpr float options[] = {0.0, 0.1, 1.0, 1.1}; - return convert_enum_idx(options, 4, value, "meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_e_"); + static const float options[] = {0.0, 0.1, 1.0, 1.1}; + return map_enum_number(options, 4, value, "meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_e_"); } std::string meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"0.0", "0.1", "1.0", "1.1"}; + static const char* options[] = {"0.0", "0.1", "1.0", "1.1"}; return convert_enum_idx(options, 4, value, "meas_gap_sharing_cfg_r14_c::setup_s_::meas_gap_sharing_scheme_r14_e_"); } // MeasScaleFactor-r12 ::= ENUMERATED std::string meas_scale_factor_r12_opts::to_string() const { - static constexpr const char* options[] = {"sf-EUTRA-cf1", "sf-EUTRA-cf2"}; + static const char* options[] = {"sf-EUTRA-cf1", "sf-EUTRA-cf2"}; return convert_enum_idx(options, 2, value, "meas_scale_factor_r12_e"); } uint8_t meas_scale_factor_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "meas_scale_factor_r12_e"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "meas_scale_factor_r12_e"); } // RAT-Type ::= ENUMERATED std::string rat_type_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "eutra", "utra", "geran-cs", "geran-ps", "cdma2000-1XRTT", "nr", "eutra-nr", "spare1"}; return convert_enum_idx(options, 8, value, "rat_type_e"); } uint16_t rat_type_opts::to_number() const { - switch (value) { - case cdma2000_minus1_xrtt: - return 2000; - default: - invalid_enum_number(value, "rat_type_e"); + if (value == cdma2000_minus1_xrtt) { + return 2000; } + invalid_enum_number(value, "rat_type_e"); return 0; } std::string rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"geran-r9", "utra-FDD-r9", "utra-TDD-r9", "utra-TDD-r10"}; + static const char* options[] = {"geran-r9", "utra-FDD-r9", "utra-TDD-r9", "utra-TDD-r10"}; return convert_enum_idx(options, 4, value, "rrc_conn_release_v920_ies_s::cell_info_list_r9_c_::types"); } std::string si_or_psi_geran_c::types_opts::to_string() const { - static constexpr const char* options[] = {"si", "psi"}; + static const char* options[] = {"si", "psi"}; return convert_enum_idx(options, 2, value, "si_or_psi_geran_c::types"); } std::string area_cfg_r10_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellGlobalIdList-r10", "trackingAreaCodeList-r10"}; + static const char* options[] = {"cellGlobalIdList-r10", "trackingAreaCodeList-r10"}; return convert_enum_idx(options, 2, value, "area_cfg_r10_c::types"); } std::string cell_change_order_s::t304_opts::to_string() const { - static constexpr const char* options[] = { - "ms100", "ms200", "ms500", "ms1000", "ms2000", "ms4000", "ms8000", "ms10000-v1310"}; + static const char* options[] = {"ms100", "ms200", "ms500", "ms1000", "ms2000", "ms4000", "ms8000", "ms10000-v1310"}; return convert_enum_idx(options, 8, value, "cell_change_order_s::t304_e_"); } uint16_t cell_change_order_s::t304_opts::to_number() const { - static constexpr uint16_t options[] = {100, 200, 500, 1000, 2000, 4000, 8000, 10000}; - return convert_enum_idx(options, 8, value, "cell_change_order_s::t304_e_"); + static const uint16_t options[] = {100, 200, 500, 1000, 2000, 4000, 8000, 10000}; + return map_enum_number(options, 8, value, "cell_change_order_s::t304_e_"); } std::string cell_change_order_s::target_rat_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"geran"}; + static const char* options[] = {"geran"}; return convert_enum_idx(options, 1, value, "cell_change_order_s::target_rat_type_c_::types"); } std::string e_csfb_r9_s::mob_cdma2000_hrpd_r9_opts::to_string() const { - static constexpr const char* options[] = {"handover", "redirection"}; + static const char* options[] = {"handover", "redirection"}; return convert_enum_idx(options, 2, value, "e_csfb_r9_s::mob_cdma2000_hrpd_r9_e_"); } std::string ho_s::target_rat_type_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "utra", "geran", "cdma2000-1XRTT", "cdma2000-HRPD", "nr", "eutra", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ho_s::target_rat_type_e_"); } @@ -8065,141 +8011,135 @@ std::string ho_s::target_rat_type_opts::to_string() const // LoggingDuration-r10 ::= ENUMERATED std::string logging_dur_r10_opts::to_string() const { - static constexpr const char* options[] = {"min10", "min20", "min40", "min60", "min90", "min120", "spare2", "spare1"}; + static const char* options[] = {"min10", "min20", "min40", "min60", "min90", "min120", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "logging_dur_r10_e"); } uint8_t logging_dur_r10_opts::to_number() const { - static constexpr uint8_t options[] = {10, 20, 40, 60, 90, 120}; - return convert_enum_idx(options, 6, value, "logging_dur_r10_e"); + static const uint8_t options[] = {10, 20, 40, 60, 90, 120}; + return map_enum_number(options, 6, value, "logging_dur_r10_e"); } // LoggingInterval-r10 ::= ENUMERATED std::string logging_interv_r10_opts::to_string() const { - static constexpr const char* options[] = { - "ms1280", "ms2560", "ms5120", "ms10240", "ms20480", "ms30720", "ms40960", "ms61440"}; + static const char* options[] = {"ms1280", "ms2560", "ms5120", "ms10240", "ms20480", "ms30720", "ms40960", "ms61440"}; return convert_enum_idx(options, 8, value, "logging_interv_r10_e"); } uint16_t logging_interv_r10_opts::to_number() const { - static constexpr uint16_t options[] = {1280, 2560, 5120, 10240, 20480, 30720, 40960, 61440}; - return convert_enum_idx(options, 8, value, "logging_interv_r10_e"); + static const uint16_t options[] = {1280, 2560, 5120, 10240, 20480, 30720, 40960, 61440}; + return map_enum_number(options, 8, value, "logging_interv_r10_e"); } std::string mob_ctrl_info_s::t304_opts::to_string() const { - static constexpr const char* options[] = { - "ms50", "ms100", "ms150", "ms200", "ms500", "ms1000", "ms2000", "ms10000-v1310"}; + static const char* options[] = {"ms50", "ms100", "ms150", "ms200", "ms500", "ms1000", "ms2000", "ms10000-v1310"}; return convert_enum_idx(options, 8, value, "mob_ctrl_info_s::t304_e_"); } uint16_t mob_ctrl_info_s::t304_opts::to_number() const { - static constexpr uint16_t options[] = {50, 100, 150, 200, 500, 1000, 2000, 10000}; - return convert_enum_idx(options, 8, value, "mob_ctrl_info_s::t304_e_"); + static const uint16_t options[] = {50, 100, 150, 200, 500, 1000, 2000, 10000}; + return map_enum_number(options, 8, value, "mob_ctrl_info_s::t304_e_"); } std::string mob_ctrl_info_s::ho_without_wt_change_r14_opts::to_string() const { - static constexpr const char* options[] = {"keepLWA-Config", "sendEndMarker"}; + static const char* options[] = {"keepLWA-Config", "sendEndMarker"}; return convert_enum_idx(options, 2, value, "mob_ctrl_info_s::ho_without_wt_change_r14_e_"); } std::string rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"subframeConfigPatternFDD-r10", "subframeConfigPatternTDD-r10"}; + static const char* options[] = {"subframeConfigPatternFDD-r10", "subframeConfigPatternTDD-r10"}; return convert_enum_idx(options, 2, value, "rn_sf_cfg_r10_s::sf_cfg_pattern_r10_c_::types"); } std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_alloc_type_r10_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "type0", "type1", "type2Localized", "type2Distributed", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_alloc_type_r10_e_"); } std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = { - "nrb6-r10", "nrb15-r10", "nrb25-r10", "nrb50-r10", "nrb75-r10", "nrb100-r10"}; + static const char* options[] = {"nrb6-r10", "nrb15-r10", "nrb25-r10", "nrb50-r10", "nrb75-r10", "nrb100-r10"}; return convert_enum_idx( options, 6, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::types"); } uint8_t rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx( + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number( options, 6, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type01_r10_c_::types"); } std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = { - "nrb6-r10", "nrb15-r10", "nrb25-r10", "nrb50-r10", "nrb75-r10", "nrb100-r10"}; + static const char* options[] = {"nrb6-r10", "nrb15-r10", "nrb25-r10", "nrb50-r10", "nrb75-r10", "nrb100-r10"}; return convert_enum_idx( options, 6, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::types"); } uint8_t rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx( + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number( options, 6, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::type2_r10_c_::types"); } std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"type01-r10", "type2-r10"}; + static const char* options[] = {"type01-r10", "type2-r10"}; return convert_enum_idx(options, 2, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types"); } float rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types_opts::to_number() const { - static constexpr float options[] = {0.1, 2.0}; - return convert_enum_idx(options, 2, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types"); + static const float options[] = {0.1, 2.0}; + return map_enum_number(options, 2, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types"); } std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types_opts::to_number_string() const { - static constexpr const char* options[] = {"0.1", "2"}; + static const char* options[] = {"0.1", "2"}; return convert_enum_idx(options, 2, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::res_block_assign_r10_c_::types"); } std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::no_interleaving_r10_opts::to_string() const { - static constexpr const char* options[] = {"crs", "dmrs"}; + static const char* options[] = {"crs", "dmrs"}; return convert_enum_idx( options, 2, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::no_interleaving_r10_e_"); } std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"interleaving-r10", "noInterleaving-r10"}; + static const char* options[] = {"interleaving-r10", "noInterleaving-r10"}; return convert_enum_idx(options, 2, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::demod_rs_r10_c_::types"); } std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"channelSelectionMultiplexingBundling", "fallbackForFormat3"}; + static const char* options[] = {"channelSelectionMultiplexingBundling", "fallbackForFormat3"}; return convert_enum_idx(options, 2, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::types"); } uint8_t rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::types_opts::to_number() const { - switch (value) { - case fallback_for_format3: - return 3; - default: - invalid_enum_number(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::types"); + if (value == fallback_for_format3) { + return 3; } + invalid_enum_number(value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::tdd_c_::types"); return 0; } std::string rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"tdd", "fdd"}; + static const char* options[] = {"tdd", "fdd"}; return convert_enum_idx(options, 2, value, "rn_sf_cfg_r10_s::rpdcch_cfg_r10_s_::pucch_cfg_r10_c_::types"); } std::string redirected_carrier_info_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "eutra", "geran", "utra-FDD", "utra-TDD", "cdma2000-HRPD", "cdma2000-1xRTT", "utra-TDD-r10", "nr-r15"}; return convert_enum_idx(options, 8, value, "redirected_carrier_info_c::types"); } @@ -8207,823 +8147,815 @@ std::string redirected_carrier_info_c::types_opts::to_string() const // ReleaseCause ::= ENUMERATED std::string release_cause_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "loadBalancingTAUrequired", "other", "cs-FallbackHighPriority-v1020", "rrc-Suspend-v1320"}; return convert_enum_idx(options, 4, value, "release_cause_e"); } std::string security_cfg_ho_s::handov_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"intraLTE", "interRAT"}; + static const char* options[] = {"intraLTE", "interRAT"}; return convert_enum_idx(options, 2, value, "security_cfg_ho_s::handov_type_c_::types"); } std::string dl_info_transfer_r15_ies_s::ded_info_type_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "dedicatedInfoNAS-r15", "dedicatedInfoCDMA2000-1XRTT-r15", "dedicatedInfoCDMA2000-HRPD-r15"}; return convert_enum_idx(options, 3, value, "dl_info_transfer_r15_ies_s::ded_info_type_r15_c_::types"); } std::string dl_info_transfer_r8_ies_s::ded_info_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = { - "dedicatedInfoNAS", "dedicatedInfoCDMA2000-1XRTT", "dedicatedInfoCDMA2000-HRPD"}; + static const char* options[] = {"dedicatedInfoNAS", "dedicatedInfoCDMA2000-1XRTT", "dedicatedInfoCDMA2000-HRPD"}; return convert_enum_idx(options, 3, value, "dl_info_transfer_r8_ies_s::ded_info_type_c_::types"); } std::string mob_from_eutra_cmd_r8_ies_s::purpose_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"handover", "cellChangeOrder"}; + static const char* options[] = {"handover", "cellChangeOrder"}; return convert_enum_idx(options, 2, value, "mob_from_eutra_cmd_r8_ies_s::purpose_c_::types"); } std::string mob_from_eutra_cmd_r9_ies_s::purpose_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"handover", "cellChangeOrder", "e-CSFB-r9"}; + static const char* options[] = {"handover", "cellChangeOrder", "e-CSFB-r9"}; return convert_enum_idx(options, 3, value, "mob_from_eutra_cmd_r9_ies_s::purpose_c_::types"); } std::string csfb_params_resp_cdma2000_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"csfbParametersResponseCDMA2000-r8", "criticalExtensionsFuture"}; + static const char* options[] = {"csfbParametersResponseCDMA2000-r8", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "csfb_params_resp_cdma2000_s::crit_exts_c_::types"); } uint16_t csfb_params_resp_cdma2000_s::crit_exts_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {2000}; - return convert_enum_idx(options, 1, value, "csfb_params_resp_cdma2000_s::crit_exts_c_::types"); + static const uint16_t options[] = {2000}; + return map_enum_number(options, 1, value, "csfb_params_resp_cdma2000_s::crit_exts_c_::types"); } std::string counter_check_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"counterCheck-r8", "spare3", "spare2", "spare1"}; + static const char* options[] = {"counterCheck-r8", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "counter_check_s::crit_exts_c_::c1_c_::types"); } std::string dl_info_transfer_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { - "dlInformationTransfer-r8", "dlInformationTransfer-r15", "spare2", "spare1"}; + static const char* options[] = {"dlInformationTransfer-r8", "dlInformationTransfer-r15", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "dl_info_transfer_s::crit_exts_c_::c1_c_::types"); } std::string ho_from_eutra_prep_request_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"handoverFromEUTRAPreparationRequest-r8", "spare3", "spare2", "spare1"}; + static const char* options[] = {"handoverFromEUTRAPreparationRequest-r8", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ho_from_eutra_prep_request_s::crit_exts_c_::c1_c_::types"); } std::string logged_meas_cfg_r10_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"loggedMeasurementConfiguration-r10", "spare3", "spare2", "spare1"}; + static const char* options[] = {"loggedMeasurementConfiguration-r10", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "logged_meas_cfg_r10_s::crit_exts_c_::c1_c_::types"); } std::string mob_from_eutra_cmd_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { - "mobilityFromEUTRACommand-r8", "mobilityFromEUTRACommand-r9", "spare2", "spare1"}; + static const char* options[] = {"mobilityFromEUTRACommand-r8", "mobilityFromEUTRACommand-r9", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "mob_from_eutra_cmd_s::crit_exts_c_::c1_c_::types"); } std::string rn_recfg_r10_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rnReconfiguration-r10", "spare3", "spare2", "spare1"}; + static const char* options[] = {"rnReconfiguration-r10", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "rn_recfg_r10_s::crit_exts_c_::c1_c_::types"); } std::string rrc_conn_recfg_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "rrcConnectionReconfiguration-r8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "rrc_conn_recfg_s::crit_exts_c_::c1_c_::types"); } std::string rrc_conn_release_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionRelease-r8", "spare3", "spare2", "spare1"}; + static const char* options[] = {"rrcConnectionRelease-r8", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "rrc_conn_release_s::crit_exts_c_::c1_c_::types"); } std::string rrc_conn_resume_r13_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionResume-r13", "spare3", "spare2", "spare1"}; + static const char* options[] = {"rrcConnectionResume-r13", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "rrc_conn_resume_r13_s::crit_exts_c_::c1_c_::types"); } std::string security_mode_cmd_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"securityModeCommand-r8", "spare3", "spare2", "spare1"}; + static const char* options[] = {"securityModeCommand-r8", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "security_mode_cmd_s::crit_exts_c_::c1_c_::types"); } std::string ue_cap_enquiry_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ueCapabilityEnquiry-r8", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ueCapabilityEnquiry-r8", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ue_cap_enquiry_s::crit_exts_c_::c1_c_::types"); } std::string ue_info_request_r9_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ueInformationRequest-r9", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ueInformationRequest-r9", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ue_info_request_r9_s::crit_exts_c_::c1_c_::types"); } std::string dl_dcch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"csfbParametersResponseCDMA2000", - "dlInformationTransfer", - "handoverFromEUTRAPreparationRequest", - "mobilityFromEUTRACommand", - "rrcConnectionReconfiguration", - "rrcConnectionRelease", - "securityModeCommand", - "ueCapabilityEnquiry", - "counterCheck", - "ueInformationRequest-r9", - "loggedMeasurementConfiguration-r10", - "rnReconfiguration-r10", - "rrcConnectionResume-r13", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"csfbParametersResponseCDMA2000", + "dlInformationTransfer", + "handoverFromEUTRAPreparationRequest", + "mobilityFromEUTRACommand", + "rrcConnectionReconfiguration", + "rrcConnectionRelease", + "securityModeCommand", + "ueCapabilityEnquiry", + "counterCheck", + "ueInformationRequest-r9", + "loggedMeasurementConfiguration-r10", + "rnReconfiguration-r10", + "rrcConnectionResume-r13", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "dl_dcch_msg_type_c::c1_c_::types"); } uint16_t dl_dcch_msg_type_c::c1_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {2000}; - return convert_enum_idx(options, 1, value, "dl_dcch_msg_type_c::c1_c_::types"); + static const uint16_t options[] = {2000}; + return map_enum_number(options, 1, value, "dl_dcch_msg_type_c::c1_c_::types"); } std::string dl_dcch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "dl_dcch_msg_type_c::types"); } uint8_t dl_dcch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "dl_dcch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "dl_dcch_msg_type_c::types"); } std::string tmgi_r9_s::plmn_id_r9_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"plmn-Index-r9", "explicitValue-r9"}; + static const char* options[] = {"plmn-Index-r9", "explicitValue-r9"}; return convert_enum_idx(options, 2, value, "tmgi_r9_s::plmn_id_r9_c_::types"); } std::string pmch_cfg_r12_s::data_mcs_r12_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"normal-r12", "higerOrder-r12"}; + static const char* options[] = {"normal-r12", "higerOrder-r12"}; return convert_enum_idx(options, 2, value, "pmch_cfg_r12_s::data_mcs_r12_c_::types"); } std::string pmch_cfg_r12_s::mch_sched_period_r12_opts::to_string() const { - static constexpr const char* options[] = {"rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512", "rf1024"}; + static const char* options[] = {"rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512", "rf1024"}; return convert_enum_idx(options, 9, value, "pmch_cfg_r12_s::mch_sched_period_r12_e_"); } uint16_t pmch_cfg_r12_s::mch_sched_period_r12_opts::to_number() const { - static constexpr uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512, 1024}; - return convert_enum_idx(options, 9, value, "pmch_cfg_r12_s::mch_sched_period_r12_e_"); + static const uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512, 1024}; + return map_enum_number(options, 9, value, "pmch_cfg_r12_s::mch_sched_period_r12_e_"); } std::string pmch_cfg_r12_s::mch_sched_period_v1430_opts::to_string() const { - static constexpr const char* options[] = {"rf1", "rf2"}; + static const char* options[] = {"rf1", "rf2"}; return convert_enum_idx(options, 2, value, "pmch_cfg_r12_s::mch_sched_period_v1430_e_"); } uint8_t pmch_cfg_r12_s::mch_sched_period_v1430_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "pmch_cfg_r12_s::mch_sched_period_v1430_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "pmch_cfg_r12_s::mch_sched_period_v1430_e_"); } std::string pmch_cfg_r9_s::mch_sched_period_r9_opts::to_string() const { - static constexpr const char* options[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512", "rf1024"}; + static const char* options[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512", "rf1024"}; return convert_enum_idx(options, 8, value, "pmch_cfg_r9_s::mch_sched_period_r9_e_"); } uint16_t pmch_cfg_r9_s::mch_sched_period_r9_opts::to_number() const { - static constexpr uint16_t options[] = {8, 16, 32, 64, 128, 256, 512, 1024}; - return convert_enum_idx(options, 8, value, "pmch_cfg_r9_s::mch_sched_period_r9_e_"); + static const uint16_t options[] = {8, 16, 32, 64, 128, 256, 512, 1024}; + return map_enum_number(options, 8, value, "pmch_cfg_r9_s::mch_sched_period_r9_e_"); } std::string mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_opts::to_string() const { - static constexpr const char* options[] = {"rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "rf256"}; + static const char* options[] = {"rf4", "rf8", "rf16", "rf32", "rf64", "rf128", "rf256"}; return convert_enum_idx(options, 7, value, "mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_e_"); } uint16_t mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_opts::to_number() const { - static constexpr uint16_t options[] = {4, 8, 16, 32, 64, 128, 256}; - return convert_enum_idx(options, 7, value, "mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_e_"); + static const uint16_t options[] = {4, 8, 16, 32, 64, 128, 256}; + return map_enum_number(options, 7, value, "mbsfn_area_cfg_r9_s::common_sf_alloc_period_r9_e_"); } std::string mcch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"mbsfnAreaConfiguration-r9"}; + static const char* options[] = {"mbsfnAreaConfiguration-r9"}; return convert_enum_idx(options, 1, value, "mcch_msg_type_c::c1_c_::types"); } std::string mcch_msg_type_c::later_c_::c2_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"mbmsCountingRequest-r10"}; + static const char* options[] = {"mbmsCountingRequest-r10"}; return convert_enum_idx(options, 1, value, "mcch_msg_type_c::later_c_::c2_c_::types"); } std::string mcch_msg_type_c::later_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c2", "messageClassExtension"}; + static const char* options[] = {"c2", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "mcch_msg_type_c::later_c_::types"); } uint8_t mcch_msg_type_c::later_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx(options, 1, value, "mcch_msg_type_c::later_c_::types"); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "mcch_msg_type_c::later_c_::types"); } std::string mcch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "later"}; + static const char* options[] = {"c1", "later"}; return convert_enum_idx(options, 2, value, "mcch_msg_type_c::types"); } uint8_t mcch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "mcch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "mcch_msg_type_c::types"); } std::string paging_ue_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"s-TMSI", "imsi", "ng-5G-S-TMSI-r15", "i-RNTI-r15"}; + static const char* options[] = {"s-TMSI", "imsi", "ng-5G-S-TMSI-r15", "i-RNTI-r15"}; return convert_enum_idx(options, 4, value, "paging_ue_id_c::types"); } int8_t paging_ue_id_c::types_opts::to_number() const { - switch (value) { - case ng_minus5_g_s_tmsi_r15: - return -5; - default: - invalid_enum_number(value, "paging_ue_id_c::types"); + if (value == ng_minus5_g_s_tmsi_r15) { + return -5; } + invalid_enum_number(value, "paging_ue_id_c::types"); return 0; } std::string paging_record_s::cn_domain_opts::to_string() const { - static constexpr const char* options[] = {"ps", "cs"}; + static const char* options[] = {"ps", "cs"}; return convert_enum_idx(options, 2, value, "paging_record_s::cn_domain_e_"); } std::string pcch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"paging"}; + static const char* options[] = {"paging"}; return convert_enum_idx(options, 1, value, "pcch_msg_type_c::c1_c_::types"); } std::string pcch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "pcch_msg_type_c::types"); } uint8_t pcch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "pcch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "pcch_msg_type_c::types"); } std::string sc_mtch_sched_info_br_r14_s::on_dur_timer_scptm_r14_opts::to_string() const { - static constexpr const char* options[] = { - "psf300", "psf400", "psf500", "psf600", "psf800", "psf1000", "psf1200", "psf1600"}; + static const char* options[] = {"psf300", "psf400", "psf500", "psf600", "psf800", "psf1000", "psf1200", "psf1600"}; return convert_enum_idx(options, 8, value, "sc_mtch_sched_info_br_r14_s::on_dur_timer_scptm_r14_e_"); } uint16_t sc_mtch_sched_info_br_r14_s::on_dur_timer_scptm_r14_opts::to_number() const { - static constexpr uint16_t options[] = {300, 400, 500, 600, 800, 1000, 1200, 1600}; - return convert_enum_idx(options, 8, value, "sc_mtch_sched_info_br_r14_s::on_dur_timer_scptm_r14_e_"); + static const uint16_t options[] = {300, 400, 500, 600, 800, 1000, 1200, 1600}; + return map_enum_number(options, 8, value, "sc_mtch_sched_info_br_r14_s::on_dur_timer_scptm_r14_e_"); } std::string sc_mtch_sched_info_br_r14_s::drx_inactivity_timer_scptm_r14_opts::to_string() const { - static constexpr const char* options[] = {"psf0", - "psf1", - "psf2", - "psf4", - "psf8", - "psf16", - "psf32", - "psf64", - "psf128", - "psf256", - "ps512", - "psf1024", - "psf2048", - "psf4096", - "psf8192", - "psf16384"}; + static const char* options[] = {"psf0", + "psf1", + "psf2", + "psf4", + "psf8", + "psf16", + "psf32", + "psf64", + "psf128", + "psf256", + "ps512", + "psf1024", + "psf2048", + "psf4096", + "psf8192", + "psf16384"}; return convert_enum_idx(options, 16, value, "sc_mtch_sched_info_br_r14_s::drx_inactivity_timer_scptm_r14_e_"); } uint16_t sc_mtch_sched_info_br_r14_s::drx_inactivity_timer_scptm_r14_opts::to_number() const { - static constexpr uint16_t options[] = {0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384}; - return convert_enum_idx(options, 16, value, "sc_mtch_sched_info_br_r14_s::drx_inactivity_timer_scptm_r14_e_"); + static const uint16_t options[] = {0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384}; + return map_enum_number(options, 16, value, "sc_mtch_sched_info_br_r14_s::drx_inactivity_timer_scptm_r14_e_"); } std::string sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sf10", - "sf20", - "sf32", - "sf40", - "sf64", - "sf80", - "sf128", - "sf160", - "sf256", - "sf320", - "sf512", - "sf640", - "sf1024", - "sf2048", - "sf4096", - "sf8192"}; + static const char* options[] = {"sf10", + "sf20", + "sf32", + "sf40", + "sf64", + "sf80", + "sf128", + "sf160", + "sf256", + "sf320", + "sf512", + "sf640", + "sf1024", + "sf2048", + "sf4096", + "sf8192"}; return convert_enum_idx( options, 16, value, "sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::types"); } uint16_t sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 2048, 4096, 8192}; - return convert_enum_idx( + static const uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 2048, 4096, 8192}; + return map_enum_number( options, 16, value, "sc_mtch_sched_info_br_r14_s::sched_period_start_offset_scptm_r14_c_::types"); } std::string sc_mtch_sched_info_r13_s::on_dur_timer_scptm_r13_opts::to_string() const { - static constexpr const char* options[] = {"psf1", - "psf2", - "psf3", - "psf4", - "psf5", - "psf6", - "psf8", - "psf10", - "psf20", - "psf30", - "psf40", - "psf50", - "psf60", - "psf80", - "psf100", - "psf200"}; + static const char* options[] = {"psf1", + "psf2", + "psf3", + "psf4", + "psf5", + "psf6", + "psf8", + "psf10", + "psf20", + "psf30", + "psf40", + "psf50", + "psf60", + "psf80", + "psf100", + "psf200"}; return convert_enum_idx(options, 16, value, "sc_mtch_sched_info_r13_s::on_dur_timer_scptm_r13_e_"); } uint8_t sc_mtch_sched_info_r13_s::on_dur_timer_scptm_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, 60, 80, 100, 200}; - return convert_enum_idx(options, 16, value, "sc_mtch_sched_info_r13_s::on_dur_timer_scptm_r13_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, 60, 80, 100, 200}; + return map_enum_number(options, 16, value, "sc_mtch_sched_info_r13_s::on_dur_timer_scptm_r13_e_"); } std::string sc_mtch_sched_info_r13_s::drx_inactivity_timer_scptm_r13_opts::to_string() const { - static constexpr const char* options[] = {"psf0", - "psf1", - "psf2", - "psf4", - "psf8", - "psf10", - "psf20", - "psf40", - "psf80", - "psf160", - "ps320", - "psf640", - "psf960", - "psf1280", - "psf1920", - "psf2560"}; + static const char* options[] = {"psf0", + "psf1", + "psf2", + "psf4", + "psf8", + "psf10", + "psf20", + "psf40", + "psf80", + "psf160", + "ps320", + "psf640", + "psf960", + "psf1280", + "psf1920", + "psf2560"}; return convert_enum_idx(options, 16, value, "sc_mtch_sched_info_r13_s::drx_inactivity_timer_scptm_r13_e_"); } uint16_t sc_mtch_sched_info_r13_s::drx_inactivity_timer_scptm_r13_opts::to_number() const { - static constexpr uint16_t options[] = {0, 1, 2, 4, 8, 10, 20, 40, 80, 160, 320, 640, 960, 1280, 1920, 2560}; - return convert_enum_idx(options, 16, value, "sc_mtch_sched_info_r13_s::drx_inactivity_timer_scptm_r13_e_"); + static const uint16_t options[] = {0, 1, 2, 4, 8, 10, 20, 40, 80, 160, 320, 640, 960, 1280, 1920, 2560}; + return map_enum_number(options, 16, value, "sc_mtch_sched_info_r13_s::drx_inactivity_timer_scptm_r13_e_"); } std::string sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sf10", - "sf20", - "sf32", - "sf40", - "sf64", - "sf80", - "sf128", - "sf160", - "sf256", - "sf320", - "sf512", - "sf640", - "sf1024", - "sf2048", - "sf4096", - "sf8192"}; + static const char* options[] = {"sf10", + "sf20", + "sf32", + "sf40", + "sf64", + "sf80", + "sf128", + "sf160", + "sf256", + "sf320", + "sf512", + "sf640", + "sf1024", + "sf2048", + "sf4096", + "sf8192"}; return convert_enum_idx( options, 16, value, "sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::types"); } uint16_t sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 2048, 4096, 8192}; - return convert_enum_idx( - options, 16, value, "sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::types"); + static const uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 2048, 4096, 8192}; + return map_enum_number(options, 16, value, "sc_mtch_sched_info_r13_s::sched_period_start_offset_scptm_r13_c_::types"); } std::string sc_mtch_info_br_r14_s::mpdcch_num_repeat_sc_mtch_r14_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "r128", "r256"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "r128", "r256"}; return convert_enum_idx(options, 9, value, "sc_mtch_info_br_r14_s::mpdcch_num_repeat_sc_mtch_r14_e_"); } uint16_t sc_mtch_info_br_r14_s::mpdcch_num_repeat_sc_mtch_r14_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; - return convert_enum_idx(options, 9, value, "sc_mtch_info_br_r14_s::mpdcch_num_repeat_sc_mtch_r14_e_"); + static const uint16_t options[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return map_enum_number(options, 9, value, "sc_mtch_info_br_r14_s::mpdcch_num_repeat_sc_mtch_r14_e_"); } std::string sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_opts::to_string() const { - static constexpr const char* options[] = {"v1", "v1dot5", "v2", "v2dot5", "v4", "v5", "v8", "v10"}; + static const char* options[] = {"v1", "v1dot5", "v2", "v2dot5", "v4", "v5", "v8", "v10"}; return convert_enum_idx(options, 8, value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_e_"); } float sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_opts::to_number() const { - static constexpr float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; - return convert_enum_idx(options, 8, value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_e_"); + static const float options[] = {1.0, 1.5, 2.0, 2.5, 4.0, 5.0, 8.0, 10.0}; + return map_enum_number(options, 8, value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_e_"); } std::string sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"1", "1.5", "2", "2.5", "4", "5", "8", "10"}; + static const char* options[] = {"1", "1.5", "2", "2.5", "4", "5", "8", "10"}; return convert_enum_idx(options, 8, value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::fdd_r14_e_"); } std::string sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::tdd_r14_opts::to_string() const { - static constexpr const char* options[] = {"v1", "v2", "v4", "v5", "v8", "v10", "v20"}; + static const char* options[] = {"v1", "v2", "v4", "v5", "v8", "v10", "v20"}; return convert_enum_idx(options, 7, value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::tdd_r14_e_"); } uint8_t sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::tdd_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; - return convert_enum_idx(options, 7, value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::tdd_r14_e_"); + static const uint8_t options[] = {1, 2, 4, 5, 8, 10, 20}; + return map_enum_number(options, 7, value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::tdd_r14_e_"); } std::string sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fdd-r14", "tdd-r14"}; + static const char* options[] = {"fdd-r14", "tdd-r14"}; return convert_enum_idx(options, 2, value, "sc_mtch_info_br_r14_s::mpdcch_start_sf_sc_mtch_r14_c_::types"); } std::string sc_mtch_info_br_r14_s::mpdcch_pdsch_hop_cfg_sc_mtch_r14_opts::to_string() const { - static constexpr const char* options[] = {"on", "off"}; + static const char* options[] = {"on", "off"}; return convert_enum_idx(options, 2, value, "sc_mtch_info_br_r14_s::mpdcch_pdsch_hop_cfg_sc_mtch_r14_e_"); } std::string sc_mtch_info_br_r14_s::mpdcch_pdsch_cemode_cfg_sc_mtch_r14_opts::to_string() const { - static constexpr const char* options[] = {"ce-ModeA", "ce-ModeB"}; + static const char* options[] = {"ce-ModeA", "ce-ModeB"}; return convert_enum_idx(options, 2, value, "sc_mtch_info_br_r14_s::mpdcch_pdsch_cemode_cfg_sc_mtch_r14_e_"); } std::string sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_opts::to_string() const { - static constexpr const char* options[] = {"bw1dot4", "bw5"}; + static const char* options[] = {"bw1dot4", "bw5"}; return convert_enum_idx(options, 2, value, "sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_e_"); } float sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_opts::to_number() const { - static constexpr float options[] = {1.4, 5.0}; - return convert_enum_idx(options, 2, value, "sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_e_"); + static const float options[] = {1.4, 5.0}; + return map_enum_number(options, 2, value, "sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_e_"); } std::string sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"1.4", "5"}; + static const char* options[] = {"1.4", "5"}; return convert_enum_idx(options, 2, value, "sc_mtch_info_br_r14_s::mpdcch_pdsch_max_bw_sc_mtch_r14_e_"); } std::string sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "zero", "oneEighth", "oneQuarter", "threeEighth", "oneHalf", "fiveEighth", "threeQuarter", "sevenEighth"}; return convert_enum_idx(options, 8, value, "sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_e_"); } float sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_opts::to_number() const { - static constexpr float options[] = {0.0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875}; - return convert_enum_idx(options, 8, value, "sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_e_"); + static const float options[] = {0.0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875}; + return map_enum_number(options, 8, value, "sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_e_"); } std::string sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"0", "1/8", "1/4", "3/8", "1/2", "5/8", "3/4", "7/8"}; + static const char* options[] = {"0", "1/8", "1/4", "3/8", "1/2", "5/8", "3/4", "7/8"}; return convert_enum_idx(options, 8, value, "sc_mtch_info_br_r14_s::mpdcch_offset_sc_mtch_r14_e_"); } std::string sc_mtch_info_br_r14_s::p_a_r14_opts::to_string() const { - static constexpr const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; + static const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; return convert_enum_idx(options, 8, value, "sc_mtch_info_br_r14_s::p_a_r14_e_"); } float sc_mtch_info_br_r14_s::p_a_r14_opts::to_number() const { - static constexpr float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; - return convert_enum_idx(options, 8, value, "sc_mtch_info_br_r14_s::p_a_r14_e_"); + static const float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return map_enum_number(options, 8, value, "sc_mtch_info_br_r14_s::p_a_r14_e_"); } std::string sc_mtch_info_br_r14_s::p_a_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; + static const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; return convert_enum_idx(options, 8, value, "sc_mtch_info_br_r14_s::p_a_r14_e_"); } std::string sc_mtch_info_r13_s::p_a_r13_opts::to_string() const { - static constexpr const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; + static const char* options[] = {"dB-6", "dB-4dot77", "dB-3", "dB-1dot77", "dB0", "dB1", "dB2", "dB3"}; return convert_enum_idx(options, 8, value, "sc_mtch_info_r13_s::p_a_r13_e_"); } float sc_mtch_info_r13_s::p_a_r13_opts::to_number() const { - static constexpr float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; - return convert_enum_idx(options, 8, value, "sc_mtch_info_r13_s::p_a_r13_e_"); + static const float options[] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; + return map_enum_number(options, 8, value, "sc_mtch_info_r13_s::p_a_r13_e_"); } std::string sc_mtch_info_r13_s::p_a_r13_opts::to_number_string() const { - static constexpr const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; + static const char* options[] = {"-6", "-4.77", "-3", "-1.77", "0", "1", "2", "3"}; return convert_enum_idx(options, 8, value, "sc_mtch_info_r13_s::p_a_r13_e_"); } std::string sc_mcch_msg_type_r13_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"scptmConfiguration-r13"}; + static const char* options[] = {"scptmConfiguration-r13"}; return convert_enum_idx(options, 1, value, "sc_mcch_msg_type_r13_c::c1_c_::types"); } std::string sc_mcch_msg_type_r13_c::msg_class_ext_c_::c2_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"scptmConfiguration-BR-r14", "spare"}; + static const char* options[] = {"scptmConfiguration-BR-r14", "spare"}; return convert_enum_idx(options, 2, value, "sc_mcch_msg_type_r13_c::msg_class_ext_c_::c2_c_::types"); } std::string sc_mcch_msg_type_r13_c::msg_class_ext_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c2", "messageClassExtensionFuture-r14"}; + static const char* options[] = {"c2", "messageClassExtensionFuture-r14"}; return convert_enum_idx(options, 2, value, "sc_mcch_msg_type_r13_c::msg_class_ext_c_::types"); } uint8_t sc_mcch_msg_type_r13_c::msg_class_ext_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx(options, 1, value, "sc_mcch_msg_type_r13_c::msg_class_ext_c_::types"); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "sc_mcch_msg_type_r13_c::msg_class_ext_c_::types"); } std::string sc_mcch_msg_type_r13_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "sc_mcch_msg_type_r13_c::types"); } uint8_t sc_mcch_msg_type_r13_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "sc_mcch_msg_type_r13_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "sc_mcch_msg_type_r13_c::types"); } // EstablishmentCause ::= ENUMERATED std::string establishment_cause_opts::to_string() const { - static constexpr const char* options[] = {"emergency", - "highPriorityAccess", - "mt-Access", - "mo-Signalling", - "mo-Data", - "delayTolerantAccess-v1020", - "mo-VoiceCall-v1280", - "spare1"}; + static const char* options[] = {"emergency", + "highPriorityAccess", + "mt-Access", + "mo-Signalling", + "mo-Data", + "delayTolerantAccess-v1020", + "mo-VoiceCall-v1280", + "spare1"}; return convert_enum_idx(options, 8, value, "establishment_cause_e"); } std::string init_ue_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"s-TMSI", "randomValue"}; + static const char* options[] = {"s-TMSI", "randomValue"}; return convert_enum_idx(options, 2, value, "init_ue_id_c::types"); } // ReestablishmentCause ::= ENUMERATED std::string reest_cause_opts::to_string() const { - static constexpr const char* options[] = {"reconfigurationFailure", "handoverFailure", "otherFailure", "spare1"}; + static const char* options[] = {"reconfigurationFailure", "handoverFailure", "otherFailure", "spare1"}; return convert_enum_idx(options, 4, value, "reest_cause_e"); } // ResumeCause ::= ENUMERATED std::string resume_cause_opts::to_string() const { - static constexpr const char* options[] = {"emergency", - "highPriorityAccess", - "mt-Access", - "mo-Signalling", - "mo-Data", - "delayTolerantAccess-v1020", - "mo-VoiceCall-v1280", - "spare1"}; + static const char* options[] = {"emergency", + "highPriorityAccess", + "mt-Access", + "mo-Signalling", + "mo-Data", + "delayTolerantAccess-v1020", + "mo-VoiceCall-v1280", + "spare1"}; return convert_enum_idx(options, 8, value, "resume_cause_e"); } // ResumeCause-r15 ::= ENUMERATED std::string resume_cause_r15_opts::to_string() const { - static constexpr const char* options[] = {"emergency", - "highPriorityAccess", - "mt-Access", - "mo-Signalling", - "mo-Data", - "rna-Update", - "mo-VoiceCall", - "spare1"}; + static const char* options[] = {"emergency", + "highPriorityAccess", + "mt-Access", + "mo-Signalling", + "mo-Data", + "rna-Update", + "mo-VoiceCall", + "spare1"}; return convert_enum_idx(options, 8, value, "resume_cause_r15_e"); } std::string rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fullI-RNTI-r15", "shortI-RNTI-r15"}; + static const char* options[] = {"fullI-RNTI-r15", "shortI-RNTI-r15"}; return convert_enum_idx(options, 2, value, "rrc_conn_resume_request_minus5_gc_r15_ies_s::resume_id_r15_c_::types"); } std::string rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"resumeID-r13", "truncatedResumeID-r13"}; + static const char* options[] = {"resumeID-r13", "truncatedResumeID-r13"}; return convert_enum_idx(options, 2, value, "rrc_conn_resume_request_r13_ies_s::resume_id_r13_c_::types"); } std::string rrc_early_data_request_r15_ies_s::establishment_cause_r15_opts::to_string() const { - static constexpr const char* options[] = {"mo-Data-r15", "delayTolerantAccess-r15"}; + static const char* options[] = {"mo-Data-r15", "delayTolerantAccess-r15"}; return convert_enum_idx(options, 2, value, "rrc_early_data_request_r15_ies_s::establishment_cause_r15_e_"); } std::string rrc_conn_reest_request_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionReestablishmentRequest-r8", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcConnectionReestablishmentRequest-r8", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_conn_reest_request_s::crit_exts_c_::types"); } std::string rrc_conn_request_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionRequest-r8", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcConnectionRequest-r8", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_conn_request_s::crit_exts_c_::types"); } std::string rrc_conn_resume_request_r13_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionResumeRequest-r13", "rrcConnectionResumeRequest-r15"}; + static const char* options[] = {"rrcConnectionResumeRequest-r13", "rrcConnectionResumeRequest-r15"}; return convert_enum_idx(options, 2, value, "rrc_conn_resume_request_r13_s::crit_exts_c_::types"); } std::string rrc_early_data_request_r15_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcEarlyDataRequest-r15", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcEarlyDataRequest-r15", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_early_data_request_r15_s::crit_exts_c_::types"); } std::string ul_ccch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionReestablishmentRequest", "rrcConnectionRequest"}; + static const char* options[] = {"rrcConnectionReestablishmentRequest", "rrcConnectionRequest"}; return convert_enum_idx(options, 2, value, "ul_ccch_msg_type_c::c1_c_::types"); } std::string ul_ccch_msg_type_c::msg_class_ext_c_::c2_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionResumeRequest-r13"}; + static const char* options[] = {"rrcConnectionResumeRequest-r13"}; return convert_enum_idx(options, 1, value, "ul_ccch_msg_type_c::msg_class_ext_c_::c2_c_::types"); } std::string ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::c3_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcEarlyDataRequest-r15", "spare3", "spare2", "spare1"}; + static const char* options[] = {"rrcEarlyDataRequest-r15", "spare3", "spare2", "spare1"}; return convert_enum_idx( options, 4, value, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::c3_c_::types"); } std::string ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c3", "messageClassExtensionFuture-r15"}; + static const char* options[] = {"c3", "messageClassExtensionFuture-r15"}; return convert_enum_idx( options, 2, value, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::types"); } uint8_t ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {3}; - return convert_enum_idx( - options, 1, value, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::types"); + static const uint8_t options[] = {3}; + return map_enum_number(options, 1, value, "ul_ccch_msg_type_c::msg_class_ext_c_::msg_class_ext_future_r13_c_::types"); } std::string ul_ccch_msg_type_c::msg_class_ext_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c2", "messageClassExtensionFuture-r13"}; + static const char* options[] = {"c2", "messageClassExtensionFuture-r13"}; return convert_enum_idx(options, 2, value, "ul_ccch_msg_type_c::msg_class_ext_c_::types"); } uint8_t ul_ccch_msg_type_c::msg_class_ext_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx(options, 1, value, "ul_ccch_msg_type_c::msg_class_ext_c_::types"); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "ul_ccch_msg_type_c::msg_class_ext_c_::types"); } std::string ul_ccch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "ul_ccch_msg_type_c::types"); } uint8_t ul_ccch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ul_ccch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ul_ccch_msg_type_c::types"); } std::string cell_global_id_cdma2000_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellGlobalId1XRTT", "cellGlobalIdHRPD"}; + static const char* options[] = {"cellGlobalId1XRTT", "cellGlobalIdHRPD"}; return convert_enum_idx(options, 2, value, "cell_global_id_cdma2000_c::types"); } uint8_t cell_global_id_cdma2000_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "cell_global_id_cdma2000_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "cell_global_id_cdma2000_c::types"); } std::string meas_result_utra_s::pci_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fdd", "tdd"}; + static const char* options[] = {"fdd", "tdd"}; return convert_enum_idx(options, 2, value, "meas_result_utra_s::pci_c_::types"); } std::string s_nssai_r15_c::types_opts::to_string() const { - static constexpr const char* options[] = {"sst", "sst-SD"}; + static const char* options[] = {"sst", "sst-SD"}; return convert_enum_idx(options, 2, value, "s_nssai_r15_c::types"); } std::string location_info_r10_s::location_coordinates_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ellipsoid-Point-r10", - "ellipsoidPointWithAltitude-r10", - "ellipsoidPointWithUncertaintyCircle-r11", - "ellipsoidPointWithUncertaintyEllipse-r11", - "ellipsoidPointWithAltitudeAndUncertaintyEllipsoid-r11", - "ellipsoidArc-r11", - "polygon-r11"}; + static const char* options[] = {"ellipsoid-Point-r10", + "ellipsoidPointWithAltitude-r10", + "ellipsoidPointWithUncertaintyCircle-r11", + "ellipsoidPointWithUncertaintyEllipse-r11", + "ellipsoidPointWithAltitudeAndUncertaintyEllipsoid-r11", + "ellipsoidArc-r11", + "polygon-r11"}; return convert_enum_idx(options, 7, value, "location_info_r10_s::location_coordinates_r10_c_::types"); } std::string location_info_r10_s::vertical_velocity_info_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"verticalVelocity-r15", "verticalVelocityAndUncertainty-r15"}; + static const char* options[] = {"verticalVelocity-r15", "verticalVelocityAndUncertainty-r15"}; return convert_enum_idx(options, 2, value, "location_info_r10_s::vertical_velocity_info_r15_c_::types"); } std::string rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ng-5G-S-TMSI-r15", "ng-5G-S-TMSI-Part2-r15"}; + static const char* options[] = {"ng-5G-S-TMSI-r15", "ng-5G-S-TMSI-Part2-r15"}; return convert_enum_idx( options, 2, value, "rrc_conn_setup_complete_v1530_ies_s::ng_minus5_g_s_tmsi_bits_r15_c_::types"); } std::string wlan_rtt_r15_s::rtt_units_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "microseconds", "hundredsofnanoseconds", "tensofnanoseconds", "nanoseconds", "tenthsofnanoseconds"}; return convert_enum_idx(options, 5, value, "wlan_rtt_r15_s::rtt_units_r15_e_"); } std::string meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"measResultIdleListEUTRA-r15"}; + static const char* options[] = {"measResultIdleListEUTRA-r15"}; return convert_enum_idx(options, 1, value, "meas_result_idle_r15_s::meas_result_neigh_cells_r15_c_::types"); } std::string per_cc_gap_ind_r14_s::gap_ind_r14_opts::to_string() const { - static constexpr const char* options[] = {"gap", "ncsg", "nogap-noNcsg"}; + static const char* options[] = {"gap", "ncsg", "nogap-noNcsg"}; return convert_enum_idx(options, 3, value, "per_cc_gap_ind_r14_s::gap_ind_r14_e_"); } std::string visited_cell_info_r12_s::visited_cell_id_r12_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"cellGlobalId-r12", "pci-arfcn-r12"}; + static const char* options[] = {"cellGlobalId-r12", "pci-arfcn-r12"}; return convert_enum_idx(options, 2, value, "visited_cell_info_r12_s::visited_cell_id_r12_c_::types"); } std::string affected_carrier_freq_comb_info_mrdc_r15_s::interference_direction_mrdc_r15_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "eutra-nr", "nr", "other", "eutra-nr-other", "nr-other", "spare3", "spare2", "spare1"}; return convert_enum_idx( options, 8, value, "affected_carrier_freq_comb_info_mrdc_r15_s::interference_direction_mrdc_r15_e_"); @@ -9031,255 +8963,254 @@ std::string affected_carrier_freq_comb_info_mrdc_r15_s::interference_direction_m std::string rrc_conn_setup_complete_v1250_ies_s::mob_state_r12_opts::to_string() const { - static constexpr const char* options[] = {"normal", "medium", "high", "spare"}; + static const char* options[] = {"normal", "medium", "high", "spare"}; return convert_enum_idx(options, 4, value, "rrc_conn_setup_complete_v1250_ies_s::mob_state_r12_e_"); } std::string idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"subframeConfig0-r11", "subframeConfig1-5-r11", "subframeConfig6-r11"}; + static const char* options[] = {"subframeConfig0-r11", "subframeConfig1-5-r11", "subframeConfig6-r11"}; return convert_enum_idx(options, 3, value, "idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types"); } uint8_t idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 6}; - return convert_enum_idx(options, 3, value, "idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types"); + static const uint8_t options[] = {0, 1, 6}; + return map_enum_number(options, 3, value, "idc_sf_pattern_r11_c::sf_pattern_tdd_r11_c_::types"); } std::string idc_sf_pattern_r11_c::types_opts::to_string() const { - static constexpr const char* options[] = {"subframePatternFDD-r11", "subframePatternTDD-r11"}; + static const char* options[] = {"subframePatternFDD-r11", "subframePatternTDD-r11"}; return convert_enum_idx(options, 2, value, "idc_sf_pattern_r11_c::types"); } std::string sl_disc_sys_info_report_r13_s::cell_resel_info_r13_s_::q_hyst_r13_opts::to_string() const { - static constexpr const char* options[] = {"dB0", - "dB1", - "dB2", - "dB3", - "dB4", - "dB5", - "dB6", - "dB8", - "dB10", - "dB12", - "dB14", - "dB16", - "dB18", - "dB20", - "dB22", - "dB24"}; + static const char* options[] = {"dB0", + "dB1", + "dB2", + "dB3", + "dB4", + "dB5", + "dB6", + "dB8", + "dB10", + "dB12", + "dB14", + "dB16", + "dB18", + "dB20", + "dB22", + "dB24"}; return convert_enum_idx(options, 16, value, "sl_disc_sys_info_report_r13_s::cell_resel_info_r13_s_::q_hyst_r13_e_"); } uint8_t sl_disc_sys_info_report_r13_s::cell_resel_info_r13_s_::q_hyst_r13_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; - return convert_enum_idx(options, 16, value, "sl_disc_sys_info_report_r13_s::cell_resel_info_r13_s_::q_hyst_r13_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return map_enum_number(options, 16, value, "sl_disc_sys_info_report_r13_s::cell_resel_info_r13_s_::q_hyst_r13_e_"); } std::string sl_disc_sys_info_report_r13_s::freq_info_r13_s_::ul_bw_r13_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx(options, 6, value, "sl_disc_sys_info_report_r13_s::freq_info_r13_s_::ul_bw_r13_e_"); } uint8_t sl_disc_sys_info_report_r13_s::freq_info_r13_s_::ul_bw_r13_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "sl_disc_sys_info_report_r13_s::freq_info_r13_s_::ul_bw_r13_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "sl_disc_sys_info_report_r13_s::freq_info_r13_s_::ul_bw_r13_e_"); } std::string traffic_pattern_info_r14_s::traffic_periodicity_r14_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "sf20", "sf50", "sf100", "sf200", "sf300", "sf400", "sf500", "sf600", "sf700", "sf800", "sf900", "sf1000"}; return convert_enum_idx(options, 12, value, "traffic_pattern_info_r14_s::traffic_periodicity_r14_e_"); } uint16_t traffic_pattern_info_r14_s::traffic_periodicity_r14_opts::to_number() const { - static constexpr uint16_t options[] = {20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; - return convert_enum_idx(options, 12, value, "traffic_pattern_info_r14_s::traffic_periodicity_r14_e_"); + static const uint16_t options[] = {20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; + return map_enum_number(options, 12, value, "traffic_pattern_info_r14_s::traffic_periodicity_r14_e_"); } std::string ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_r15_opts::to_string() const { - static constexpr const char* options[] = {"ms40", "ms240", "ms1000", "ms2000"}; + static const char* options[] = {"ms40", "ms240", "ms1000", "ms2000"}; return convert_enum_idx(options, 4, value, "ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_r15_e_"); } uint16_t ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_r15_opts::to_number() const { - static constexpr uint16_t options[] = {40, 240, 1000, 2000}; - return convert_enum_idx(options, 4, value, "ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_r15_e_"); + static const uint16_t options[] = {40, 240, 1000, 2000}; + return map_enum_number(options, 4, value, "ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_r15_e_"); } std::string ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_tdd_r15_opts::to_string() const { - static constexpr const char* options[] = {"ms40", "ms240", "ms1000", "ms2000"}; + static const char* options[] = {"ms40", "ms240", "ms1000", "ms2000"}; return convert_enum_idx(options, 4, value, "ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_tdd_r15_e_"); } uint16_t ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_tdd_r15_opts::to_number() const { - static constexpr uint16_t options[] = {40, 240, 1000, 2000}; - return convert_enum_idx(options, 4, value, "ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_tdd_r15_e_"); + static const uint16_t options[] = {40, 240, 1000, 2000}; + return map_enum_number(options, 4, value, "ue_radio_paging_info_r12_s::wake_up_signal_min_gap_e_drx_tdd_r15_e_"); } std::string ul_pdcp_delay_result_r13_s::qci_id_r13_opts::to_string() const { - static constexpr const char* options[] = {"qci1", "qci2", "qci3", "qci4", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"qci1", "qci2", "qci3", "qci4", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ul_pdcp_delay_result_r13_s::qci_id_r13_e_"); } uint8_t ul_pdcp_delay_result_r13_s::qci_id_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4}; - return convert_enum_idx(options, 4, value, "ul_pdcp_delay_result_r13_s::qci_id_r13_e_"); + static const uint8_t options[] = {1, 2, 3, 4}; + return map_enum_number(options, 4, value, "ul_pdcp_delay_result_r13_s::qci_id_r13_e_"); } std::string affected_carrier_freq_r11_s::interference_direction_r11_opts::to_string() const { - static constexpr const char* options[] = {"eutra", "other", "both", "spare"}; + static const char* options[] = {"eutra", "other", "both", "spare"}; return convert_enum_idx(options, 4, value, "affected_carrier_freq_r11_s::interference_direction_r11_e_"); } std::string bw_pref_r14_s::dl_pref_r14_opts::to_string() const { - static constexpr const char* options[] = {"mhz1dot4", "mhz5", "mhz20"}; + static const char* options[] = {"mhz1dot4", "mhz5", "mhz20"}; return convert_enum_idx(options, 3, value, "bw_pref_r14_s::dl_pref_r14_e_"); } float bw_pref_r14_s::dl_pref_r14_opts::to_number() const { - static constexpr float options[] = {1.4, 5.0, 20.0}; - return convert_enum_idx(options, 3, value, "bw_pref_r14_s::dl_pref_r14_e_"); + static const float options[] = {1.4, 5.0, 20.0}; + return map_enum_number(options, 3, value, "bw_pref_r14_s::dl_pref_r14_e_"); } std::string bw_pref_r14_s::dl_pref_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"1.4", "5", "20"}; + static const char* options[] = {"1.4", "5", "20"}; return convert_enum_idx(options, 3, value, "bw_pref_r14_s::dl_pref_r14_e_"); } std::string bw_pref_r14_s::ul_pref_r14_opts::to_string() const { - static constexpr const char* options[] = {"mhz1dot4", "mhz5"}; + static const char* options[] = {"mhz1dot4", "mhz5"}; return convert_enum_idx(options, 2, value, "bw_pref_r14_s::ul_pref_r14_e_"); } float bw_pref_r14_s::ul_pref_r14_opts::to_number() const { - static constexpr float options[] = {1.4, 5.0}; - return convert_enum_idx(options, 2, value, "bw_pref_r14_s::ul_pref_r14_e_"); + static const float options[] = {1.4, 5.0}; + return map_enum_number(options, 2, value, "bw_pref_r14_s::ul_pref_r14_e_"); } std::string bw_pref_r14_s::ul_pref_r14_opts::to_number_string() const { - static constexpr const char* options[] = {"1.4", "5"}; + static const char* options[] = {"1.4", "5"}; return convert_enum_idx(options, 2, value, "bw_pref_r14_s::ul_pref_r14_e_"); } std::string delay_budget_report_r14_c::type1_opts::to_string() const { - static constexpr const char* options[] = {"msMinus1280", - "msMinus640", - "msMinus320", - "msMinus160", - "msMinus80", - "msMinus60", - "msMinus40", - "msMinus20", - "ms0", - "ms20", - "ms40", - "ms60", - "ms80", - "ms160", - "ms320", - "ms640", - "ms1280"}; + static const char* options[] = {"msMinus1280", + "msMinus640", + "msMinus320", + "msMinus160", + "msMinus80", + "msMinus60", + "msMinus40", + "msMinus20", + "ms0", + "ms20", + "ms40", + "ms60", + "ms80", + "ms160", + "ms320", + "ms640", + "ms1280"}; return convert_enum_idx(options, 17, value, "delay_budget_report_r14_c::type1_e_"); } int16_t delay_budget_report_r14_c::type1_opts::to_number() const { - static constexpr int16_t options[] = { + static const int16_t options[] = { -1280, -640, -320, -160, -80, -60, -40, -20, 0, 20, 40, 60, 80, 160, 320, 640, 1280}; - return convert_enum_idx(options, 17, value, "delay_budget_report_r14_c::type1_e_"); + return map_enum_number(options, 17, value, "delay_budget_report_r14_c::type1_e_"); } std::string delay_budget_report_r14_c::type2_opts::to_string() const { - static constexpr const char* options[] = {"msMinus192", - "msMinus168", - "msMinus144", - "msMinus120", - "msMinus96", - "msMinus72", - "msMinus48", - "msMinus24", - "ms0", - "ms24", - "ms48", - "ms72", - "ms96", - "ms120", - "ms144", - "ms168", - "ms192"}; + static const char* options[] = {"msMinus192", + "msMinus168", + "msMinus144", + "msMinus120", + "msMinus96", + "msMinus72", + "msMinus48", + "msMinus24", + "ms0", + "ms24", + "ms48", + "ms72", + "ms96", + "ms120", + "ms144", + "ms168", + "ms192"}; return convert_enum_idx(options, 17, value, "delay_budget_report_r14_c::type2_e_"); } int16_t delay_budget_report_r14_c::type2_opts::to_number() const { - static constexpr int16_t options[] = { - -192, -168, -144, -120, -96, -72, -48, -24, 0, 24, 48, 72, 96, 120, 144, 168, 192}; - return convert_enum_idx(options, 17, value, "delay_budget_report_r14_c::type2_e_"); + static const int16_t options[] = {-192, -168, -144, -120, -96, -72, -48, -24, 0, 24, 48, 72, 96, 120, 144, 168, 192}; + return map_enum_number(options, 17, value, "delay_budget_report_r14_c::type2_e_"); } std::string delay_budget_report_r14_c::types_opts::to_string() const { - static constexpr const char* options[] = {"type1", "type2"}; + static const char* options[] = {"type1", "type2"}; return convert_enum_idx(options, 2, value, "delay_budget_report_r14_c::types"); } uint8_t delay_budget_report_r14_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "delay_budget_report_r14_c::types"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "delay_budget_report_r14_c::types"); } std::string rrc_conn_setup_complete_v1020_ies_s::gummei_type_r10_opts::to_string() const { - static constexpr const char* options[] = {"native", "mapped"}; + static const char* options[] = {"native", "mapped"}; return convert_enum_idx(options, 2, value, "rrc_conn_setup_complete_v1020_ies_s::gummei_type_r10_e_"); } std::string rrc_conn_setup_complete_v1020_ies_s::rn_sf_cfg_req_r10_opts::to_string() const { - static constexpr const char* options[] = {"required", "notRequired"}; + static const char* options[] = {"required", "notRequired"}; return convert_enum_idx(options, 2, value, "rrc_conn_setup_complete_v1020_ies_s::rn_sf_cfg_req_r10_e_"); } std::string rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types_opts::to_string() const { - static constexpr const char* options[] = { - "rstd0-r15", "rstd1-r15", "rstd2-r15", "rstd3-r15", "rstd4-r15", "rstd5-r15", "rstd6-r15", - "rstd7-r15", "rstd8-r15", "rstd9-r15", "rstd10-r15", "rstd11-r15", "rstd12-r15", "rstd13-r15", - "rstd14-r15", "rstd15-r15", "rstd16-r15", "rstd17-r15", "rstd18-r15", "rstd19-r15", "rstd20-r15"}; + static const char* options[] = {"rstd0-r15", "rstd1-r15", "rstd2-r15", "rstd3-r15", "rstd4-r15", "rstd5-r15", + "rstd6-r15", "rstd7-r15", "rstd8-r15", "rstd9-r15", "rstd10-r15", "rstd11-r15", + "rstd12-r15", "rstd13-r15", "rstd14-r15", "rstd15-r15", "rstd16-r15", "rstd17-r15", + "rstd18-r15", "rstd19-r15", "rstd20-r15"}; return convert_enum_idx(options, 21, value, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types"); } uint8_t rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; - return convert_enum_idx(options, 21, value, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; + return map_enum_number(options, 21, value, "rstd_inter_freq_info_r10_s::meas_prs_offset_r15_c_::types"); } // WLAN-Status-v1430 ::= ENUMERATED std::string wlan_status_v1430_opts::to_string() const { - static constexpr const char* options[] = {"suspended", "resumed"}; + static const char* options[] = {"suspended", "resumed"}; return convert_enum_idx(options, 2, value, "wlan_status_v1430_e"); } std::string fail_report_scg_nr_r15_s::fail_type_r15_opts::to_string() const { - static constexpr const char* options[] = {"t310-Expiry", - "randomAccessProblem", - "rlc-MaxNumRetx", - "scg-ChangeFailure", - "scg-reconfigFailure", - "srb3-IntegrityFailure"}; + static const char* options[] = {"t310-Expiry", + "randomAccessProblem", + "rlc-MaxNumRetx", + "scg-ChangeFailure", + "scg-reconfigFailure", + "srb3-IntegrityFailure"}; return convert_enum_idx(options, 6, value, "fail_report_scg_nr_r15_s::fail_type_r15_e_"); } uint16_t fail_report_scg_nr_r15_s::fail_type_r15_opts::to_number() const @@ -9297,51 +9228,48 @@ uint16_t fail_report_scg_nr_r15_s::fail_type_r15_opts::to_number() const std::string fail_report_scg_r12_s::fail_type_r12_opts::to_string() const { - static constexpr const char* options[] = { - "t313-Expiry", "randomAccessProblem", "rlc-MaxNumRetx", "scg-ChangeFailure"}; + static const char* options[] = {"t313-Expiry", "randomAccessProblem", "rlc-MaxNumRetx", "scg-ChangeFailure"}; return convert_enum_idx(options, 4, value, "fail_report_scg_r12_s::fail_type_r12_e_"); } uint16_t fail_report_scg_r12_s::fail_type_r12_opts::to_number() const { - static constexpr uint16_t options[] = {313}; - return convert_enum_idx(options, 1, value, "fail_report_scg_r12_s::fail_type_r12_e_"); + static const uint16_t options[] = {313}; + return map_enum_number(options, 1, value, "fail_report_scg_r12_s::fail_type_r12_e_"); } std::string meas_results_s::meas_result_neigh_cells_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"measResultListEUTRA", - "measResultListUTRA", - "measResultListGERAN", - "measResultsCDMA2000", - "measResultNeighCellListNR-r15"}; + static const char* options[] = {"measResultListEUTRA", + "measResultListUTRA", + "measResultListGERAN", + "measResultsCDMA2000", + "measResultNeighCellListNR-r15"}; return convert_enum_idx(options, 5, value, "meas_results_s::meas_result_neigh_cells_c_::types"); } uint16_t meas_results_s::meas_result_neigh_cells_c_::types_opts::to_number() const { - switch (value) { - case meas_results_cdma2000: - return 2000; - default: - invalid_enum_number(value, "meas_results_s::meas_result_neigh_cells_c_::types"); + if (value == meas_results_cdma2000) { + return 2000; } + invalid_enum_number(value, "meas_results_s::meas_result_neigh_cells_c_::types"); return 0; } std::string rlf_report_r9_s::failed_pcell_id_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"cellGlobalId-r10", "pci-arfcn-r10"}; + static const char* options[] = {"cellGlobalId-r10", "pci-arfcn-r10"}; return convert_enum_idx(options, 2, value, "rlf_report_r9_s::failed_pcell_id_r10_c_::types"); } std::string rlf_report_r9_s::conn_fail_type_r10_opts::to_string() const { - static constexpr const char* options[] = {"rlf", "hof"}; + static const char* options[] = {"rlf", "hof"}; return convert_enum_idx(options, 2, value, "rlf_report_r9_s::conn_fail_type_r10_e_"); } std::string rlf_report_r9_s::basic_fields_r11_s_::rlf_cause_r11_opts::to_string() const { - static constexpr const char* options[] = {"t310-Expiry", "randomAccessProblem", "rlc-MaxNumRetx", "t312-Expiry-r12"}; + static const char* options[] = {"t310-Expiry", "randomAccessProblem", "rlc-MaxNumRetx", "t312-Expiry-r12"}; return convert_enum_idx(options, 4, value, "rlf_report_r9_s::basic_fields_r11_s_::rlf_cause_r11_e_"); } uint16_t rlf_report_r9_s::basic_fields_r11_s_::rlf_cause_r11_opts::to_number() const @@ -9359,1061 +9287,1050 @@ uint16_t rlf_report_r9_s::basic_fields_r11_s_::rlf_cause_r11_opts::to_number() c std::string rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fdd-r11", "tdd-r11"}; + static const char* options[] = {"fdd-r11", "tdd-r11"}; return convert_enum_idx(options, 2, value, "rlf_report_r9_s::prev_utra_cell_id_r11_s_::pci_r11_c_::types"); } std::string rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fdd-r11", "tdd-r11"}; + static const char* options[] = {"fdd-r11", "tdd-r11"}; return convert_enum_idx(options, 2, value, "rlf_report_r9_s::sel_utra_cell_id_r11_s_::pci_r11_c_::types"); } std::string sidelink_ue_info_v1310_ies_s::comm_tx_res_info_req_relay_r13_s_::ue_type_r13_opts::to_string() const { - static constexpr const char* options[] = {"relayUE", "remoteUE"}; + static const char* options[] = {"relayUE", "remoteUE"}; return convert_enum_idx( options, 2, value, "sidelink_ue_info_v1310_ies_s::comm_tx_res_info_req_relay_r13_s_::ue_type_r13_e_"); } std::string tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_cycle_len_r11_opts::to_string() const { - static constexpr const char* options[] = {"sf40", "sf64", "sf80", "sf128", "sf160", "sf256", "spare2", "spare1"}; + static const char* options[] = {"sf40", "sf64", "sf80", "sf128", "sf160", "sf256", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_cycle_len_r11_e_"); } uint16_t tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_cycle_len_r11_opts::to_number() const { - static constexpr uint16_t options[] = {40, 64, 80, 128, 160, 256}; - return convert_enum_idx(options, 6, value, "tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_cycle_len_r11_e_"); + static const uint16_t options[] = {40, 64, 80, 128, 160, 256}; + return map_enum_number(options, 6, value, "tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_cycle_len_r11_e_"); } std::string tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_active_time_r11_opts::to_string() const { - static constexpr const char* options[] = {"sf20", "sf30", "sf40", "sf60", "sf80", "sf100", "spare2", "spare1"}; + static const char* options[] = {"sf20", "sf30", "sf40", "sf60", "sf80", "sf100", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_active_time_r11_e_"); } uint8_t tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_active_time_r11_opts::to_number() const { - static constexpr uint8_t options[] = {20, 30, 40, 60, 80, 100}; - return convert_enum_idx(options, 6, value, "tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_active_time_r11_e_"); + static const uint8_t options[] = {20, 30, 40, 60, 80, 100}; + return map_enum_number(options, 6, value, "tdm_assist_info_r11_c::drx_assist_info_r11_s_::drx_active_time_r11_e_"); } std::string tdm_assist_info_r11_c::types_opts::to_string() const { - static constexpr const char* options[] = {"drx-AssistanceInfo-r11", "idc-SubframePatternList-r11"}; + static const char* options[] = {"drx-AssistanceInfo-r11", "idc-SubframePatternList-r11"}; return convert_enum_idx(options, 2, value, "tdm_assist_info_r11_c::types"); } std::string ueassist_info_v1430_ies_s::rlm_report_r14_s_::rlm_event_r14_opts::to_string() const { - static constexpr const char* options[] = {"earlyOutOfSync", "earlyInSync"}; + static const char* options[] = {"earlyOutOfSync", "earlyInSync"}; return convert_enum_idx(options, 2, value, "ueassist_info_v1430_ies_s::rlm_report_r14_s_::rlm_event_r14_e_"); } std::string ueassist_info_v1430_ies_s::rlm_report_r14_s_::excess_rep_mpdcch_r14_opts::to_string() const { - static constexpr const char* options[] = {"excessRep1", "excessRep2"}; + static const char* options[] = {"excessRep1", "excessRep2"}; return convert_enum_idx(options, 2, value, "ueassist_info_v1430_ies_s::rlm_report_r14_s_::excess_rep_mpdcch_r14_e_"); } uint8_t ueassist_info_v1430_ies_s::rlm_report_r14_s_::excess_rep_mpdcch_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "ueassist_info_v1430_ies_s::rlm_report_r14_s_::excess_rep_mpdcch_r14_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "ueassist_info_v1430_ies_s::rlm_report_r14_s_::excess_rep_mpdcch_r14_e_"); } // WLAN-Status-r13 ::= ENUMERATED std::string wlan_status_r13_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "successfulAssociation", "failureWlanRadioLink", "failureWlanUnavailable", "failureTimeout"}; return convert_enum_idx(options, 4, value, "wlan_status_r13_e"); } std::string failed_lc_ch_info_r15_s::failed_lc_ch_id_r15_s_::cell_group_ind_r15_opts::to_string() const { - static constexpr const char* options[] = {"mn", "sn"}; + static const char* options[] = {"mn", "sn"}; return convert_enum_idx(options, 2, value, "failed_lc_ch_info_r15_s::failed_lc_ch_id_r15_s_::cell_group_ind_r15_e_"); } std::string failed_lc_ch_info_r15_s::fail_type_opts::to_string() const { - static constexpr const char* options[] = {"duplication", "spare3", "spare2", "spare1"}; + static const char* options[] = {"duplication", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "failed_lc_ch_info_r15_s::fail_type_e_"); } std::string inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"start", "stop"}; + static const char* options[] = {"start", "stop"}; return convert_enum_idx(options, 2, value, "inter_freq_rstd_meas_ind_r10_ies_s::rstd_inter_freq_ind_r10_c_::types"); } std::string meas_report_app_layer_r15_ies_s::service_type_opts::to_string() const { - static constexpr const char* options[] = { - "qoe", "qoemtsi", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"qoe", "qoemtsi", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "meas_report_app_layer_r15_ies_s::service_type_e_"); } std::string proximity_ind_r9_ies_s::type_r9_opts::to_string() const { - static constexpr const char* options[] = {"entering", "leaving"}; + static const char* options[] = {"entering", "leaving"}; return convert_enum_idx(options, 2, value, "proximity_ind_r9_ies_s::type_r9_e_"); } std::string proximity_ind_r9_ies_s::carrier_freq_r9_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"eutra-r9", "utra-r9", "eutra2-v9e0"}; + static const char* options[] = {"eutra-r9", "utra-r9", "eutra2-v9e0"}; return convert_enum_idx(options, 3, value, "proximity_ind_r9_ies_s::carrier_freq_r9_c_::types"); } uint8_t proximity_ind_r9_ies_s::carrier_freq_r9_c_::types_opts::to_number() const { - switch (value) { - case eutra2_v9e0: - return 2; - default: - invalid_enum_number(value, "proximity_ind_r9_ies_s::carrier_freq_r9_c_::types"); + if (value == eutra2_v9e0) { + return 2; } + invalid_enum_number(value, "proximity_ind_r9_ies_s::carrier_freq_r9_c_::types"); return 0; } std::string rrc_conn_resume_complete_r13_ies_s::mob_state_r13_opts::to_string() const { - static constexpr const char* options[] = {"normal", "medium", "high", "spare"}; + static const char* options[] = {"normal", "medium", "high", "spare"}; return convert_enum_idx(options, 4, value, "rrc_conn_resume_complete_r13_ies_s::mob_state_r13_e_"); } std::string ueassist_info_r11_ies_s::pwr_pref_ind_r11_opts::to_string() const { - static constexpr const char* options[] = {"normal", "lowPowerConsumption"}; + static const char* options[] = {"normal", "lowPowerConsumption"}; return convert_enum_idx(options, 2, value, "ueassist_info_r11_ies_s::pwr_pref_ind_r11_e_"); } std::string ul_info_transfer_r8_ies_s::ded_info_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = { - "dedicatedInfoNAS", "dedicatedInfoCDMA2000-1XRTT", "dedicatedInfoCDMA2000-HRPD"}; + static const char* options[] = {"dedicatedInfoNAS", "dedicatedInfoCDMA2000-1XRTT", "dedicatedInfoCDMA2000-HRPD"}; return convert_enum_idx(options, 3, value, "ul_info_transfer_r8_ies_s::ded_info_type_c_::types"); } std::string csfb_params_request_cdma2000_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"csfbParametersRequestCDMA2000-r8", "criticalExtensionsFuture"}; + static const char* options[] = {"csfbParametersRequestCDMA2000-r8", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "csfb_params_request_cdma2000_s::crit_exts_c_::types"); } uint16_t csfb_params_request_cdma2000_s::crit_exts_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {2000}; - return convert_enum_idx(options, 1, value, "csfb_params_request_cdma2000_s::crit_exts_c_::types"); + static const uint16_t options[] = {2000}; + return map_enum_number(options, 1, value, "csfb_params_request_cdma2000_s::crit_exts_c_::types"); } std::string counter_check_resp_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"counterCheckResponse-r8", "criticalExtensionsFuture"}; + static const char* options[] = {"counterCheckResponse-r8", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "counter_check_resp_s::crit_exts_c_::types"); } std::string in_dev_coex_ind_r11_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"inDeviceCoexIndication-r11", "spare3", "spare2", "spare1"}; + static const char* options[] = {"inDeviceCoexIndication-r11", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "in_dev_coex_ind_r11_s::crit_exts_c_::c1_c_::types"); } std::string inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"interFreqRSTDMeasurementIndication-r10", "spare3", "spare2", "spare1"}; + static const char* options[] = {"interFreqRSTDMeasurementIndication-r10", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "inter_freq_rstd_meas_ind_r10_s::crit_exts_c_::c1_c_::types"); } std::string mbms_count_resp_r10_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"countingResponse-r10", "spare3", "spare2", "spare1"}; + static const char* options[] = {"countingResponse-r10", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "mbms_count_resp_r10_s::crit_exts_c_::c1_c_::types"); } std::string mbms_interest_ind_r11_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"interestIndication-r11", "spare3", "spare2", "spare1"}; + static const char* options[] = {"interestIndication-r11", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "mbms_interest_ind_r11_s::crit_exts_c_::c1_c_::types"); } std::string meas_report_app_layer_r15_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"measReportAppLayer-r15", "criticalExtensionsFuture"}; + static const char* options[] = {"measReportAppLayer-r15", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "meas_report_app_layer_r15_s::crit_exts_c_::types"); } std::string meas_report_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "measurementReport-r8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "meas_report_s::crit_exts_c_::c1_c_::types"); } std::string proximity_ind_r9_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"proximityIndication-r9", "spare3", "spare2", "spare1"}; + static const char* options[] = {"proximityIndication-r9", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "proximity_ind_r9_s::crit_exts_c_::c1_c_::types"); } std::string rn_recfg_complete_r10_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rnReconfigurationComplete-r10", "spare3", "spare2", "spare1"}; + static const char* options[] = {"rnReconfigurationComplete-r10", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "rn_recfg_complete_r10_s::crit_exts_c_::c1_c_::types"); } std::string rrc_conn_recfg_complete_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionReconfigurationComplete-r8", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcConnectionReconfigurationComplete-r8", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_conn_recfg_complete_s::crit_exts_c_::types"); } std::string rrc_conn_reest_complete_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionReestablishmentComplete-r8", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcConnectionReestablishmentComplete-r8", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_conn_reest_complete_s::crit_exts_c_::types"); } std::string rrc_conn_resume_complete_r13_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionResumeComplete-r13", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcConnectionResumeComplete-r13", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_conn_resume_complete_r13_s::crit_exts_c_::types"); } std::string rrc_conn_setup_complete_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcConnectionSetupComplete-r8", "spare3", "spare2", "spare1"}; + static const char* options[] = {"rrcConnectionSetupComplete-r8", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "rrc_conn_setup_complete_s::crit_exts_c_::c1_c_::types"); } std::string scg_fail_info_r12_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"scgFailureInformation-r12", "spare3", "spare2", "spare1"}; + static const char* options[] = {"scgFailureInformation-r12", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "scg_fail_info_r12_s::crit_exts_c_::c1_c_::types"); } std::string scg_fail_info_nr_r15_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"scgFailureInformationNR-r15", "spare3", "spare2", "spare1"}; + static const char* options[] = {"scgFailureInformationNR-r15", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "scg_fail_info_nr_r15_s::crit_exts_c_::c1_c_::types"); } std::string security_mode_complete_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"securityModeComplete-r8", "criticalExtensionsFuture"}; + static const char* options[] = {"securityModeComplete-r8", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "security_mode_complete_s::crit_exts_c_::types"); } std::string security_mode_fail_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"securityModeFailure-r8", "criticalExtensionsFuture"}; + static const char* options[] = {"securityModeFailure-r8", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "security_mode_fail_s::crit_exts_c_::types"); } std::string sidelink_ue_info_r12_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sidelinkUEInformation-r12", "spare3", "spare2", "spare1"}; + static const char* options[] = {"sidelinkUEInformation-r12", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "sidelink_ue_info_r12_s::crit_exts_c_::c1_c_::types"); } std::string ueassist_info_r11_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ueAssistanceInformation-r11", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ueAssistanceInformation-r11", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ueassist_info_r11_s::crit_exts_c_::c1_c_::types"); } std::string ue_cap_info_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ueCapabilityInformation-r8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ue_cap_info_s::crit_exts_c_::c1_c_::types"); } std::string ue_info_resp_r9_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ueInformationResponse-r9", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ueInformationResponse-r9", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ue_info_resp_r9_s::crit_exts_c_::c1_c_::types"); } std::string ul_ho_prep_transfer_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ulHandoverPreparationTransfer-r8", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ulHandoverPreparationTransfer-r8", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ul_ho_prep_transfer_s::crit_exts_c_::c1_c_::types"); } std::string ul_info_transfer_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ulInformationTransfer-r8", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ulInformationTransfer-r8", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ul_info_transfer_s::crit_exts_c_::c1_c_::types"); } std::string ul_info_transfer_mrdc_r15_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ulInformationTransferMRDC-r15", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ulInformationTransferMRDC-r15", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ul_info_transfer_mrdc_r15_s::crit_exts_c_::c1_c_::types"); } std::string wlan_conn_status_report_r13_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"wlanConnectionStatusReport-r13", "spare3", "spare2", "spare1"}; + static const char* options[] = {"wlanConnectionStatusReport-r13", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "wlan_conn_status_report_r13_s::crit_exts_c_::c1_c_::types"); } std::string ul_dcch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"csfbParametersRequestCDMA2000", - "measurementReport", - "rrcConnectionReconfigurationComplete", - "rrcConnectionReestablishmentComplete", - "rrcConnectionSetupComplete", - "securityModeComplete", - "securityModeFailure", - "ueCapabilityInformation", - "ulHandoverPreparationTransfer", - "ulInformationTransfer", - "counterCheckResponse", - "ueInformationResponse-r9", - "proximityIndication-r9", - "rnReconfigurationComplete-r10", - "mbmsCountingResponse-r10", - "interFreqRSTDMeasurementIndication-r10"}; + static const char* options[] = {"csfbParametersRequestCDMA2000", + "measurementReport", + "rrcConnectionReconfigurationComplete", + "rrcConnectionReestablishmentComplete", + "rrcConnectionSetupComplete", + "securityModeComplete", + "securityModeFailure", + "ueCapabilityInformation", + "ulHandoverPreparationTransfer", + "ulInformationTransfer", + "counterCheckResponse", + "ueInformationResponse-r9", + "proximityIndication-r9", + "rnReconfigurationComplete-r10", + "mbmsCountingResponse-r10", + "interFreqRSTDMeasurementIndication-r10"}; return convert_enum_idx(options, 16, value, "ul_dcch_msg_type_c::c1_c_::types"); } uint16_t ul_dcch_msg_type_c::c1_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {2000}; - return convert_enum_idx(options, 1, value, "ul_dcch_msg_type_c::c1_c_::types"); + static const uint16_t options[] = {2000}; + return map_enum_number(options, 1, value, "ul_dcch_msg_type_c::c1_c_::types"); } std::string ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ueAssistanceInformation-r11", - "inDeviceCoexIndication-r11", - "mbmsInterestIndication-r11", - "scgFailureInformation-r12", - "sidelinkUEInformation-r12", - "wlanConnectionStatusReport-r13", - "rrcConnectionResumeComplete-r13", - "ulInformationTransferMRDC-r15", - "scgFailureInformationNR-r15", - "measReportAppLayer-r15", - "failureInformation-r15", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"ueAssistanceInformation-r11", + "inDeviceCoexIndication-r11", + "mbmsInterestIndication-r11", + "scgFailureInformation-r12", + "sidelinkUEInformation-r12", + "wlanConnectionStatusReport-r13", + "rrcConnectionResumeComplete-r13", + "ulInformationTransferMRDC-r15", + "scgFailureInformationNR-r15", + "measReportAppLayer-r15", + "failureInformation-r15", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::types"); } std::string ul_dcch_msg_type_c::msg_class_ext_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c2", "messageClassExtensionFuture-r11"}; + static const char* options[] = {"c2", "messageClassExtensionFuture-r11"}; return convert_enum_idx(options, 2, value, "ul_dcch_msg_type_c::msg_class_ext_c_::types"); } uint8_t ul_dcch_msg_type_c::msg_class_ext_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx(options, 1, value, "ul_dcch_msg_type_c::msg_class_ext_c_::types"); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "ul_dcch_msg_type_c::msg_class_ext_c_::types"); } std::string ul_dcch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "ul_dcch_msg_type_c::types"); } uint8_t ul_dcch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ul_dcch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ul_dcch_msg_type_c::types"); } // MIMO-CapabilityDL-r10 ::= ENUMERATED std::string mimo_cap_dl_r10_opts::to_string() const { - static constexpr const char* options[] = {"twoLayers", "fourLayers", "eightLayers"}; + static const char* options[] = {"twoLayers", "fourLayers", "eightLayers"}; return convert_enum_idx(options, 3, value, "mimo_cap_dl_r10_e"); } uint8_t mimo_cap_dl_r10_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8}; - return convert_enum_idx(options, 3, value, "mimo_cap_dl_r10_e"); + static const uint8_t options[] = {2, 4, 8}; + return map_enum_number(options, 3, value, "mimo_cap_dl_r10_e"); } // MIMO-CapabilityUL-r10 ::= ENUMERATED std::string mimo_cap_ul_r10_opts::to_string() const { - static constexpr const char* options[] = {"twoLayers", "fourLayers"}; + static const char* options[] = {"twoLayers", "fourLayers"}; return convert_enum_idx(options, 2, value, "mimo_cap_ul_r10_e"); } uint8_t mimo_cap_ul_r10_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "mimo_cap_ul_r10_e"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "mimo_cap_ul_r10_e"); } std::string band_params_r11_s::supported_csi_proc_r11_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n3", "n4"}; + static const char* options[] = {"n1", "n3", "n4"}; return convert_enum_idx(options, 3, value, "band_params_r11_s::supported_csi_proc_r11_e_"); } uint8_t band_params_r11_s::supported_csi_proc_r11_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3, 4}; - return convert_enum_idx(options, 3, value, "band_params_r11_s::supported_csi_proc_r11_e_"); + static const uint8_t options[] = {1, 3, 4}; + return map_enum_number(options, 3, value, "band_params_r11_s::supported_csi_proc_r11_e_"); } std::string intra_band_contiguous_cc_info_r12_s::supported_csi_proc_r12_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n3", "n4"}; + static const char* options[] = {"n1", "n3", "n4"}; return convert_enum_idx(options, 3, value, "intra_band_contiguous_cc_info_r12_s::supported_csi_proc_r12_e_"); } uint8_t intra_band_contiguous_cc_info_r12_s::supported_csi_proc_r12_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3, 4}; - return convert_enum_idx(options, 3, value, "intra_band_contiguous_cc_info_r12_s::supported_csi_proc_r12_e_"); + static const uint8_t options[] = {1, 3, 4}; + return map_enum_number(options, 3, value, "intra_band_contiguous_cc_info_r12_s::supported_csi_proc_r12_e_"); } std::string band_params_r13_s::supported_csi_proc_r13_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n3", "n4"}; + static const char* options[] = {"n1", "n3", "n4"}; return convert_enum_idx(options, 3, value, "band_params_r13_s::supported_csi_proc_r13_e_"); } uint8_t band_params_r13_s::supported_csi_proc_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3, 4}; - return convert_enum_idx(options, 3, value, "band_params_r13_s::supported_csi_proc_r13_e_"); + static const uint8_t options[] = {1, 3, 4}; + return map_enum_number(options, 3, value, "band_params_r13_s::supported_csi_proc_r13_e_"); } std::string band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"threeEntries-r13", "fourEntries-r13", "fiveEntries-r13"}; + static const char* options[] = {"threeEntries-r13", "fourEntries-r13", "fiveEntries-r13"}; return convert_enum_idx( options, 3, value, "band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::types"); } uint8_t band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {3, 4, 5}; - return convert_enum_idx( + static const uint8_t options[] = {3, 4, 5}; + return map_enum_number( options, 3, value, "band_combination_params_r13_s::dc_support_r13_s_::supported_cell_grouping_r13_c_::types"); } std::string band_params_v1130_s::supported_csi_proc_r11_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n3", "n4"}; + static const char* options[] = {"n1", "n3", "n4"}; return convert_enum_idx(options, 3, value, "band_params_v1130_s::supported_csi_proc_r11_e_"); } uint8_t band_params_v1130_s::supported_csi_proc_r11_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3, 4}; - return convert_enum_idx(options, 3, value, "band_params_v1130_s::supported_csi_proc_r11_e_"); + static const uint8_t options[] = {1, 3, 4}; + return map_enum_number(options, 3, value, "band_params_v1130_s::supported_csi_proc_r11_e_"); } std::string band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"threeEntries-r12", "fourEntries-r12", "fiveEntries-r12"}; + static const char* options[] = {"threeEntries-r12", "fourEntries-r12", "fiveEntries-r12"}; return convert_enum_idx( options, 3, value, "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types"); } uint8_t band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {3, 4, 5}; - return convert_enum_idx( + static const uint8_t options[] = {3, 4, 5}; + return map_enum_number( options, 3, value, "band_combination_params_v1250_s::dc_support_r12_s_::supported_cell_grouping_r12_c_::types"); } std::string retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_opts::to_string() const { - static constexpr const char* options[] = {"n0", - "n0dot5", - "n1", - "n1dot5", - "n2", - "n2dot5", - "n3", - "n3dot5", - "n4", - "n4dot5", - "n5", - "n5dot5", - "n6", - "n6dot5", - "n7", - "spare1"}; + static const char* options[] = {"n0", + "n0dot5", + "n1", + "n1dot5", + "n2", + "n2dot5", + "n3", + "n3dot5", + "n4", + "n4dot5", + "n5", + "n5dot5", + "n6", + "n6dot5", + "n7", + "spare1"}; return convert_enum_idx(options, 16, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_e_"); } float retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0}; - return convert_enum_idx(options, 15, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_e_"); + static const float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0}; + return map_enum_number(options, 15, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_e_"); } std::string retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_opts::to_number_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "0", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "4.5", "5", "5.5", "6", "6.5", "7"}; return convert_enum_idx(options, 16, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_dl_r14_e_"); } std::string retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_opts::to_string() const { - static constexpr const char* options[] = {"n0", - "n0dot5", - "n1", - "n1dot5", - "n2", - "n2dot5", - "n3", - "n3dot5", - "n4", - "n4dot5", - "n5", - "n5dot5", - "n6", - "n6dot5", - "n7", - "spare1"}; + static const char* options[] = {"n0", + "n0dot5", + "n1", + "n1dot5", + "n2", + "n2dot5", + "n3", + "n3dot5", + "n4", + "n4dot5", + "n5", + "n5dot5", + "n6", + "n6dot5", + "n7", + "spare1"}; return convert_enum_idx(options, 16, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_"); } float retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0}; - return convert_enum_idx(options, 15, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_"); + static const float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0}; + return map_enum_number(options, 15, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_"); } std::string retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_opts::to_number_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "0", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "4.5", "5", "5.5", "6", "6.5", "7"}; return convert_enum_idx(options, 16, value, "retuning_time_info_r14_s::retuning_info_s_::rf_retuning_time_ul_r14_e_"); } std::string mimo_ca_params_per_bo_bc_per_tm_v1470_s::csi_report_advanced_max_ports_r14_opts::to_string() const { - static constexpr const char* options[] = {"n8", "n12", "n16", "n20", "n24", "n28"}; + static const char* options[] = {"n8", "n12", "n16", "n20", "n24", "n28"}; return convert_enum_idx( options, 6, value, "mimo_ca_params_per_bo_bc_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_"); } uint8_t mimo_ca_params_per_bo_bc_per_tm_v1470_s::csi_report_advanced_max_ports_r14_opts::to_number() const { - static constexpr uint8_t options[] = {8, 12, 16, 20, 24, 28}; - return convert_enum_idx( + static const uint8_t options[] = {8, 12, 16, 20, 24, 28}; + return map_enum_number( options, 6, value, "mimo_ca_params_per_bo_bc_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_"); } std::string stti_spt_band_params_r15_s::stti_supported_csi_proc_r15_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n3", "n4"}; + static const char* options[] = {"n1", "n3", "n4"}; return convert_enum_idx(options, 3, value, "stti_spt_band_params_r15_s::stti_supported_csi_proc_r15_e_"); } uint8_t stti_spt_band_params_r15_s::stti_supported_csi_proc_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3, 4}; - return convert_enum_idx(options, 3, value, "stti_spt_band_params_r15_s::stti_supported_csi_proc_r15_e_"); + static const uint8_t options[] = {1, 3, 4}; + return map_enum_number(options, 3, value, "stti_spt_band_params_r15_s::stti_supported_csi_proc_r15_e_"); } // V2X-BandwidthClass-r14 ::= ENUMERATED std::string v2x_bw_class_r14_opts::to_string() const { - static constexpr const char* options[] = {"a", "b", "c", "d", "e", "f", "c1-v1530"}; + static const char* options[] = {"a", "b", "c", "d", "e", "f", "c1-v1530"}; return convert_enum_idx(options, 7, value, "v2x_bw_class_r14_e"); } uint8_t v2x_bw_class_r14_opts::to_number() const { - switch (value) { - case c1_v1530: - return 1; - default: - invalid_enum_number(value, "v2x_bw_class_r14_e"); + if (value == c1_v1530) { + return 1; } + invalid_enum_number(value, "v2x_bw_class_r14_e"); return 0; } std::string feature_set_dl_per_cc_r15_s::supported_csi_proc_r15_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n3", "n4"}; + static const char* options[] = {"n1", "n3", "n4"}; return convert_enum_idx(options, 3, value, "feature_set_dl_per_cc_r15_s::supported_csi_proc_r15_e_"); } uint8_t feature_set_dl_per_cc_r15_s::supported_csi_proc_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3, 4}; - return convert_enum_idx(options, 3, value, "feature_set_dl_per_cc_r15_s::supported_csi_proc_r15_e_"); + static const uint8_t options[] = {1, 3, 4}; + return map_enum_number(options, 3, value, "feature_set_dl_per_cc_r15_s::supported_csi_proc_r15_e_"); } std::string irat_params_cdma2000_minus1_xrtt_s::tx_cfg1_xrtt_opts::to_string() const { - static constexpr const char* options[] = {"single", "dual"}; + static const char* options[] = {"single", "dual"}; return convert_enum_idx(options, 2, value, "irat_params_cdma2000_minus1_xrtt_s::tx_cfg1_xrtt_e_"); } std::string irat_params_cdma2000_minus1_xrtt_s::rx_cfg1_xrtt_opts::to_string() const { - static constexpr const char* options[] = {"single", "dual"}; + static const char* options[] = {"single", "dual"}; return convert_enum_idx(options, 2, value, "irat_params_cdma2000_minus1_xrtt_s::rx_cfg1_xrtt_e_"); } std::string irat_params_cdma2000_hrpd_s::tx_cfg_hrpd_opts::to_string() const { - static constexpr const char* options[] = {"single", "dual"}; + static const char* options[] = {"single", "dual"}; return convert_enum_idx(options, 2, value, "irat_params_cdma2000_hrpd_s::tx_cfg_hrpd_e_"); } std::string irat_params_cdma2000_hrpd_s::rx_cfg_hrpd_opts::to_string() const { - static constexpr const char* options[] = {"single", "dual"}; + static const char* options[] = {"single", "dual"}; return convert_enum_idx(options, 2, value, "irat_params_cdma2000_hrpd_s::rx_cfg_hrpd_e_"); } // SupportedBandGERAN ::= ENUMERATED std::string supported_band_geran_opts::to_string() const { - static constexpr const char* options[] = {"gsm450", - "gsm480", - "gsm710", - "gsm750", - "gsm810", - "gsm850", - "gsm900P", - "gsm900E", - "gsm900R", - "gsm1800", - "gsm1900", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"gsm450", + "gsm480", + "gsm710", + "gsm750", + "gsm810", + "gsm850", + "gsm900P", + "gsm900E", + "gsm900R", + "gsm1800", + "gsm1900", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "supported_band_geran_e"); } // SupportedBandUTRA-FDD ::= ENUMERATED std::string supported_band_utra_fdd_opts::to_string() const { - static constexpr const char* options[] = { - "bandI", "bandII", "bandIII", "bandIV", "bandV", "bandVI", - "bandVII", "bandVIII", "bandIX", "bandX", "bandXI", "bandXII", - "bandXIII", "bandXIV", "bandXV", "bandXVI", "bandXVII-8a0", "bandXVIII-8a0", - "bandXIX-8a0", "bandXX-8a0", "bandXXI-8a0", "bandXXII-8a0", "bandXXIII-8a0", "bandXXIV-8a0", - "bandXXV-8a0", "bandXXVI-8a0", "bandXXVII-8a0", "bandXXVIII-8a0", "bandXXIX-8a0", "bandXXX-8a0", - "bandXXXI-8a0", "bandXXXII-8a0"}; + static const char* options[] = {"bandI", "bandII", "bandIII", "bandIV", "bandV", + "bandVI", "bandVII", "bandVIII", "bandIX", "bandX", + "bandXI", "bandXII", "bandXIII", "bandXIV", "bandXV", + "bandXVI", "bandXVII-8a0", "bandXVIII-8a0", "bandXIX-8a0", "bandXX-8a0", + "bandXXI-8a0", "bandXXII-8a0", "bandXXIII-8a0", "bandXXIV-8a0", "bandXXV-8a0", + "bandXXVI-8a0", "bandXXVII-8a0", "bandXXVIII-8a0", "bandXXIX-8a0", "bandXXX-8a0", + "bandXXXI-8a0", "bandXXXII-8a0"}; return convert_enum_idx(options, 32, value, "supported_band_utra_fdd_e"); } // SupportedBandUTRA-TDD128 ::= ENUMERATED std::string supported_band_utra_tdd128_opts::to_string() const { - static constexpr const char* options[] = { - "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"}; + static const char* options[] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"}; return convert_enum_idx(options, 16, value, "supported_band_utra_tdd128_e"); } // SupportedBandUTRA-TDD384 ::= ENUMERATED std::string supported_band_utra_tdd384_opts::to_string() const { - static constexpr const char* options[] = { - "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"}; + static const char* options[] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"}; return convert_enum_idx(options, 16, value, "supported_band_utra_tdd384_e"); } // SupportedBandUTRA-TDD768 ::= ENUMERATED std::string supported_band_utra_tdd768_opts::to_string() const { - static constexpr const char* options[] = { - "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"}; + static const char* options[] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"}; return convert_enum_idx(options, 16, value, "supported_band_utra_tdd768_e"); } // ProcessingTimelineSet-r15 ::= ENUMERATED std::string processing_timeline_set_r15_opts::to_string() const { - static constexpr const char* options[] = {"set1", "set2"}; + static const char* options[] = {"set1", "set2"}; return convert_enum_idx(options, 2, value, "processing_timeline_set_r15_e"); } uint8_t processing_timeline_set_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "processing_timeline_set_r15_e"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "processing_timeline_set_r15_e"); } std::string mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_aperiodic_info_r14_s_::nmax_res_r14_opts::to_string() const { - static constexpr const char* options[] = {"ffs1", "ffs2", "ffs3", "ffs4"}; + static const char* options[] = {"ffs1", "ffs2", "ffs3", "ffs4"}; return convert_enum_idx( options, 4, value, "mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_aperiodic_info_r14_s_::nmax_res_r14_e_"); } uint8_t mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_aperiodic_info_r14_s_::nmax_res_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 3, 4}; + return map_enum_number( options, 4, value, "mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_aperiodic_info_r14_s_::nmax_res_r14_e_"); } std::string mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_periodic_info_r14_s_::nmax_res_r14_opts::to_string() const { - static constexpr const char* options[] = {"ffs1", "ffs2", "ffs3", "ffs4"}; + static const char* options[] = {"ffs1", "ffs2", "ffs3", "ffs4"}; return convert_enum_idx( options, 4, value, "mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_periodic_info_r14_s_::nmax_res_r14_e_"); } uint8_t mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_periodic_info_r14_s_::nmax_res_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 3, 4}; + return map_enum_number( options, 4, value, "mimo_ue_params_per_tm_v1430_s::nzp_csi_rs_periodic_info_r14_s_::nmax_res_r14_e_"); } std::string mimo_ue_params_per_tm_v1470_s::csi_report_advanced_max_ports_r14_opts::to_string() const { - static constexpr const char* options[] = {"n8", "n12", "n16", "n20", "n24", "n28"}; + static const char* options[] = {"n8", "n12", "n16", "n20", "n24", "n28"}; return convert_enum_idx(options, 6, value, "mimo_ue_params_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_"); } uint8_t mimo_ue_params_per_tm_v1470_s::csi_report_advanced_max_ports_r14_opts::to_number() const { - static constexpr uint8_t options[] = {8, 12, 16, 20, 24, 28}; - return convert_enum_idx(options, 6, value, "mimo_ue_params_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_"); + static const uint8_t options[] = {8, 12, 16, 20, 24, 28}; + return map_enum_number(options, 6, value, "mimo_ue_params_per_tm_v1470_s::csi_report_advanced_max_ports_r14_e_"); } std::string naics_cap_entry_r12_s::nof_aggregated_prb_r12_opts::to_string() const { - static constexpr const char* options[] = {"n50", - "n75", - "n100", - "n125", - "n150", - "n175", - "n200", - "n225", - "n250", - "n275", - "n300", - "n350", - "n400", - "n450", - "n500", - "spare"}; + static const char* options[] = {"n50", + "n75", + "n100", + "n125", + "n150", + "n175", + "n200", + "n225", + "n250", + "n275", + "n300", + "n350", + "n400", + "n450", + "n500", + "spare"}; return convert_enum_idx(options, 16, value, "naics_cap_entry_r12_s::nof_aggregated_prb_r12_e_"); } uint16_t naics_cap_entry_r12_s::nof_aggregated_prb_r12_opts::to_number() const { - static constexpr uint16_t options[] = {50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 350, 400, 450, 500}; - return convert_enum_idx(options, 15, value, "naics_cap_entry_r12_s::nof_aggregated_prb_r12_e_"); + static const uint16_t options[] = {50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 350, 400, 450, 500}; + return map_enum_number(options, 15, value, "naics_cap_entry_r12_s::nof_aggregated_prb_r12_e_"); } std::string pdcp_params_s::max_num_rohc_context_sessions_opts::to_string() const { - static constexpr const char* options[] = {"cs2", - "cs4", - "cs8", - "cs12", - "cs16", - "cs24", - "cs32", - "cs48", - "cs64", - "cs128", - "cs256", - "cs512", - "cs1024", - "cs16384", - "spare2", - "spare1"}; + static const char* options[] = {"cs2", + "cs4", + "cs8", + "cs12", + "cs16", + "cs24", + "cs32", + "cs48", + "cs64", + "cs128", + "cs256", + "cs512", + "cs1024", + "cs16384", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "pdcp_params_s::max_num_rohc_context_sessions_e_"); } uint16_t pdcp_params_s::max_num_rohc_context_sessions_opts::to_number() const { - static constexpr uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 48, 64, 128, 256, 512, 1024, 16384}; - return convert_enum_idx(options, 14, value, "pdcp_params_s::max_num_rohc_context_sessions_e_"); + static const uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 48, 64, 128, 256, 512, 1024, 16384}; + return map_enum_number(options, 14, value, "pdcp_params_s::max_num_rohc_context_sessions_e_"); } std::string pdcp_params_nr_r15_s::rohc_context_max_sessions_r15_opts::to_string() const { - static constexpr const char* options[] = {"cs2", - "cs4", - "cs8", - "cs12", - "cs16", - "cs24", - "cs32", - "cs48", - "cs64", - "cs128", - "cs256", - "cs512", - "cs1024", - "cs16384", - "spare2", - "spare1"}; + static const char* options[] = {"cs2", + "cs4", + "cs8", + "cs12", + "cs16", + "cs24", + "cs32", + "cs48", + "cs64", + "cs128", + "cs256", + "cs512", + "cs1024", + "cs16384", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "pdcp_params_nr_r15_s::rohc_context_max_sessions_r15_e_"); } uint16_t pdcp_params_nr_r15_s::rohc_context_max_sessions_r15_opts::to_number() const { - static constexpr uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 48, 64, 128, 256, 512, 1024, 16384}; - return convert_enum_idx(options, 14, value, "pdcp_params_nr_r15_s::rohc_context_max_sessions_r15_e_"); + static const uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 48, 64, 128, 256, 512, 1024, 16384}; + return map_enum_number(options, 14, value, "pdcp_params_nr_r15_s::rohc_context_max_sessions_r15_e_"); } std::string phy_layer_params_v1430_s::ce_pdsch_pusch_max_bw_r14_opts::to_string() const { - static constexpr const char* options[] = {"bw5", "bw20"}; + static const char* options[] = {"bw5", "bw20"}; return convert_enum_idx(options, 2, value, "phy_layer_params_v1430_s::ce_pdsch_pusch_max_bw_r14_e_"); } uint8_t phy_layer_params_v1430_s::ce_pdsch_pusch_max_bw_r14_opts::to_number() const { - static constexpr uint8_t options[] = {5, 20}; - return convert_enum_idx(options, 2, value, "phy_layer_params_v1430_s::ce_pdsch_pusch_max_bw_r14_e_"); + static const uint8_t options[] = {5, 20}; + return map_enum_number(options, 2, value, "phy_layer_params_v1430_s::ce_pdsch_pusch_max_bw_r14_e_"); } std::string phy_layer_params_v1430_s::ce_retuning_symbols_r14_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1"}; + static const char* options[] = {"n0", "n1"}; return convert_enum_idx(options, 2, value, "phy_layer_params_v1430_s::ce_retuning_symbols_r14_e_"); } uint8_t phy_layer_params_v1430_s::ce_retuning_symbols_r14_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "phy_layer_params_v1430_s::ce_retuning_symbols_r14_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "phy_layer_params_v1430_s::ce_retuning_symbols_r14_e_"); } std::string phy_layer_params_v1530_s::stti_spt_cap_r15_s_::max_layers_slot_or_subslot_pusch_r15_opts::to_string() const { - static constexpr const char* options[] = {"oneLayer", "twoLayers", "fourLayers"}; + static const char* options[] = {"oneLayer", "twoLayers", "fourLayers"}; return convert_enum_idx( options, 3, value, "phy_layer_params_v1530_s::stti_spt_cap_r15_s_::max_layers_slot_or_subslot_pusch_r15_e_"); } uint8_t phy_layer_params_v1530_s::stti_spt_cap_r15_s_::max_layers_slot_or_subslot_pusch_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number( options, 3, value, "phy_layer_params_v1530_s::stti_spt_cap_r15_s_::max_layers_slot_or_subslot_pusch_r15_e_"); } std::string phy_layer_params_v1530_s::stti_spt_cap_r15_s_::sps_stti_r15_opts::to_string() const { - static constexpr const char* options[] = {"slot", "subslot", "slotAndSubslot"}; + static const char* options[] = {"slot", "subslot", "slotAndSubslot"}; return convert_enum_idx(options, 3, value, "phy_layer_params_v1530_s::stti_spt_cap_r15_s_::sps_stti_r15_e_"); } std::string supported_band_eutra_v1320_s::ue_pwr_class_n_r13_opts::to_string() const { - static constexpr const char* options[] = {"class1", "class2", "class4"}; + static const char* options[] = {"class1", "class2", "class4"}; return convert_enum_idx(options, 3, value, "supported_band_eutra_v1320_s::ue_pwr_class_n_r13_e_"); } uint8_t supported_band_eutra_v1320_s::ue_pwr_class_n_r13_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "supported_band_eutra_v1320_s::ue_pwr_class_n_r13_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "supported_band_eutra_v1320_s::ue_pwr_class_n_r13_e_"); } std::string sl_params_r12_s::disc_supported_proc_r12_opts::to_string() const { - static constexpr const char* options[] = {"n50", "n400"}; + static const char* options[] = {"n50", "n400"}; return convert_enum_idx(options, 2, value, "sl_params_r12_s::disc_supported_proc_r12_e_"); } uint16_t sl_params_r12_s::disc_supported_proc_r12_opts::to_number() const { - static constexpr uint16_t options[] = {50, 400}; - return convert_enum_idx(options, 2, value, "sl_params_r12_s::disc_supported_proc_r12_e_"); + static const uint16_t options[] = {50, 400}; + return map_enum_number(options, 2, value, "sl_params_r12_s::disc_supported_proc_r12_e_"); } std::string sl_params_v1530_s::slss_supported_tx_freq_r15_opts::to_string() const { - static constexpr const char* options[] = {"single", "multiple"}; + static const char* options[] = {"single", "multiple"}; return convert_enum_idx(options, 2, value, "sl_params_v1530_s::slss_supported_tx_freq_r15_e_"); } std::string sps_cfg_dl_stti_r15_c::setup_s_::semi_persist_sched_interv_dl_stti_r15_opts::to_string() const { - static constexpr const char* options[] = {"sTTI1", - "sTTI2", - "sTTI3", - "sTTI4", - "sTTI6", - "sTTI8", - "sTTI12", - "sTTI16", - "sTTI20", - "sTTI40", - "sTTI60", - "sTTI80", - "sTTI120", - "sTTI240", - "spare2", - "spare1"}; + static const char* options[] = {"sTTI1", + "sTTI2", + "sTTI3", + "sTTI4", + "sTTI6", + "sTTI8", + "sTTI12", + "sTTI16", + "sTTI20", + "sTTI40", + "sTTI60", + "sTTI80", + "sTTI120", + "sTTI240", + "spare2", + "spare1"}; return convert_enum_idx( options, 16, value, "sps_cfg_dl_stti_r15_c::setup_s_::semi_persist_sched_interv_dl_stti_r15_e_"); } uint8_t sps_cfg_dl_stti_r15_c::setup_s_::semi_persist_sched_interv_dl_stti_r15_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 6, 8, 12, 16, 20, 40, 60, 80, 120, 240}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 3, 4, 6, 8, 12, 16, 20, 40, 60, 80, 120, 240}; + return map_enum_number( options, 14, value, "sps_cfg_dl_stti_r15_c::setup_s_::semi_persist_sched_interv_dl_stti_r15_e_"); } std::string laa_params_v1430_s::two_step_sched_timing_info_r14_opts::to_string() const { - static constexpr const char* options[] = {"nPlus1", "nPlus2", "nPlus3"}; + static const char* options[] = {"nPlus1", "nPlus2", "nPlus3"}; return convert_enum_idx(options, 3, value, "laa_params_v1430_s::two_step_sched_timing_info_r14_e_"); } uint8_t laa_params_v1430_s::two_step_sched_timing_info_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx(options, 3, value, "laa_params_v1430_s::two_step_sched_timing_info_r14_e_"); + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number(options, 3, value, "laa_params_v1430_s::two_step_sched_timing_info_r14_e_"); } std::string pdcp_params_v1430_s::max_num_rohc_context_sessions_r14_opts::to_string() const { - static constexpr const char* options[] = {"cs2", - "cs4", - "cs8", - "cs12", - "cs16", - "cs24", - "cs32", - "cs48", - "cs64", - "cs128", - "cs256", - "cs512", - "cs1024", - "cs16384", - "spare2", - "spare1"}; + static const char* options[] = {"cs2", + "cs4", + "cs8", + "cs12", + "cs16", + "cs24", + "cs32", + "cs48", + "cs64", + "cs128", + "cs256", + "cs512", + "cs1024", + "cs16384", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "pdcp_params_v1430_s::max_num_rohc_context_sessions_r14_e_"); } uint16_t pdcp_params_v1430_s::max_num_rohc_context_sessions_r14_opts::to_number() const { - static constexpr uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 48, 64, 128, 256, 512, 1024, 16384}; - return convert_enum_idx(options, 14, value, "pdcp_params_v1430_s::max_num_rohc_context_sessions_r14_e_"); + static const uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 48, 64, 128, 256, 512, 1024, 16384}; + return map_enum_number(options, 14, value, "pdcp_params_v1430_s::max_num_rohc_context_sessions_r14_e_"); } std::string mbms_params_v1470_s::mbms_max_bw_r14_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"implicitValue", "explicitValue"}; + static const char* options[] = {"implicitValue", "explicitValue"}; return convert_enum_idx(options, 2, value, "mbms_params_v1470_s::mbms_max_bw_r14_c_::types"); } std::string mbms_params_v1470_s::mbms_scaling_factor1dot25_r14_opts::to_string() const { - static constexpr const char* options[] = {"n3", "n6", "n9", "n12"}; + static const char* options[] = {"n3", "n6", "n9", "n12"}; return convert_enum_idx(options, 4, value, "mbms_params_v1470_s::mbms_scaling_factor1dot25_r14_e_"); } uint8_t mbms_params_v1470_s::mbms_scaling_factor1dot25_r14_opts::to_number() const { - static constexpr uint8_t options[] = {3, 6, 9, 12}; - return convert_enum_idx(options, 4, value, "mbms_params_v1470_s::mbms_scaling_factor1dot25_r14_e_"); + static const uint8_t options[] = {3, 6, 9, 12}; + return map_enum_number(options, 4, value, "mbms_params_v1470_s::mbms_scaling_factor1dot25_r14_e_"); } std::string mbms_params_v1470_s::mbms_scaling_factor7dot5_r14_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4"}; + static const char* options[] = {"n1", "n2", "n3", "n4"}; return convert_enum_idx(options, 4, value, "mbms_params_v1470_s::mbms_scaling_factor7dot5_r14_e_"); } uint8_t mbms_params_v1470_s::mbms_scaling_factor7dot5_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4}; - return convert_enum_idx(options, 4, value, "mbms_params_v1470_s::mbms_scaling_factor7dot5_r14_e_"); + static const uint8_t options[] = {1, 2, 3, 4}; + return map_enum_number(options, 4, value, "mbms_params_v1470_s::mbms_scaling_factor7dot5_r14_e_"); } std::string ue_eutra_cap_v1430_ies_s::ue_category_ul_v1430_opts::to_string() const { - static constexpr const char* options[] = {"n16", "n17", "n18", "n19", "n20", "m2"}; + static const char* options[] = {"n16", "n17", "n18", "n19", "n20", "m2"}; return convert_enum_idx(options, 6, value, "ue_eutra_cap_v1430_ies_s::ue_category_ul_v1430_e_"); } uint8_t ue_eutra_cap_v1430_ies_s::ue_category_ul_v1430_opts::to_number() const { - static constexpr uint8_t options[] = {16, 17, 18, 19, 20, 2}; - return convert_enum_idx(options, 6, value, "ue_eutra_cap_v1430_ies_s::ue_category_ul_v1430_e_"); + static const uint8_t options[] = {16, 17, 18, 19, 20, 2}; + return map_enum_number(options, 6, value, "ue_eutra_cap_v1430_ies_s::ue_category_ul_v1430_e_"); } std::string ue_eutra_cap_v1310_ies_s::ue_category_dl_v1310_opts::to_string() const { - static constexpr const char* options[] = {"n17", "m1"}; + static const char* options[] = {"n17", "m1"}; return convert_enum_idx(options, 2, value, "ue_eutra_cap_v1310_ies_s::ue_category_dl_v1310_e_"); } uint8_t ue_eutra_cap_v1310_ies_s::ue_category_dl_v1310_opts::to_number() const { - static constexpr uint8_t options[] = {17, 1}; - return convert_enum_idx(options, 2, value, "ue_eutra_cap_v1310_ies_s::ue_category_dl_v1310_e_"); + static const uint8_t options[] = {17, 1}; + return map_enum_number(options, 2, value, "ue_eutra_cap_v1310_ies_s::ue_category_dl_v1310_e_"); } std::string ue_eutra_cap_v1310_ies_s::ue_category_ul_v1310_opts::to_string() const { - static constexpr const char* options[] = {"n14", "m1"}; + static const char* options[] = {"n14", "m1"}; return convert_enum_idx(options, 2, value, "ue_eutra_cap_v1310_ies_s::ue_category_ul_v1310_e_"); } uint8_t ue_eutra_cap_v1310_ies_s::ue_category_ul_v1310_opts::to_number() const { - static constexpr uint8_t options[] = {14, 1}; - return convert_enum_idx(options, 2, value, "ue_eutra_cap_v1310_ies_s::ue_category_ul_v1310_e_"); + static const uint8_t options[] = {14, 1}; + return map_enum_number(options, 2, value, "ue_eutra_cap_v1310_ies_s::ue_category_ul_v1310_e_"); } // AccessStratumRelease ::= ENUMERATED std::string access_stratum_release_opts::to_string() const { - static constexpr const char* options[] = {"rel8", "rel9", "rel10", "rel11", "rel12", "rel13", "rel14", "rel15"}; + static const char* options[] = {"rel8", "rel9", "rel10", "rel11", "rel12", "rel13", "rel14", "rel15"}; return convert_enum_idx(options, 8, value, "access_stratum_release_e"); } uint8_t access_stratum_release_opts::to_number() const { - static constexpr uint8_t options[] = {8, 9, 10, 11, 12, 13, 14, 15}; - return convert_enum_idx(options, 8, value, "access_stratum_release_e"); + static const uint8_t options[] = {8, 9, 10, 11, 12, 13, 14, 15}; + return map_enum_number(options, 8, value, "access_stratum_release_e"); } std::string scg_cfg_r12_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "scg-Config-r12", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "scg_cfg_r12_s::crit_exts_c_::c1_c_::types"); } std::string cells_triggered_list_item_c_::pci_utra_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fdd", "tdd"}; + static const char* options[] = {"fdd", "tdd"}; return convert_enum_idx(options, 2, value, "cells_triggered_list_item_c_::pci_utra_c_::types"); } std::string cells_triggered_list_item_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"physCellIdEUTRA", - "physCellIdUTRA", - "physCellIdGERAN", - "physCellIdCDMA2000", - "wlan-Identifiers-r13", - "physCellIdNR-r15"}; + static const char* options[] = {"physCellIdEUTRA", + "physCellIdUTRA", + "physCellIdGERAN", + "physCellIdCDMA2000", + "wlan-Identifiers-r13", + "physCellIdNR-r15"}; return convert_enum_idx(options, 6, value, "cells_triggered_list_item_c_::types"); } uint16_t cells_triggered_list_item_c_::types_opts::to_number() const { - switch (value) { - case pci_cdma2000: - return 2000; - default: - invalid_enum_number(value, "cells_triggered_list_item_c_::types"); + if (value == pci_cdma2000) { + return 2000; } + invalid_enum_number(value, "cells_triggered_list_item_c_::types"); return 0; } std::string drb_info_scg_r12_s::drb_type_r12_opts::to_string() const { - static constexpr const char* options[] = {"split", "scg"}; + static const char* options[] = {"split", "scg"}; return convert_enum_idx(options, 2, value, "drb_info_scg_r12_s::drb_type_r12_e_"); } std::string ho_cmd_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "handoverCommand-r8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ho_cmd_s::crit_exts_c_::c1_c_::types"); } std::string ho_prep_info_v920_ies_s::ue_cfg_release_r9_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "rel9", "rel10", "rel11", "rel12", "v10j0", "v11e0", "v1280", "rel13", "rel14", "rel15"}; return convert_enum_idx(options, 10, value, "ho_prep_info_v920_ies_s::ue_cfg_release_r9_e_"); } std::string rrm_cfg_s::ue_inactive_time_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "s1", "s2", "s3", "s5", "s7", "s10", "s15", "s20", "s25", "s30", "s40", "s50", "min1", "min1s20c", "min1s40", "min2", "min2s30", "min3", "min3s30", "min4", "min5", "min6", "min7", "min8", "min9", "min10", "min12", "min14", "min17", "min20", @@ -10426,210 +10343,209 @@ std::string rrm_cfg_s::ue_inactive_time_opts::to_string() const std::string ho_prep_info_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "handoverPreparationInformation-r8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ho_prep_info_s::crit_exts_c_::c1_c_::types"); } std::string tdd_cfg_sl_r12_s::sf_assign_sl_r12_opts::to_string() const { - static constexpr const char* options[] = {"none", "sa0", "sa1", "sa2", "sa3", "sa4", "sa5", "sa6"}; + static const char* options[] = {"none", "sa0", "sa1", "sa2", "sa3", "sa4", "sa5", "sa6"}; return convert_enum_idx(options, 8, value, "tdd_cfg_sl_r12_s::sf_assign_sl_r12_e_"); } std::string mib_sl_s::sl_bw_r12_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx(options, 6, value, "mib_sl_s::sl_bw_r12_e_"); } uint8_t mib_sl_s::sl_bw_r12_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "mib_sl_s::sl_bw_r12_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "mib_sl_s::sl_bw_r12_e_"); } std::string mib_sl_v2x_r14_s::sl_bw_r14_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx(options, 6, value, "mib_sl_v2x_r14_s::sl_bw_r14_e_"); } uint8_t mib_sl_v2x_r14_s::sl_bw_r14_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "mib_sl_v2x_r14_s::sl_bw_r14_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "mib_sl_v2x_r14_s::sl_bw_r14_e_"); } std::string scg_cfg_info_r12_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "scg-ConfigInfo-r12", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "scg_cfg_info_r12_s::crit_exts_c_::c1_c_::types"); } std::string sl_precfg_disc_pool_r13_s::disc_period_r13_opts::to_string() const { - static constexpr const char* options[] = {"rf4", - "rf6", - "rf7", - "rf8", - "rf12", - "rf14", - "rf16", - "rf24", - "rf28", - "rf32", - "rf64", - "rf128", - "rf256", - "rf512", - "rf1024", - "spare"}; + static const char* options[] = {"rf4", + "rf6", + "rf7", + "rf8", + "rf12", + "rf14", + "rf16", + "rf24", + "rf28", + "rf32", + "rf64", + "rf128", + "rf256", + "rf512", + "rf1024", + "spare"}; return convert_enum_idx(options, 16, value, "sl_precfg_disc_pool_r13_s::disc_period_r13_e_"); } uint16_t sl_precfg_disc_pool_r13_s::disc_period_r13_opts::to_number() const { - static constexpr uint16_t options[] = {4, 6, 7, 8, 12, 14, 16, 24, 28, 32, 64, 128, 256, 512, 1024}; - return convert_enum_idx(options, 15, value, "sl_precfg_disc_pool_r13_s::disc_period_r13_e_"); + static const uint16_t options[] = {4, 6, 7, 8, 12, 14, 16, 24, 28, 32, 64, 128, 256, 512, 1024}; + return map_enum_number(options, 15, value, "sl_precfg_disc_pool_r13_s::disc_period_r13_e_"); } std::string sl_precfg_disc_pool_r13_s::tx_params_r13_s_::tx_probability_r13_opts::to_string() const { - static constexpr const char* options[] = {"p25", "p50", "p75", "p100"}; + static const char* options[] = {"p25", "p50", "p75", "p100"}; return convert_enum_idx(options, 4, value, "sl_precfg_disc_pool_r13_s::tx_params_r13_s_::tx_probability_r13_e_"); } uint8_t sl_precfg_disc_pool_r13_s::tx_params_r13_s_::tx_probability_r13_opts::to_number() const { - static constexpr uint8_t options[] = {25, 50, 75, 100}; - return convert_enum_idx(options, 4, value, "sl_precfg_disc_pool_r13_s::tx_params_r13_s_::tx_probability_r13_e_"); + static const uint8_t options[] = {25, 50, 75, 100}; + return map_enum_number(options, 4, value, "sl_precfg_disc_pool_r13_s::tx_params_r13_s_::tx_probability_r13_e_"); } std::string sl_precfg_general_r12_s::sl_bw_r12_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100"}; return convert_enum_idx(options, 6, value, "sl_precfg_general_r12_s::sl_bw_r12_e_"); } uint8_t sl_precfg_general_r12_s::sl_bw_r12_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "sl_precfg_general_r12_s::sl_bw_r12_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "sl_precfg_general_r12_s::sl_bw_r12_e_"); } std::string sl_precfg_sync_r12_s::sync_ref_min_hyst_r12_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12"}; + static const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12"}; return convert_enum_idx(options, 5, value, "sl_precfg_sync_r12_s::sync_ref_min_hyst_r12_e_"); } uint8_t sl_precfg_sync_r12_s::sync_ref_min_hyst_r12_opts::to_number() const { - static constexpr uint8_t options[] = {0, 3, 6, 9, 12}; - return convert_enum_idx(options, 5, value, "sl_precfg_sync_r12_s::sync_ref_min_hyst_r12_e_"); + static const uint8_t options[] = {0, 3, 6, 9, 12}; + return map_enum_number(options, 5, value, "sl_precfg_sync_r12_s::sync_ref_min_hyst_r12_e_"); } std::string sl_precfg_sync_r12_s::sync_ref_diff_hyst_r12_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12", "dBinf"}; + static const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12", "dBinf"}; return convert_enum_idx(options, 6, value, "sl_precfg_sync_r12_s::sync_ref_diff_hyst_r12_e_"); } uint8_t sl_precfg_sync_r12_s::sync_ref_diff_hyst_r12_opts::to_number() const { - static constexpr uint8_t options[] = {0, 3, 6, 9, 12}; - return convert_enum_idx(options, 5, value, "sl_precfg_sync_r12_s::sync_ref_diff_hyst_r12_e_"); + static const uint8_t options[] = {0, 3, 6, 9, 12}; + return map_enum_number(options, 5, value, "sl_precfg_sync_r12_s::sync_ref_diff_hyst_r12_e_"); } std::string sl_v2x_precfg_comm_pool_r14_s::size_subch_r14_opts::to_string() const { - static constexpr const char* options[] = { - "n4", "n5", "n6", "n8", "n9", "n10", "n12", "n15", "n16", "n18", "n20", - "n25", "n30", "n48", "n50", "n72", "n75", "n96", "n100", "spare13", "spare12", "spare11", - "spare10", "spare9", "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"n4", "n5", "n6", "n8", "n9", "n10", "n12", "n15", + "n16", "n18", "n20", "n25", "n30", "n48", "n50", "n72", + "n75", "n96", "n100", "spare13", "spare12", "spare11", "spare10", "spare9", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "sl_v2x_precfg_comm_pool_r14_s::size_subch_r14_e_"); } uint8_t sl_v2x_precfg_comm_pool_r14_s::size_subch_r14_opts::to_number() const { - static constexpr uint8_t options[] = {4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 25, 30, 48, 50, 72, 75, 96, 100}; - return convert_enum_idx(options, 19, value, "sl_v2x_precfg_comm_pool_r14_s::size_subch_r14_e_"); + static const uint8_t options[] = {4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 25, 30, 48, 50, 72, 75, 96, 100}; + return map_enum_number(options, 19, value, "sl_v2x_precfg_comm_pool_r14_s::size_subch_r14_e_"); } std::string sl_v2x_precfg_comm_pool_r14_s::num_subch_r14_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n3", "n5", "n8", "n10", "n15", "n20", "spare1"}; + static const char* options[] = {"n1", "n3", "n5", "n8", "n10", "n15", "n20", "spare1"}; return convert_enum_idx(options, 8, value, "sl_v2x_precfg_comm_pool_r14_s::num_subch_r14_e_"); } uint8_t sl_v2x_precfg_comm_pool_r14_s::num_subch_r14_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3, 5, 8, 10, 15, 20}; - return convert_enum_idx(options, 7, value, "sl_v2x_precfg_comm_pool_r14_s::num_subch_r14_e_"); + static const uint8_t options[] = {1, 3, 5, 8, 10, 15, 20}; + return map_enum_number(options, 7, value, "sl_v2x_precfg_comm_pool_r14_s::num_subch_r14_e_"); } std::string sl_precfg_v2x_sync_r14_s::sync_ref_min_hyst_r14_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12"}; + static const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12"}; return convert_enum_idx(options, 5, value, "sl_precfg_v2x_sync_r14_s::sync_ref_min_hyst_r14_e_"); } uint8_t sl_precfg_v2x_sync_r14_s::sync_ref_min_hyst_r14_opts::to_number() const { - static constexpr uint8_t options[] = {0, 3, 6, 9, 12}; - return convert_enum_idx(options, 5, value, "sl_precfg_v2x_sync_r14_s::sync_ref_min_hyst_r14_e_"); + static const uint8_t options[] = {0, 3, 6, 9, 12}; + return map_enum_number(options, 5, value, "sl_precfg_v2x_sync_r14_s::sync_ref_min_hyst_r14_e_"); } std::string sl_precfg_v2x_sync_r14_s::sync_ref_diff_hyst_r14_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12", "dBinf"}; + static const char* options[] = {"dB0", "dB3", "dB6", "dB9", "dB12", "dBinf"}; return convert_enum_idx(options, 6, value, "sl_precfg_v2x_sync_r14_s::sync_ref_diff_hyst_r14_e_"); } uint8_t sl_precfg_v2x_sync_r14_s::sync_ref_diff_hyst_r14_opts::to_number() const { - static constexpr uint8_t options[] = {0, 3, 6, 9, 12}; - return convert_enum_idx(options, 5, value, "sl_precfg_v2x_sync_r14_s::sync_ref_diff_hyst_r14_e_"); + static const uint8_t options[] = {0, 3, 6, 9, 12}; + return map_enum_number(options, 5, value, "sl_precfg_v2x_sync_r14_s::sync_ref_diff_hyst_r14_e_"); } std::string sl_v2x_precfg_freq_info_r14_s::sync_prio_r14_opts::to_string() const { - static constexpr const char* options[] = {"gnss", "enb"}; + static const char* options[] = {"gnss", "enb"}; return convert_enum_idx(options, 2, value, "sl_v2x_precfg_freq_info_r14_s::sync_prio_r14_e_"); } // SL-V2X-TxProfile-r15 ::= ENUMERATED std::string sl_v2x_tx_profile_r15_opts::to_string() const { - static constexpr const char* options[] = { - "rel14", "rel15", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"rel14", "rel15", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "sl_v2x_tx_profile_r15_e"); } uint8_t sl_v2x_tx_profile_r15_opts::to_number() const { - static constexpr uint8_t options[] = {14, 15}; - return convert_enum_idx(options, 2, value, "sl_v2x_tx_profile_r15_e"); + static const uint8_t options[] = {14, 15}; + return map_enum_number(options, 2, value, "sl_v2x_tx_profile_r15_e"); } std::string ue_paging_coverage_info_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "uePagingCoverageInformation-r13", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ue_paging_coverage_info_s::crit_exts_c_::c1_c_::types"); } std::string ue_radio_access_cap_info_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ueRadioAccessCapabilityInformation-r8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ue_radio_access_cap_info_s::crit_exts_c_::c1_c_::types"); } std::string ue_radio_paging_info_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ueRadioPagingInformation-r12", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ue_radio_paging_info_s::crit_exts_c_::c1_c_::types"); } std::string var_meas_idle_cfg_r15_s::meas_idle_dur_r15_opts::to_string() const { - static constexpr const char* options[] = {"sec10", "sec30", "sec60", "sec120", "sec180", "sec240", "sec300"}; + static const char* options[] = {"sec10", "sec30", "sec60", "sec120", "sec180", "sec240", "sec300"}; return convert_enum_idx(options, 7, value, "var_meas_idle_cfg_r15_s::meas_idle_dur_r15_e_"); } uint16_t var_meas_idle_cfg_r15_s::meas_idle_dur_r15_opts::to_number() const { - static constexpr uint16_t options[] = {10, 30, 60, 120, 180, 240, 300}; - return convert_enum_idx(options, 7, value, "var_meas_idle_cfg_r15_s::meas_idle_dur_r15_e_"); + static const uint16_t options[] = {10, 30, 60, 120, 180, 240, 300}; + return map_enum_number(options, 7, value, "var_meas_idle_cfg_r15_s::meas_idle_dur_r15_e_"); } diff --git a/lib/src/asn1/rrc_asn1_utils.cc b/lib/src/asn1/rrc_asn1_utils.cc index 55cdece33..1d6762a48 100644 --- a/lib/src/asn1/rrc_asn1_utils.cc +++ b/lib/src/asn1/rrc_asn1_utils.cc @@ -152,8 +152,7 @@ srslte::rlc_config_t make_rlc_config_t(const asn1::rrc::srb_to_add_mod_s& asn1_t if (asn1_type.srb_id <= 2) { return rlc_config_t::srb_config(asn1_type.srb_id); } else { - asn1::rrc::rrc_log_print( - asn1::LOG_LEVEL_ERROR, "SRB %d does not support default initialization type\n", asn1_type.srb_id); + srslte::logmap::get("ASN1::RRC")->error("SRB %d does not support default initialization type\n", asn1_type.srb_id); return rlc_config_t(); } } @@ -352,7 +351,7 @@ srsenb::sched_interface::ant_info_ded_t make_ant_info_ded(const asn1::rrc::ant_i ant_ded.codebook_subset_restrict = asn1code.n4_tx_ant_tm6().to_number(); break; default: - asn1::rrc::rrc_log_print(LOG_LEVEL_ERROR, "Failed to convert antenna codebook type to number\n"); + srslte::logmap::get("ASN1::RRC")->error("Failed to convert antenna codebook type to number\n"); } } ant_ded.ue_tx_ant_sel = srsenb::sched_interface::ant_info_ded_t::ue_tx_ant_sel_t::release; diff --git a/lib/src/asn1/rrc_nr_asn1.cc b/lib/src/asn1/rrc_nr_asn1.cc index 606e37340..ef6be322a 100644 --- a/lib/src/asn1/rrc_nr_asn1.cc +++ b/lib/src/asn1/rrc_nr_asn1.cc @@ -24,29 +24,15 @@ using namespace asn1; using namespace asn1::rrc_nr; +using srslte::logmap; /******************************************************************************* * Logging Utilities ******************************************************************************/ -srslte::log* asn1::rrc_nr::rrc_nr_log_ptr = nullptr; - -void asn1::rrc_nr::rrc_nr_log_register_handler(srslte::log* ctx) -{ - rrc_nr_log_ptr = ctx; -} - -void asn1::rrc_nr::rrc_nr_log_print(srslte::LOG_LEVEL_ENUM log_level, const char* format, ...) -{ - va_list args; - va_start(args, format); - vlog_print(rrc_nr_log_ptr, log_level, format, args); - va_end(args); -} - void asn1::rrc_nr::log_invalid_access_choice_id(uint32_t val, uint32_t choice_id) { - rrc_nr_log_print(LOG_LEVEL_ERROR, "The access choice id is invalid (%d!=%d)\n", val, choice_id); + logmap::get("ASN1::RRC_NR")->error("The access choice id is invalid (%d!=%d)\n", val, choice_id); } void asn1::rrc_nr::assert_choice_type(uint32_t val, uint32_t choice_id) @@ -61,11 +47,11 @@ void asn1::rrc_nr::assert_choice_type(const std::string& access_type, const std::string& choice_type) { if (access_type != current_type) { - rrc_nr_log_print(LOG_LEVEL_ERROR, - "Invalid field access for choice type \"%s\" (\"%s\"!=\"%s\")\n", - choice_type.c_str(), - access_type.c_str(), - current_type.c_str()); + logmap::get("ASN1::RRC_NR") + ->error("Invalid field access for choice type \"%s\" (\"%s\"!=\"%s\")\n", + choice_type.c_str(), + access_type.c_str(), + current_type.c_str()); } } @@ -74,29 +60,81 @@ asn1::rrc_nr::convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t { if (enum_val >= nof_types) { if (enum_val == nof_types) { - rrc_nr_log_print(LOG_LEVEL_ERROR, "The enum of type %s was not initialized.\n", enum_type); + logmap::get("ASN1::RRC_NR")->error("The enum of type %s was not initialized.\n", enum_type); } else { - rrc_nr_log_print(LOG_LEVEL_ERROR, "The enum value=%d of type %s is not valid.\n", enum_val, enum_type); + logmap::get("ASN1::RRC_NR")->error("The enum value=%d of type %s is not valid.\n", enum_val, enum_type); } return ""; } return array[enum_val]; } -#define rrc_nr_asn1_warn_assert(cond, file, line) \ - if ((cond)) { \ - rrc_nr_log_print(LOG_LEVEL_WARNING, "Assertion in [%s][%d] failed.\n", (file), (line)); \ +template +ItemType asn1::rrc_nr::map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type) +{ + if (enum_val >= nof_types) { + if (enum_val == nof_types) { + logmap::get("ASN1::RRC_NR")->error("The enum of type %s is not initialized.\n", enum_type); + } else { + logmap::get("ASN1::RRC_NR") + ->error("The enum value=%d of type %s cannot be converted to a number.\n", enum_val, enum_type); + } + return 0; } - + return array[enum_val]; +} +template const uint8_t asn1::rrc_nr::map_enum_number(const uint8_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint16_t asn1::rrc_nr::map_enum_number(const uint16_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint32_t asn1::rrc_nr::map_enum_number(const uint32_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint64_t asn1::rrc_nr::map_enum_number(const uint64_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int8_t asn1::rrc_nr::map_enum_number(const int8_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int16_t asn1::rrc_nr::map_enum_number(const int16_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int32_t asn1::rrc_nr::map_enum_number(const int32_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int64_t asn1::rrc_nr::map_enum_number(const int64_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const float asn1::rrc_nr::map_enum_number(const float* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); + +void rrc_nr_asn1_warn_assert(bool cond, const char* filename, int lineno) +{ + if (cond) { + logmap::get("ASN1::RRC_NR")->warning("Assertion in [%s][%d] failed.\n", filename, lineno); + } +} static void log_invalid_choice_id(uint32_t val, const char* choice_type) { - rrc_nr_log_print(LOG_LEVEL_ERROR, "Invalid choice id=%d for choice type %s\n", val, choice_type); + logmap::get("ASN1::RRC_NR")->error("Invalid choice id=%d for choice type %s\n", val, choice_type); } static void invalid_enum_number(int value, const char* name) { - rrc_nr_log_print( - LOG_LEVEL_ERROR, "The provided enum value=%d of type %s cannot be translated into a number\n", value, name); + logmap::get("ASN1::RRC_NR") + ->error("The provided enum value=%d of type %s cannot be translated into a number\n", value, name); } /******************************************************************************* @@ -170,35 +208,35 @@ void mib_s::to_json(json_writer& j) const std::string mib_s::sub_carrier_spacing_common_opts::to_string() const { - static constexpr const char* options[] = {"scs15or60", "scs30or120"}; + static const char* options[] = {"scs15or60", "scs30or120"}; return convert_enum_idx(options, 2, value, "mib_s::sub_carrier_spacing_common_e_"); } uint8_t mib_s::sub_carrier_spacing_common_opts::to_number() const { - static constexpr uint8_t options[] = {15, 30}; - return convert_enum_idx(options, 2, value, "mib_s::sub_carrier_spacing_common_e_"); + static const uint8_t options[] = {15, 30}; + return map_enum_number(options, 2, value, "mib_s::sub_carrier_spacing_common_e_"); } std::string mib_s::dmrs_type_a_position_opts::to_string() const { - static constexpr const char* options[] = {"pos2", "pos3"}; + static const char* options[] = {"pos2", "pos3"}; return convert_enum_idx(options, 2, value, "mib_s::dmrs_type_a_position_e_"); } uint8_t mib_s::dmrs_type_a_position_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3}; - return convert_enum_idx(options, 2, value, "mib_s::dmrs_type_a_position_e_"); + static const uint8_t options[] = {2, 3}; + return map_enum_number(options, 2, value, "mib_s::dmrs_type_a_position_e_"); } std::string mib_s::cell_barred_opts::to_string() const { - static constexpr const char* options[] = {"barred", "notBarred"}; + static const char* options[] = {"barred", "notBarred"}; return convert_enum_idx(options, 2, value, "mib_s::cell_barred_e_"); } std::string mib_s::intra_freq_resel_opts::to_string() const { - static constexpr const char* options[] = {"allowed", "notAllowed"}; + static const char* options[] = {"allowed", "notAllowed"}; return convert_enum_idx(options, 2, value, "mib_s::intra_freq_resel_e_"); } @@ -314,7 +352,7 @@ SRSASN_CODE bcch_bch_msg_type_c::unpack(cbit_ref& bref) std::string bcch_bch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"mib", "messageClassExtension"}; + static const char* options[] = {"mib", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "bcch_bch_msg_type_c::types"); } @@ -424,33 +462,33 @@ void nr_ns_pmax_value_s::to_json(json_writer& j) const // EUTRA-Q-OffsetRange ::= ENUMERATED std::string eutra_q_offset_range_opts::to_string() const { - static constexpr const char* options[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", - "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", - "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", - "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; + static const char* options[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", + "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", + "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", + "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; return convert_enum_idx(options, 31, value, "eutra_q_offset_range_e"); } int8_t eutra_q_offset_range_opts::to_number() const { - static constexpr int8_t options[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, - 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; - return convert_enum_idx(options, 31, value, "eutra_q_offset_range_e"); + static const int8_t options[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, + 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return map_enum_number(options, 31, value, "eutra_q_offset_range_e"); } // Q-OffsetRange ::= ENUMERATED std::string q_offset_range_opts::to_string() const { - static constexpr const char* options[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", - "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", - "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", - "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; + static const char* options[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", + "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", + "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", + "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; return convert_enum_idx(options, 31, value, "q_offset_range_e"); } int8_t q_offset_range_opts::to_number() const { - static constexpr int8_t options[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, - 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; - return convert_enum_idx(options, 31, value, "q_offset_range_e"); + static const int8_t options[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, + 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return map_enum_number(options, 31, value, "q_offset_range_e"); } // EUTRA-FreqNeighCellInfo ::= SEQUENCE @@ -529,8 +567,8 @@ void eutra_multi_band_info_s::to_json(json_writer& j) const j.write_int("eutra-FreqBandIndicator", eutra_freq_band_ind); if (eutra_ns_pmax_list_present) { j.start_array("eutra-NS-PmaxList"); - for (uint32_t i1 = 0; i1 < eutra_ns_pmax_list.size(); ++i1) { - eutra_ns_pmax_list[i1].to_json(j); + for (const auto& e1 : eutra_ns_pmax_list) { + e1.to_json(j); } j.end_array(); } @@ -572,28 +610,28 @@ void eutra_pci_range_s::to_json(json_writer& j) const std::string eutra_pci_range_s::range_opts::to_string() const { - static constexpr const char* options[] = {"n4", - "n8", - "n12", - "n16", - "n24", - "n32", - "n48", - "n64", - "n84", - "n96", - "n128", - "n168", - "n252", - "n504", - "spare2", - "spare1"}; + static const char* options[] = {"n4", + "n8", + "n12", + "n16", + "n24", + "n32", + "n48", + "n64", + "n84", + "n96", + "n128", + "n168", + "n252", + "n504", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "eutra_pci_range_s::range_e_"); } uint16_t eutra_pci_range_s::range_opts::to_number() const { - static constexpr uint16_t options[] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504}; - return convert_enum_idx(options, 14, value, "eutra_pci_range_s::range_e_"); + static const uint16_t options[] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504}; + return map_enum_number(options, 14, value, "eutra_pci_range_s::range_e_"); } // InterFreqNeighCellInfo ::= SEQUENCE @@ -693,8 +731,8 @@ void nr_multi_band_info_s::to_json(json_writer& j) const } if (nr_ns_pmax_list_present) { j.start_array("nr-NS-PmaxList"); - for (uint32_t i1 = 0; i1 < nr_ns_pmax_list.size(); ++i1) { - nr_ns_pmax_list[i1].to_json(j); + for (const auto& e1 : nr_ns_pmax_list) { + e1.to_json(j); } j.end_array(); } @@ -736,28 +774,28 @@ void pci_range_s::to_json(json_writer& j) const std::string pci_range_s::range_opts::to_string() const { - static constexpr const char* options[] = {"n4", - "n8", - "n12", - "n16", - "n24", - "n32", - "n48", - "n64", - "n84", - "n96", - "n128", - "n168", - "n252", - "n504", - "n1008", - "spare1"}; + static const char* options[] = {"n4", + "n8", + "n12", + "n16", + "n24", + "n32", + "n48", + "n64", + "n84", + "n96", + "n128", + "n168", + "n252", + "n504", + "n1008", + "spare1"}; return convert_enum_idx(options, 16, value, "pci_range_s::range_e_"); } uint16_t pci_range_s::range_opts::to_number() const { - static constexpr uint16_t options[] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504, 1008}; - return convert_enum_idx(options, 15, value, "pci_range_s::range_e_"); + static const uint16_t options[] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504, 1008}; + return map_enum_number(options, 15, value, "pci_range_s::range_e_"); } // PDSCH-TimeDomainResourceAllocation ::= SEQUENCE @@ -798,7 +836,7 @@ void pdsch_time_domain_res_alloc_s::to_json(json_writer& j) const std::string pdsch_time_domain_res_alloc_s::map_type_opts::to_string() const { - static constexpr const char* options[] = {"typeA", "typeB"}; + static const char* options[] = {"typeA", "typeB"}; return convert_enum_idx(options, 2, value, "pdsch_time_domain_res_alloc_s::map_type_e_"); } @@ -840,24 +878,24 @@ void pusch_time_domain_res_alloc_s::to_json(json_writer& j) const std::string pusch_time_domain_res_alloc_s::map_type_opts::to_string() const { - static constexpr const char* options[] = {"typeA", "typeB"}; + static const char* options[] = {"typeA", "typeB"}; return convert_enum_idx(options, 2, value, "pusch_time_domain_res_alloc_s::map_type_e_"); } // CellReselectionSubPriority ::= ENUMERATED std::string cell_resel_sub_prio_opts::to_string() const { - static constexpr const char* options[] = {"oDot2", "oDot4", "oDot6", "oDot8"}; + static const char* options[] = {"oDot2", "oDot4", "oDot6", "oDot8"}; return convert_enum_idx(options, 4, value, "cell_resel_sub_prio_e"); } float cell_resel_sub_prio_opts::to_number() const { - static constexpr float options[] = {0.2, 0.4, 0.6, 0.8}; - return convert_enum_idx(options, 4, value, "cell_resel_sub_prio_e"); + static const float options[] = {0.2, 0.4, 0.6, 0.8}; + return map_enum_number(options, 4, value, "cell_resel_sub_prio_e"); } std::string cell_resel_sub_prio_opts::to_number_string() const { - static constexpr const char* options[] = {"0.2", "0.4", "0.6", "0.8"}; + static const char* options[] = {"0.2", "0.4", "0.6", "0.8"}; return convert_enum_idx(options, 4, value, "cell_resel_sub_prio_e"); } @@ -923,15 +961,15 @@ void ctrl_res_set_s::to_json(json_writer& j) const j.write_str("precoderGranularity", precoder_granularity.to_string()); if (tci_states_pdcch_to_add_list_present) { j.start_array("tci-StatesPDCCH-ToAddList"); - for (uint32_t i1 = 0; i1 < tci_states_pdcch_to_add_list.size(); ++i1) { - j.write_int(tci_states_pdcch_to_add_list[i1]); + for (const auto& e1 : tci_states_pdcch_to_add_list) { + j.write_int(e1); } j.end_array(); } if (tci_states_pdcch_to_release_list_present) { j.start_array("tci-StatesPDCCH-ToReleaseList"); - for (uint32_t i1 = 0; i1 < tci_states_pdcch_to_release_list.size(); ++i1) { - j.write_int(tci_states_pdcch_to_release_list[i1]); + for (const auto& e1 : tci_states_pdcch_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -1014,50 +1052,49 @@ SRSASN_CODE ctrl_res_set_s::cce_reg_map_type_c_::unpack(cbit_ref& bref) std::string ctrl_res_set_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n3", "n6"}; + static const char* options[] = {"n2", "n3", "n6"}; return convert_enum_idx(options, 3, value, "ctrl_res_set_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_e_"); } uint8_t ctrl_res_set_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 6}; - return convert_enum_idx(options, 3, value, "ctrl_res_set_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_e_"); + static const uint8_t options[] = {2, 3, 6}; + return map_enum_number(options, 3, value, "ctrl_res_set_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_e_"); } std::string ctrl_res_set_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n3", "n6"}; + static const char* options[] = {"n2", "n3", "n6"}; return convert_enum_idx( options, 3, value, "ctrl_res_set_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_e_"); } uint8_t ctrl_res_set_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 6}; - return convert_enum_idx( - options, 3, value, "ctrl_res_set_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_e_"); + static const uint8_t options[] = {2, 3, 6}; + return map_enum_number(options, 3, value, "ctrl_res_set_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_e_"); } std::string ctrl_res_set_s::cce_reg_map_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"interleaved", "nonInterleaved"}; + static const char* options[] = {"interleaved", "nonInterleaved"}; return convert_enum_idx(options, 2, value, "ctrl_res_set_s::cce_reg_map_type_c_::types"); } std::string ctrl_res_set_s::precoder_granularity_opts::to_string() const { - static constexpr const char* options[] = {"sameAsREG-bundle", "allContiguousRBs"}; + static const char* options[] = {"sameAsREG-bundle", "allContiguousRBs"}; return convert_enum_idx(options, 2, value, "ctrl_res_set_s::precoder_granularity_e_"); } // EUTRA-AllowedMeasBandwidth ::= ENUMERATED std::string eutra_allowed_meas_bw_opts::to_string() const { - static constexpr const char* options[] = {"mbw6", "mbw15", "mbw25", "mbw50", "mbw75", "mbw100"}; + static const char* options[] = {"mbw6", "mbw15", "mbw25", "mbw50", "mbw75", "mbw100"}; return convert_enum_idx(options, 6, value, "eutra_allowed_meas_bw_e"); } uint8_t eutra_allowed_meas_bw_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "eutra_allowed_meas_bw_e"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "eutra_allowed_meas_bw_e"); } // RACH-ConfigGeneric ::= SEQUENCE @@ -1105,46 +1142,46 @@ void rach_cfg_generic_s::to_json(json_writer& j) const std::string rach_cfg_generic_s::msg1_fdm_opts::to_string() const { - static constexpr const char* options[] = {"one", "two", "four", "eight"}; + static const char* options[] = {"one", "two", "four", "eight"}; return convert_enum_idx(options, 4, value, "rach_cfg_generic_s::msg1_fdm_e_"); } uint8_t rach_cfg_generic_s::msg1_fdm_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx(options, 4, value, "rach_cfg_generic_s::msg1_fdm_e_"); + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number(options, 4, value, "rach_cfg_generic_s::msg1_fdm_e_"); } std::string rach_cfg_generic_s::preamb_trans_max_opts::to_string() const { - static constexpr const char* options[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10", "n20", "n50", "n100", "n200"}; + static const char* options[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10", "n20", "n50", "n100", "n200"}; return convert_enum_idx(options, 11, value, "rach_cfg_generic_s::preamb_trans_max_e_"); } uint8_t rach_cfg_generic_s::preamb_trans_max_opts::to_number() const { - static constexpr uint8_t options[] = {3, 4, 5, 6, 7, 8, 10, 20, 50, 100, 200}; - return convert_enum_idx(options, 11, value, "rach_cfg_generic_s::preamb_trans_max_e_"); + static const uint8_t options[] = {3, 4, 5, 6, 7, 8, 10, 20, 50, 100, 200}; + return map_enum_number(options, 11, value, "rach_cfg_generic_s::preamb_trans_max_e_"); } std::string rach_cfg_generic_s::pwr_ramp_step_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB2", "dB4", "dB6"}; + static const char* options[] = {"dB0", "dB2", "dB4", "dB6"}; return convert_enum_idx(options, 4, value, "rach_cfg_generic_s::pwr_ramp_step_e_"); } uint8_t rach_cfg_generic_s::pwr_ramp_step_opts::to_number() const { - static constexpr uint8_t options[] = {0, 2, 4, 6}; - return convert_enum_idx(options, 4, value, "rach_cfg_generic_s::pwr_ramp_step_e_"); + static const uint8_t options[] = {0, 2, 4, 6}; + return map_enum_number(options, 4, value, "rach_cfg_generic_s::pwr_ramp_step_e_"); } std::string rach_cfg_generic_s::ra_resp_win_opts::to_string() const { - static constexpr const char* options[] = {"sl1", "sl2", "sl4", "sl8", "sl10", "sl20", "sl40", "sl80"}; + static const char* options[] = {"sl1", "sl2", "sl4", "sl8", "sl10", "sl20", "sl40", "sl80"}; return convert_enum_idx(options, 8, value, "rach_cfg_generic_s::ra_resp_win_e_"); } uint8_t rach_cfg_generic_s::ra_resp_win_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 10, 20, 40, 80}; - return convert_enum_idx(options, 8, value, "rach_cfg_generic_s::ra_resp_win_e_"); + static const uint8_t options[] = {1, 2, 4, 8, 10, 20, 40, 80}; + return map_enum_number(options, 8, value, "rach_cfg_generic_s::ra_resp_win_e_"); } // SS-RSSI-Measurement ::= SEQUENCE @@ -1350,24 +1387,24 @@ SRSASN_CODE ssb_mtc_s::periodicity_and_offset_c_::unpack(cbit_ref& bref) std::string ssb_mtc_s::periodicity_and_offset_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sf5", "sf10", "sf20", "sf40", "sf80", "sf160"}; + static const char* options[] = {"sf5", "sf10", "sf20", "sf40", "sf80", "sf160"}; return convert_enum_idx(options, 6, value, "ssb_mtc_s::periodicity_and_offset_c_::types"); } uint8_t ssb_mtc_s::periodicity_and_offset_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 20, 40, 80, 160}; - return convert_enum_idx(options, 6, value, "ssb_mtc_s::periodicity_and_offset_c_::types"); + static const uint8_t options[] = {5, 10, 20, 40, 80, 160}; + return map_enum_number(options, 6, value, "ssb_mtc_s::periodicity_and_offset_c_::types"); } std::string ssb_mtc_s::dur_opts::to_string() const { - static constexpr const char* options[] = {"sf1", "sf2", "sf3", "sf4", "sf5"}; + static const char* options[] = {"sf1", "sf2", "sf3", "sf4", "sf5"}; return convert_enum_idx(options, 5, value, "ssb_mtc_s::dur_e_"); } uint8_t ssb_mtc_s::dur_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5}; - return convert_enum_idx(options, 5, value, "ssb_mtc_s::dur_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5}; + return map_enum_number(options, 5, value, "ssb_mtc_s::dur_e_"); } // SSB-ToMeasure ::= CHOICE @@ -1511,7 +1548,7 @@ SRSASN_CODE ssb_to_measure_c::unpack(cbit_ref& bref) std::string ssb_to_measure_c::types_opts::to_string() const { - static constexpr const char* options[] = {"shortBitmap", "mediumBitmap", "longBitmap"}; + static const char* options[] = {"shortBitmap", "mediumBitmap", "longBitmap"}; return convert_enum_idx(options, 3, value, "ssb_to_measure_c::types"); } @@ -1907,82 +1944,82 @@ SRSASN_CODE search_space_s::monitoring_slot_periodicity_and_offset_c_::unpack(cb std::string search_space_s::monitoring_slot_periodicity_and_offset_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sl1", - "sl2", - "sl4", - "sl5", - "sl8", - "sl10", - "sl16", - "sl20", - "sl40", - "sl80", - "sl160", - "sl320", - "sl640", - "sl1280", - "sl2560"}; + static const char* options[] = {"sl1", + "sl2", + "sl4", + "sl5", + "sl8", + "sl10", + "sl16", + "sl20", + "sl40", + "sl80", + "sl160", + "sl320", + "sl640", + "sl1280", + "sl2560"}; return convert_enum_idx(options, 15, value, "search_space_s::monitoring_slot_periodicity_and_offset_c_::types"); } uint16_t search_space_s::monitoring_slot_periodicity_and_offset_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 4, 5, 8, 10, 16, 20, 40, 80, 160, 320, 640, 1280, 2560}; - return convert_enum_idx(options, 15, value, "search_space_s::monitoring_slot_periodicity_and_offset_c_::types"); + static const uint16_t options[] = {1, 2, 4, 5, 8, 10, 16, 20, 40, 80, 160, 320, 640, 1280, 2560}; + return map_enum_number(options, 15, value, "search_space_s::monitoring_slot_periodicity_and_offset_c_::types"); } std::string search_space_s::nrof_candidates_s_::aggregation_level1_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; + static const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; return convert_enum_idx(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level1_e_"); } uint8_t search_space_s::nrof_candidates_s_::aggregation_level1_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8}; - return convert_enum_idx(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level1_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8}; + return map_enum_number(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level1_e_"); } std::string search_space_s::nrof_candidates_s_::aggregation_level2_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; + static const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; return convert_enum_idx(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level2_e_"); } uint8_t search_space_s::nrof_candidates_s_::aggregation_level2_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8}; - return convert_enum_idx(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level2_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8}; + return map_enum_number(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level2_e_"); } std::string search_space_s::nrof_candidates_s_::aggregation_level4_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; + static const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; return convert_enum_idx(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level4_e_"); } uint8_t search_space_s::nrof_candidates_s_::aggregation_level4_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8}; - return convert_enum_idx(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level4_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8}; + return map_enum_number(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level4_e_"); } std::string search_space_s::nrof_candidates_s_::aggregation_level8_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; + static const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; return convert_enum_idx(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level8_e_"); } uint8_t search_space_s::nrof_candidates_s_::aggregation_level8_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8}; - return convert_enum_idx(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level8_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8}; + return map_enum_number(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level8_e_"); } std::string search_space_s::nrof_candidates_s_::aggregation_level16_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; + static const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; return convert_enum_idx(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level16_e_"); } uint8_t search_space_s::nrof_candidates_s_::aggregation_level16_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8}; - return convert_enum_idx(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level16_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8}; + return map_enum_number(options, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level16_e_"); } void search_space_s::search_space_type_c_::destroy_() @@ -2259,7 +2296,7 @@ SRSASN_CODE search_space_s::search_space_type_c_::unpack(cbit_ref& bref) std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_s_:: aggregation_level1_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2"}; + static const char* options[] = {"n1", "n2"}; return convert_enum_idx(options, 2, value, @@ -2269,18 +2306,18 @@ std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_ uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_s_:: aggregation_level1_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_" - "s_::aggregation_level1_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_" + "s_::aggregation_level1_e_"); } std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_s_:: aggregation_level2_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2"}; + static const char* options[] = {"n1", "n2"}; return convert_enum_idx(options, 2, value, @@ -2290,18 +2327,18 @@ std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_ uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_s_:: aggregation_level2_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_" - "s_::aggregation_level2_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_" + "s_::aggregation_level2_e_"); } std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_s_:: aggregation_level4_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2"}; + static const char* options[] = {"n1", "n2"}; return convert_enum_idx(options, 2, value, @@ -2311,18 +2348,18 @@ std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_ uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_s_:: aggregation_level4_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_" - "s_::aggregation_level4_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_" + "s_::aggregation_level4_e_"); } std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_s_:: aggregation_level8_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2"}; + static const char* options[] = {"n1", "n2"}; return convert_enum_idx(options, 2, value, @@ -2332,18 +2369,18 @@ std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_ uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_s_:: aggregation_level8_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_" - "s_::aggregation_level8_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_" + "s_::aggregation_level8_e_"); } std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_s_:: aggregation_level16_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2"}; + static const char* options[] = {"n1", "n2"}; return convert_enum_idx(options, 2, value, @@ -2353,49 +2390,49 @@ std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_ uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_s_:: aggregation_level16_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_" - "s_::aggregation_level16_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_minus0_s_::nrof_candidates_sfi_" + "s_::aggregation_level16_e_"); } std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus3_s_::dummy1_opts::to_string() const { - static constexpr const char* options[] = {"sl1", "sl2", "sl4", "sl5", "sl8", "sl10", "sl16", "sl20"}; + static const char* options[] = {"sl1", "sl2", "sl4", "sl5", "sl8", "sl10", "sl16", "sl20"}; return convert_enum_idx( options, 8, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_minus3_s_::dummy1_e_"); } uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_minus3_s_::dummy1_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 5, 8, 10, 16, 20}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4, 5, 8, 10, 16, 20}; + return map_enum_number( options, 8, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_minus3_s_::dummy1_e_"); } std::string search_space_s::search_space_type_c_::common_s_::dci_format2_minus3_s_::dummy2_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2"}; + static const char* options[] = {"n1", "n2"}; return convert_enum_idx( options, 2, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_minus3_s_::dummy2_e_"); } uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_minus3_s_::dummy2_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2}; + return map_enum_number( options, 2, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_minus3_s_::dummy2_e_"); } std::string search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_opts::to_string() const { - static constexpr const char* options[] = {"formats0-0-And-1-0", "formats0-1-And-1-1"}; + static const char* options[] = {"formats0-0-And-1-0", "formats0-1-And-1-1"}; return convert_enum_idx(options, 2, value, "search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_e_"); } std::string search_space_s::search_space_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"common", "ue-Specific"}; + static const char* options[] = {"common", "ue-Specific"}; return convert_enum_idx(options, 2, value, "search_space_s::search_space_type_c_::types"); } @@ -2424,47 +2461,46 @@ void speed_state_scale_factors_s::to_json(json_writer& j) const std::string speed_state_scale_factors_s::sf_medium_opts::to_string() const { - static constexpr const char* options[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; + static const char* options[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); } float speed_state_scale_factors_s::sf_medium_opts::to_number() const { - static constexpr float options[] = {0.25, 0.5, 0.75, 1.0}; - return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); + static const float options[] = {0.25, 0.5, 0.75, 1.0}; + return map_enum_number(options, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); } std::string speed_state_scale_factors_s::sf_medium_opts::to_number_string() const { - static constexpr const char* options[] = {"0.25", "0.5", "0.75", "1.0"}; + static const char* options[] = {"0.25", "0.5", "0.75", "1.0"}; return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); } std::string speed_state_scale_factors_s::sf_high_opts::to_string() const { - static constexpr const char* options[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; + static const char* options[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_high_e_"); } float speed_state_scale_factors_s::sf_high_opts::to_number() const { - static constexpr float options[] = {0.25, 0.5, 0.75, 1.0}; - return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_high_e_"); + static const float options[] = {0.25, 0.5, 0.75, 1.0}; + return map_enum_number(options, 4, value, "speed_state_scale_factors_s::sf_high_e_"); } std::string speed_state_scale_factors_s::sf_high_opts::to_number_string() const { - static constexpr const char* options[] = {"0.25", "0.5", "0.75", "1.0"}; + static const char* options[] = {"0.25", "0.5", "0.75", "1.0"}; return convert_enum_idx(options, 4, value, "speed_state_scale_factors_s::sf_high_e_"); } // SubcarrierSpacing ::= ENUMERATED std::string subcarrier_spacing_opts::to_string() const { - static constexpr const char* options[] = { - "kHz15", "kHz30", "kHz60", "kHz120", "kHz240", "spare3", "spare2", "spare1"}; + static const char* options[] = {"kHz15", "kHz30", "kHz60", "kHz120", "kHz240", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "subcarrier_spacing_e"); } uint8_t subcarrier_spacing_opts::to_number() const { - static constexpr uint8_t options[] = {15, 30, 60, 120, 240}; - return convert_enum_idx(options, 5, value, "subcarrier_spacing_e"); + static const uint8_t options[] = {15, 30, 60, 120, 240}; + return map_enum_number(options, 5, value, "subcarrier_spacing_e"); } // ThresholdNR ::= SEQUENCE @@ -2634,22 +2670,22 @@ void carrier_freq_eutra_s::to_json(json_writer& j) const j.write_int("carrierFreq", carrier_freq); if (eutra_multi_band_info_list_present) { j.start_array("eutra-multiBandInfoList"); - for (uint32_t i1 = 0; i1 < eutra_multi_band_info_list.size(); ++i1) { - eutra_multi_band_info_list[i1].to_json(j); + for (const auto& e1 : eutra_multi_band_info_list) { + e1.to_json(j); } j.end_array(); } if (eutra_freq_neigh_cell_list_present) { j.start_array("eutra-FreqNeighCellList"); - for (uint32_t i1 = 0; i1 < eutra_freq_neigh_cell_list.size(); ++i1) { - eutra_freq_neigh_cell_list[i1].to_json(j); + for (const auto& e1 : eutra_freq_neigh_cell_list) { + e1.to_json(j); } j.end_array(); } if (eutra_black_cell_list_present) { j.start_array("eutra-BlackCellList"); - for (uint32_t i1 = 0; i1 < eutra_black_cell_list.size(); ++i1) { - eutra_black_cell_list[i1].to_json(j); + for (const auto& e1 : eutra_black_cell_list) { + e1.to_json(j); } j.end_array(); } @@ -2849,15 +2885,15 @@ void inter_freq_carrier_freq_info_s::to_json(json_writer& j) const j.write_int("dl-CarrierFreq", dl_carrier_freq); if (freq_band_list_present) { j.start_array("frequencyBandList"); - for (uint32_t i1 = 0; i1 < freq_band_list.size(); ++i1) { - freq_band_list[i1].to_json(j); + for (const auto& e1 : freq_band_list) { + e1.to_json(j); } j.end_array(); } if (freq_band_list_sul_present) { j.start_array("frequencyBandListSUL"); - for (uint32_t i1 = 0; i1 < freq_band_list_sul.size(); ++i1) { - freq_band_list_sul[i1].to_json(j); + for (const auto& e1 : freq_band_list_sul) { + e1.to_json(j); } j.end_array(); } @@ -2917,15 +2953,15 @@ void inter_freq_carrier_freq_info_s::to_json(json_writer& j) const } if (inter_freq_neigh_cell_list_present) { j.start_array("interFreqNeighCellList"); - for (uint32_t i1 = 0; i1 < inter_freq_neigh_cell_list.size(); ++i1) { - inter_freq_neigh_cell_list[i1].to_json(j); + for (const auto& e1 : inter_freq_neigh_cell_list) { + e1.to_json(j); } j.end_array(); } if (inter_freq_black_cell_list_present) { j.start_array("interFreqBlackCellList"); - for (uint32_t i1 = 0; i1 < inter_freq_black_cell_list.size(); ++i1) { - inter_freq_black_cell_list[i1].to_json(j); + for (const auto& e1 : inter_freq_black_cell_list) { + e1.to_json(j); } j.end_array(); } @@ -3115,8 +3151,8 @@ void pdcch_cfg_common_s::to_json(json_writer& j) const } if (common_search_space_list_present) { j.start_array("commonSearchSpaceList"); - for (uint32_t i1 = 0; i1 < common_search_space_list.size(); ++i1) { - common_search_space_list[i1].to_json(j); + for (const auto& e1 : common_search_space_list) { + e1.to_json(j); } j.end_array(); } @@ -3289,65 +3325,58 @@ void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::to_json(json_ switch (type_) { case types::scs15_kh_zone_t: j.start_array("sCS15KHZoneT"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs30_kh_zone_t_scs15_kh_zhalf_t: j.start_array("sCS30KHZoneT-SCS15KHZhalfT"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: j.start_array("sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: j.start_array("sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT"); - for (uint32_t i1 = 0; - i1 < c.get().size(); - ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: j.start_array("sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT"); - for (uint32_t i1 = 0; - i1 < - c.get().size(); - ++i1) { - j.write_int( - c.get()[i1]); + for (const auto& e1 : + c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: j.start_array("sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT"); - for (uint32_t i1 = 0; - i1 < c.get().size(); - ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: j.start_array("sCS120KHZoneEighthT-SCS60KHZoneSixteenthT"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs120_kh_zone_sixteenth_t: j.start_array("sCS120KHZoneSixteenthT"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; @@ -3477,14 +3506,14 @@ SRSASN_CODE pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::unpack std::string pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sCS15KHZoneT", - "sCS30KHZoneT-SCS15KHZhalfT", - "sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT", - "sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT", - "sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT", - "sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT", - "sCS120KHZoneEighthT-SCS60KHZoneSixteenthT", - "sCS120KHZoneSixteenthT"}; + static const char* options[] = {"sCS15KHZoneT", + "sCS30KHZoneT-SCS15KHZhalfT", + "sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT", + "sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT", + "sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT", + "sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT", + "sCS120KHZoneEighthT-SCS60KHZoneSixteenthT", + "sCS120KHZoneSixteenthT"}; return convert_enum_idx(options, 8, value, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::types"); } @@ -3516,8 +3545,8 @@ void pdsch_cfg_common_s::to_json(json_writer& j) const j.start_obj(); if (pdsch_time_domain_alloc_list_present) { j.start_array("pdsch-TimeDomainAllocationList"); - for (uint32_t i1 = 0; i1 < pdsch_time_domain_alloc_list.size(); ++i1) { - pdsch_time_domain_alloc_list[i1].to_json(j); + for (const auto& e1 : pdsch_time_domain_alloc_list) { + e1.to_json(j); } j.end_array(); } @@ -3552,14 +3581,14 @@ void plmn_id_s::to_json(json_writer& j) const j.start_obj(); if (mcc_present) { j.start_array("mcc"); - for (uint32_t i1 = 0; i1 < mcc.size(); ++i1) { - j.write_int(mcc[i1]); + for (const auto& e1 : mcc) { + j.write_int(e1); } j.end_array(); } j.start_array("mnc"); - for (uint32_t i1 = 0; i1 < mnc.size(); ++i1) { - j.write_int(mnc[i1]); + for (const auto& e1 : mnc) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -3624,7 +3653,7 @@ void pucch_cfg_common_s::to_json(json_writer& j) const std::string pucch_cfg_common_s::pucch_group_hop_opts::to_string() const { - static constexpr const char* options[] = {"neither", "enable", "disable"}; + static const char* options[] = {"neither", "enable", "disable"}; return convert_enum_idx(options, 3, value, "pucch_cfg_common_s::pucch_group_hop_e_"); } @@ -3677,8 +3706,8 @@ void pusch_cfg_common_s::to_json(json_writer& j) const } if (pusch_time_domain_alloc_list_present) { j.start_array("pusch-TimeDomainAllocationList"); - for (uint32_t i1 = 0; i1 < pusch_time_domain_alloc_list.size(); ++i1) { - pusch_time_domain_alloc_list[i1].to_json(j); + for (const auto& e1 : pusch_time_domain_alloc_list) { + e1.to_json(j); } j.end_array(); } @@ -3694,13 +3723,13 @@ void pusch_cfg_common_s::to_json(json_writer& j) const // PagingCycle ::= ENUMERATED std::string paging_cycle_opts::to_string() const { - static constexpr const char* options[] = {"rf32", "rf64", "rf128", "rf256"}; + static const char* options[] = {"rf32", "rf64", "rf128", "rf256"}; return convert_enum_idx(options, 4, value, "paging_cycle_e"); } uint16_t paging_cycle_opts::to_number() const { - static constexpr uint16_t options[] = {32, 64, 128, 256}; - return convert_enum_idx(options, 4, value, "paging_cycle_e"); + static const uint16_t options[] = {32, 64, 128, 256}; + return map_enum_number(options, 4, value, "paging_cycle_e"); } // RACH-ConfigCommon ::= SEQUENCE @@ -4007,139 +4036,138 @@ SRSASN_CODE rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_:: std::string rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; return convert_enum_idx( options, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_e_"); } uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return convert_enum_idx( + static const uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( options, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_e_"); } std::string rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; return convert_enum_idx( options, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_e_"); } uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return convert_enum_idx( + static const uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( options, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_e_"); } std::string rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; return convert_enum_idx( options, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_e_"); } uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return convert_enum_idx( + static const uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( options, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_e_"); } std::string rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; return convert_enum_idx( options, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_e_"); } uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return convert_enum_idx( + static const uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( options, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_e_"); } std::string rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32"}; + static const char* options[] = {"n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32"}; return convert_enum_idx( options, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_e_"); } uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32}; - return convert_enum_idx( + static const uint8_t options[] = {4, 8, 12, 16, 20, 24, 28, 32}; + return map_enum_number( options, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_e_"); } std::string rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types_opts::to_string() const { - static constexpr const char* options[] = { - "oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; + static const char* options[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; return convert_enum_idx( options, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types"); } float rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types_opts::to_number() const { - static constexpr float options[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; - return convert_enum_idx( + static const float options[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; + return map_enum_number( options, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types"); } std::string rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types_opts::to_number_string() const { - static constexpr const char* options[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; + static const char* options[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; return convert_enum_idx( options, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types"); } std::string rach_cfg_common_s::group_bcfgured_s_::ra_msg3_size_group_a_opts::to_string() const { - static constexpr const char* options[] = {"b56", - "b144", - "b208", - "b256", - "b282", - "b480", - "b640", - "b800", - "b1000", - "b72", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"b56", + "b144", + "b208", + "b256", + "b282", + "b480", + "b640", + "b800", + "b1000", + "b72", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "rach_cfg_common_s::group_bcfgured_s_::ra_msg3_size_group_a_e_"); } uint16_t rach_cfg_common_s::group_bcfgured_s_::ra_msg3_size_group_a_opts::to_number() const { - static constexpr uint16_t options[] = {56, 144, 208, 256, 282, 480, 640, 800, 1000, 72}; - return convert_enum_idx(options, 10, value, "rach_cfg_common_s::group_bcfgured_s_::ra_msg3_size_group_a_e_"); + static const uint16_t options[] = {56, 144, 208, 256, 282, 480, 640, 800, 1000, 72}; + return map_enum_number(options, 10, value, "rach_cfg_common_s::group_bcfgured_s_::ra_msg3_size_group_a_e_"); } std::string rach_cfg_common_s::group_bcfgured_s_::msg_pwr_offset_group_b_opts::to_string() const { - static constexpr const char* options[] = {"minusinfinity", "dB0", "dB5", "dB8", "dB10", "dB12", "dB15", "dB18"}; + static const char* options[] = {"minusinfinity", "dB0", "dB5", "dB8", "dB10", "dB12", "dB15", "dB18"}; return convert_enum_idx(options, 8, value, "rach_cfg_common_s::group_bcfgured_s_::msg_pwr_offset_group_b_e_"); } int8_t rach_cfg_common_s::group_bcfgured_s_::msg_pwr_offset_group_b_opts::to_number() const { - static constexpr int8_t options[] = {-1, 0, 5, 8, 10, 12, 15, 18}; - return convert_enum_idx(options, 8, value, "rach_cfg_common_s::group_bcfgured_s_::msg_pwr_offset_group_b_e_"); + static const int8_t options[] = {-1, 0, 5, 8, 10, 12, 15, 18}; + return map_enum_number(options, 8, value, "rach_cfg_common_s::group_bcfgured_s_::msg_pwr_offset_group_b_e_"); } std::string rach_cfg_common_s::ra_contention_resolution_timer_opts::to_string() const { - static constexpr const char* options[] = {"sf8", "sf16", "sf24", "sf32", "sf40", "sf48", "sf56", "sf64"}; + static const char* options[] = {"sf8", "sf16", "sf24", "sf32", "sf40", "sf48", "sf56", "sf64"}; return convert_enum_idx(options, 8, value, "rach_cfg_common_s::ra_contention_resolution_timer_e_"); } uint8_t rach_cfg_common_s::ra_contention_resolution_timer_opts::to_number() const { - static constexpr uint8_t options[] = {8, 16, 24, 32, 40, 48, 56, 64}; - return convert_enum_idx(options, 8, value, "rach_cfg_common_s::ra_contention_resolution_timer_e_"); + static const uint8_t options[] = {8, 16, 24, 32, 40, 48, 56, 64}; + return map_enum_number(options, 8, value, "rach_cfg_common_s::ra_contention_resolution_timer_e_"); } void rach_cfg_common_s::prach_root_seq_idx_c_::destroy_() {} @@ -4238,18 +4266,18 @@ SRSASN_CODE rach_cfg_common_s::prach_root_seq_idx_c_::unpack(cbit_ref& bref) std::string rach_cfg_common_s::prach_root_seq_idx_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"l839", "l139"}; + static const char* options[] = {"l839", "l139"}; return convert_enum_idx(options, 2, value, "rach_cfg_common_s::prach_root_seq_idx_c_::types"); } uint16_t rach_cfg_common_s::prach_root_seq_idx_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {839, 139}; - return convert_enum_idx(options, 2, value, "rach_cfg_common_s::prach_root_seq_idx_c_::types"); + static const uint16_t options[] = {839, 139}; + return map_enum_number(options, 2, value, "rach_cfg_common_s::prach_root_seq_idx_c_::types"); } std::string rach_cfg_common_s::restricted_set_cfg_opts::to_string() const { - static constexpr const char* options[] = {"unrestrictedSet", "restrictedSetTypeA", "restrictedSetTypeB"}; + static const char* options[] = {"unrestrictedSet", "restrictedSetTypeA", "restrictedSetTypeB"}; return convert_enum_idx(options, 3, value, "rach_cfg_common_s::restricted_set_cfg_e_"); } @@ -4353,28 +4381,28 @@ void sib_type_info_s::to_json(json_writer& j) const std::string sib_type_info_s::type_opts::to_string() const { - static constexpr const char* options[] = {"sibType2", - "sibType3", - "sibType4", - "sibType5", - "sibType6", - "sibType7", - "sibType8", - "sibType9", - "spare8", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"sibType2", + "sibType3", + "sibType4", + "sibType5", + "sibType6", + "sibType7", + "sibType8", + "sibType9", + "spare8", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "sib_type_info_s::type_e_"); } uint8_t sib_type_info_s::type_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4, 5, 6, 7, 8, 9}; - return convert_enum_idx(options, 8, value, "sib_type_info_s::type_e_"); + static const uint8_t options[] = {2, 3, 4, 5, 6, 7, 8, 9}; + return map_enum_number(options, 8, value, "sib_type_info_s::type_e_"); } // SetupRelease{ElementTypeParam} ::= CHOICE @@ -4435,7 +4463,7 @@ SRSASN_CODE setup_release_c::unpack(cbit_ref& bref) template std::string setup_release_c::types_opts::to_string() const { - static constexpr const char* options[] = {"release", "setup"}; + static const char* options[] = {"release", "setup"}; return convert_enum_idx(options, 2, value, "setup_release_c::types"); } @@ -4486,13 +4514,13 @@ void bcch_cfg_s::to_json(json_writer& j) const std::string bcch_cfg_s::mod_period_coeff_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n8", "n16"}; + static const char* options[] = {"n2", "n4", "n8", "n16"}; return convert_enum_idx(options, 4, value, "bcch_cfg_s::mod_period_coeff_e_"); } uint8_t bcch_cfg_s::mod_period_coeff_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8, 16}; - return convert_enum_idx(options, 4, value, "bcch_cfg_s::mod_period_coeff_e_"); + static const uint8_t options[] = {2, 4, 8, 16}; + return map_enum_number(options, 4, value, "bcch_cfg_s::mod_period_coeff_e_"); } // BWP-DownlinkCommon ::= SEQUENCE @@ -4626,14 +4654,14 @@ void freq_info_dl_sib_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("frequencyBandList"); - for (uint32_t i1 = 0; i1 < freq_band_list.size(); ++i1) { - freq_band_list[i1].to_json(j); + for (const auto& e1 : freq_band_list) { + e1.to_json(j); } j.end_array(); j.write_int("offsetToPointA", offset_to_point_a); j.start_array("scs-SpecificCarrierList"); - for (uint32_t i1 = 0; i1 < scs_specific_carrier_list.size(); ++i1) { - scs_specific_carrier_list[i1].to_json(j); + for (const auto& e1 : scs_specific_carrier_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -4687,8 +4715,8 @@ void freq_info_ul_sib_s::to_json(json_writer& j) const j.start_obj(); if (freq_band_list_present) { j.start_array("frequencyBandList"); - for (uint32_t i1 = 0; i1 < freq_band_list.size(); ++i1) { - freq_band_list[i1].to_json(j); + for (const auto& e1 : freq_band_list) { + e1.to_json(j); } j.end_array(); } @@ -4696,8 +4724,8 @@ void freq_info_ul_sib_s::to_json(json_writer& j) const j.write_int("absoluteFrequencyPointA", absolute_freq_point_a); } j.start_array("scs-SpecificCarrierList"); - for (uint32_t i1 = 0; i1 < scs_specific_carrier_list.size(); ++i1) { - scs_specific_carrier_list[i1].to_json(j); + for (const auto& e1 : scs_specific_carrier_list) { + e1.to_json(j); } j.end_array(); if (p_max_present) { @@ -4740,24 +4768,24 @@ void mob_state_params_s::to_json(json_writer& j) const std::string mob_state_params_s::t_eval_opts::to_string() const { - static constexpr const char* options[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; + static const char* options[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "mob_state_params_s::t_eval_e_"); } uint8_t mob_state_params_s::t_eval_opts::to_number() const { - static constexpr uint8_t options[] = {30, 60, 120, 180, 240}; - return convert_enum_idx(options, 5, value, "mob_state_params_s::t_eval_e_"); + static const uint8_t options[] = {30, 60, 120, 180, 240}; + return map_enum_number(options, 5, value, "mob_state_params_s::t_eval_e_"); } std::string mob_state_params_s::t_hyst_normal_opts::to_string() const { - static constexpr const char* options[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; + static const char* options[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "mob_state_params_s::t_hyst_normal_e_"); } uint8_t mob_state_params_s::t_hyst_normal_opts::to_number() const { - static constexpr uint8_t options[] = {30, 60, 120, 180, 240}; - return convert_enum_idx(options, 5, value, "mob_state_params_s::t_hyst_normal_e_"); + static const uint8_t options[] = {30, 60, 120, 180, 240}; + return map_enum_number(options, 5, value, "mob_state_params_s::t_hyst_normal_e_"); } // PCCH-Config ::= SEQUENCE @@ -4940,29 +4968,29 @@ SRSASN_CODE pcch_cfg_s::nand_paging_frame_offset_c_::unpack(cbit_ref& bref) std::string pcch_cfg_s::nand_paging_frame_offset_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"oneT", "halfT", "quarterT", "oneEighthT", "oneSixteenthT"}; + static const char* options[] = {"oneT", "halfT", "quarterT", "oneEighthT", "oneSixteenthT"}; return convert_enum_idx(options, 5, value, "pcch_cfg_s::nand_paging_frame_offset_c_::types"); } float pcch_cfg_s::nand_paging_frame_offset_c_::types_opts::to_number() const { - static constexpr float options[] = {1.0, 0.5, 0.25, 0.125, 0.0625}; - return convert_enum_idx(options, 5, value, "pcch_cfg_s::nand_paging_frame_offset_c_::types"); + static const float options[] = {1.0, 0.5, 0.25, 0.125, 0.0625}; + return map_enum_number(options, 5, value, "pcch_cfg_s::nand_paging_frame_offset_c_::types"); } std::string pcch_cfg_s::nand_paging_frame_offset_c_::types_opts::to_number_string() const { - static constexpr const char* options[] = {"1", "0.5", "0.25", "1/8", "1/16"}; + static const char* options[] = {"1", "0.5", "0.25", "1/8", "1/16"}; return convert_enum_idx(options, 5, value, "pcch_cfg_s::nand_paging_frame_offset_c_::types"); } std::string pcch_cfg_s::ns_opts::to_string() const { - static constexpr const char* options[] = {"four", "two", "one"}; + static const char* options[] = {"four", "two", "one"}; return convert_enum_idx(options, 3, value, "pcch_cfg_s::ns_e_"); } uint8_t pcch_cfg_s::ns_opts::to_number() const { - static constexpr uint8_t options[] = {4, 2, 1}; - return convert_enum_idx(options, 3, value, "pcch_cfg_s::ns_e_"); + static const uint8_t options[] = {4, 2, 1}; + return map_enum_number(options, 3, value, "pcch_cfg_s::ns_e_"); } void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::destroy_() @@ -5112,65 +5140,58 @@ void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::to_json(json_writer& switch (type_) { case types::scs15_kh_zone_t: j.start_array("sCS15KHZoneT"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs30_kh_zone_t_scs15_kh_zhalf_t: j.start_array("sCS30KHZoneT-SCS15KHZhalfT"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: j.start_array("sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: j.start_array("sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT"); - for (uint32_t i1 = 0; - i1 < c.get().size(); - ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: j.start_array("sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT"); - for (uint32_t i1 = 0; - i1 < - c.get().size(); - ++i1) { - j.write_int( - c.get()[i1]); + for (const auto& e1 : + c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: j.start_array("sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT"); - for (uint32_t i1 = 0; - i1 < c.get().size(); - ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: j.start_array("sCS120KHZoneEighthT-SCS60KHZoneSixteenthT"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::scs120_kh_zone_sixteenth_t: j.start_array("sCS120KHZoneSixteenthT"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; @@ -5300,14 +5321,14 @@ SRSASN_CODE pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::unpack(cbit_re std::string pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sCS15KHZoneT", - "sCS30KHZoneT-SCS15KHZhalfT", - "sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT", - "sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT", - "sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT", - "sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT", - "sCS120KHZoneEighthT-SCS60KHZoneSixteenthT", - "sCS120KHZoneSixteenthT"}; + static const char* options[] = {"sCS15KHZoneT", + "sCS30KHZoneT-SCS15KHZhalfT", + "sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT", + "sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT", + "sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT", + "sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT", + "sCS120KHZoneEighthT-SCS60KHZoneSixteenthT", + "sCS120KHZoneSixteenthT"}; return convert_enum_idx(options, 8, value, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::types"); } @@ -5352,8 +5373,8 @@ void plmn_id_info_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("plmn-IdentityList"); - for (uint32_t i1 = 0; i1 < plmn_id_list.size(); ++i1) { - plmn_id_list[i1].to_json(j); + for (const auto& e1 : plmn_id_list) { + e1.to_json(j); } j.end_array(); if (tac_present) { @@ -5369,7 +5390,7 @@ void plmn_id_info_s::to_json(json_writer& j) const std::string plmn_id_info_s::cell_reserved_for_oper_opts::to_string() const { - static constexpr const char* options[] = {"reserved", "notReserved"}; + static const char* options[] = {"reserved", "notReserved"}; return convert_enum_idx(options, 2, value, "plmn_id_info_s::cell_reserved_for_oper_e_"); } @@ -5485,32 +5506,31 @@ void tdd_ul_dl_pattern_s::to_json(json_writer& j) const std::string tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_opts::to_string() const { - static constexpr const char* options[] = {"ms0p5", "ms0p625", "ms1", "ms1p25", "ms2", "ms2p5", "ms5", "ms10"}; + static const char* options[] = {"ms0p5", "ms0p625", "ms1", "ms1p25", "ms2", "ms2p5", "ms5", "ms10"}; return convert_enum_idx(options, 8, value, "tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_e_"); } std::string tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_opts::to_string() const { - static constexpr const char* options[] = {"ms3", "ms4"}; + static const char* options[] = {"ms3", "ms4"}; return convert_enum_idx(options, 2, value, "tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_e_"); } uint8_t tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_opts::to_number() const { - static constexpr uint8_t options[] = {3, 4}; - return convert_enum_idx(options, 2, value, "tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_e_"); + static const uint8_t options[] = {3, 4}; + return map_enum_number(options, 2, value, "tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_e_"); } // TimeAlignmentTimer ::= ENUMERATED std::string time_align_timer_opts::to_string() const { - static constexpr const char* options[] = { - "ms500", "ms750", "ms1280", "ms1920", "ms2560", "ms5120", "ms10240", "infinity"}; + static const char* options[] = {"ms500", "ms750", "ms1280", "ms1920", "ms2560", "ms5120", "ms10240", "infinity"}; return convert_enum_idx(options, 8, value, "time_align_timer_e"); } int16_t time_align_timer_opts::to_number() const { - static constexpr int16_t options[] = {500, 750, 1280, 1920, 2560, 5120, 10240, -1}; - return convert_enum_idx(options, 8, value, "time_align_timer_e"); + static const int16_t options[] = {500, 750, 1280, 1920, 2560, 5120, 10240, -1}; + return map_enum_number(options, 8, value, "time_align_timer_e"); } // DownlinkConfigCommonSIB ::= SEQUENCE @@ -5596,8 +5616,8 @@ void si_request_cfg_s::to_json(json_writer& j) const j.write_str("si-RequestPeriod", si_request_period.to_string()); } j.start_array("si-RequestResources"); - for (uint32_t i1 = 0; i1 < si_request_res.size(); ++i1) { - si_request_res[i1].to_json(j); + for (const auto& e1 : si_request_res) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -5605,24 +5625,23 @@ void si_request_cfg_s::to_json(json_writer& j) const std::string si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_opts::to_string() const { - static constexpr const char* options[] = { - "oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; + static const char* options[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; return convert_enum_idx(options, 8, value, "si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_e_"); } float si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_opts::to_number() const { - static constexpr float options[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; - return convert_enum_idx(options, 8, value, "si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_e_"); + static const float options[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; + return map_enum_number(options, 8, value, "si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_e_"); } std::string si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_opts::to_number_string() const { - static constexpr const char* options[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; + static const char* options[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; return convert_enum_idx(options, 8, value, "si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_e_"); } std::string si_request_cfg_s::si_request_period_opts::to_string() const { - static constexpr const char* options[] = {"one", "two", "four", "six", "eight", "ten", "twelve", "sixteen"}; + static const char* options[] = {"one", "two", "four", "six", "eight", "ten", "twelve", "sixteen"}; return convert_enum_idx(options, 8, value, "si_request_cfg_s::si_request_period_e_"); } @@ -5772,54 +5791,54 @@ void sib2_s::to_json(json_writer& j) const std::string sib2_s::cell_resel_info_common_s_::q_hyst_opts::to_string() const { - static constexpr const char* options[] = {"dB0", - "dB1", - "dB2", - "dB3", - "dB4", - "dB5", - "dB6", - "dB8", - "dB10", - "dB12", - "dB14", - "dB16", - "dB18", - "dB20", - "dB22", - "dB24"}; + static const char* options[] = {"dB0", + "dB1", + "dB2", + "dB3", + "dB4", + "dB5", + "dB6", + "dB8", + "dB10", + "dB12", + "dB14", + "dB16", + "dB18", + "dB20", + "dB22", + "dB24"}; return convert_enum_idx(options, 16, value, "sib2_s::cell_resel_info_common_s_::q_hyst_e_"); } uint8_t sib2_s::cell_resel_info_common_s_::q_hyst_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; - return convert_enum_idx(options, 16, value, "sib2_s::cell_resel_info_common_s_::q_hyst_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return map_enum_number(options, 16, value, "sib2_s::cell_resel_info_common_s_::q_hyst_e_"); } std::string sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_opts::to_string() const { - static constexpr const char* options[] = {"dB-6", "dB-4", "dB-2", "dB0"}; + static const char* options[] = {"dB-6", "dB-4", "dB-2", "dB0"}; return convert_enum_idx( options, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_e_"); } int8_t sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_opts::to_number() const { - static constexpr int8_t options[] = {-6, -4, -2, 0}; - return convert_enum_idx( + static const int8_t options[] = {-6, -4, -2, 0}; + return map_enum_number( options, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_e_"); } std::string sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_opts::to_string() const { - static constexpr const char* options[] = {"dB-6", "dB-4", "dB-2", "dB0"}; + static const char* options[] = {"dB-6", "dB-4", "dB-2", "dB0"}; return convert_enum_idx( options, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_"); } int8_t sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_opts::to_number() const { - static constexpr int8_t options[] = {-6, -4, -2, 0}; - return convert_enum_idx( + static const int8_t options[] = {-6, -4, -2, 0}; + return map_enum_number( options, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_"); } @@ -5963,15 +5982,15 @@ void sib2_s::intra_freq_cell_resel_info_s_::to_json(json_writer& j) const j.write_int("t-ReselectionNR", t_resel_nr); if (freq_band_list_present) { j.start_array("frequencyBandList"); - for (uint32_t i1 = 0; i1 < freq_band_list.size(); ++i1) { - freq_band_list[i1].to_json(j); + for (const auto& e1 : freq_band_list) { + e1.to_json(j); } j.end_array(); } if (freq_band_list_sul_present) { j.start_array("frequencyBandListSUL"); - for (uint32_t i1 = 0; i1 < freq_band_list_sul.size(); ++i1) { - freq_band_list_sul[i1].to_json(j); + for (const auto& e1 : freq_band_list_sul) { + e1.to_json(j); } j.end_array(); } @@ -6044,15 +6063,15 @@ void sib3_s::to_json(json_writer& j) const j.start_obj(); if (intra_freq_neigh_cell_list_present) { j.start_array("intraFreqNeighCellList"); - for (uint32_t i1 = 0; i1 < intra_freq_neigh_cell_list.size(); ++i1) { - intra_freq_neigh_cell_list[i1].to_json(j); + for (const auto& e1 : intra_freq_neigh_cell_list) { + e1.to_json(j); } j.end_array(); } if (intra_freq_black_cell_list_present) { j.start_array("intraFreqBlackCellList"); - for (uint32_t i1 = 0; i1 < intra_freq_black_cell_list.size(); ++i1) { - intra_freq_black_cell_list[i1].to_json(j); + for (const auto& e1 : intra_freq_black_cell_list) { + e1.to_json(j); } j.end_array(); } @@ -6091,8 +6110,8 @@ void sib4_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("interFreqCarrierFreqList"); - for (uint32_t i1 = 0; i1 < inter_freq_carrier_freq_list.size(); ++i1) { - inter_freq_carrier_freq_list[i1].to_json(j); + for (const auto& e1 : inter_freq_carrier_freq_list) { + e1.to_json(j); } j.end_array(); if (late_non_crit_ext_present) { @@ -6147,8 +6166,8 @@ void sib5_s::to_json(json_writer& j) const j.start_obj(); if (carrier_freq_list_eutra_present) { j.start_array("carrierFreqListEUTRA"); - for (uint32_t i1 = 0; i1 < carrier_freq_list_eutra.size(); ++i1) { - carrier_freq_list_eutra[i1].to_json(j); + for (const auto& e1 : carrier_freq_list_eutra) { + e1.to_json(j); } j.end_array(); } @@ -6264,7 +6283,7 @@ void sib7_s::to_json(json_writer& j) const std::string sib7_s::warning_msg_segment_type_opts::to_string() const { - static constexpr const char* options[] = {"notLastSegment", "lastSegment"}; + static const char* options[] = {"notLastSegment", "lastSegment"}; return convert_enum_idx(options, 2, value, "sib7_s::warning_msg_segment_type_e_"); } @@ -6339,7 +6358,7 @@ void sib8_s::to_json(json_writer& j) const std::string sib8_s::warning_msg_segment_type_opts::to_string() const { - static constexpr const char* options[] = {"notLastSegment", "lastSegment"}; + static const char* options[] = {"notLastSegment", "lastSegment"}; return convert_enum_idx(options, 2, value, "sib8_s::warning_msg_segment_type_e_"); } @@ -6445,8 +6464,8 @@ void sched_info_s::to_json(json_writer& j) const j.write_str("si-BroadcastStatus", si_broadcast_status.to_string()); j.write_str("si-Periodicity", si_periodicity.to_string()); j.start_array("sib-MappingInfo"); - for (uint32_t i1 = 0; i1 < sib_map_info.size(); ++i1) { - sib_map_info[i1].to_json(j); + for (const auto& e1 : sib_map_info) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -6454,19 +6473,19 @@ void sched_info_s::to_json(json_writer& j) const std::string sched_info_s::si_broadcast_status_opts::to_string() const { - static constexpr const char* options[] = {"broadcasting", "notBroadcasting"}; + static const char* options[] = {"broadcasting", "notBroadcasting"}; return convert_enum_idx(options, 2, value, "sched_info_s::si_broadcast_status_e_"); } std::string sched_info_s::si_periodicity_opts::to_string() const { - static constexpr const char* options[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; + static const char* options[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; return convert_enum_idx(options, 7, value, "sched_info_s::si_periodicity_e_"); } uint16_t sched_info_s::si_periodicity_opts::to_number() const { - static constexpr uint16_t options[] = {8, 16, 32, 64, 128, 256, 512}; - return convert_enum_idx(options, 7, value, "sched_info_s::si_periodicity_e_"); + static const uint16_t options[] = {8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(options, 7, value, "sched_info_s::si_periodicity_e_"); } // TDD-UL-DL-ConfigCommon ::= SEQUENCE @@ -6537,31 +6556,31 @@ void uac_barr_info_set_s::to_json(json_writer& j) const std::string uac_barr_info_set_s::uac_barr_factor_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "p00", "p05", "p10", "p15", "p20", "p25", "p30", "p40", "p50", "p60", "p70", "p75", "p80", "p85", "p90", "p95"}; return convert_enum_idx(options, 16, value, "uac_barr_info_set_s::uac_barr_factor_e_"); } float uac_barr_info_set_s::uac_barr_factor_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; - return convert_enum_idx(options, 16, value, "uac_barr_info_set_s::uac_barr_factor_e_"); + static const float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; + return map_enum_number(options, 16, value, "uac_barr_info_set_s::uac_barr_factor_e_"); } std::string uac_barr_info_set_s::uac_barr_factor_opts::to_number_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "0.0", "0.5", "1.0", "1.5", "2.0", "2.5", "3.0", "4.0", "5.0", "6.0", "7.0", "7.5", "8.0", "8.5", "9.0", "9.5"}; return convert_enum_idx(options, 16, value, "uac_barr_info_set_s::uac_barr_factor_e_"); } std::string uac_barr_info_set_s::uac_barr_time_opts::to_string() const { - static constexpr const char* options[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; + static const char* options[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; return convert_enum_idx(options, 8, value, "uac_barr_info_set_s::uac_barr_time_e_"); } uint16_t uac_barr_info_set_s::uac_barr_time_opts::to_number() const { - static constexpr uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; - return convert_enum_idx(options, 8, value, "uac_barr_info_set_s::uac_barr_time_e_"); + static const uint16_t options[] = {4, 8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(options, 8, value, "uac_barr_info_set_s::uac_barr_time_e_"); } // UAC-BarringPerPLMN ::= SEQUENCE @@ -6673,15 +6692,15 @@ void uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::to_json(json_writer& j) cons switch (type_) { case types::uac_implicit_ac_barr_list: j.start_array("uac-ImplicitACBarringList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; case types::uac_explicit_ac_barr_list: j.start_array("uac-ExplicitACBarringList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -6733,7 +6752,7 @@ SRSASN_CODE uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::unpack(cbit_ref& bref std::string uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"uac-ImplicitACBarringList", "uac-ExplicitACBarringList"}; + static const char* options[] = {"uac-ImplicitACBarringList", "uac-ExplicitACBarringList"}; return convert_enum_idx(options, 2, value, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::types"); } @@ -6788,8 +6807,8 @@ void cell_access_related_info_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("plmn-IdentityList"); - for (uint32_t i1 = 0; i1 < plmn_id_list.size(); ++i1) { - plmn_id_list[i1].to_json(j); + for (const auto& e1 : plmn_id_list) { + e1.to_json(j); } j.end_array(); if (cell_reserved_for_other_use_present) { @@ -6836,24 +6855,24 @@ void conn_est_fail_ctrl_s::to_json(json_writer& j) const std::string conn_est_fail_ctrl_s::conn_est_fail_count_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4"}; + static const char* options[] = {"n1", "n2", "n3", "n4"}; return convert_enum_idx(options, 4, value, "conn_est_fail_ctrl_s::conn_est_fail_count_e_"); } uint8_t conn_est_fail_ctrl_s::conn_est_fail_count_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4}; - return convert_enum_idx(options, 4, value, "conn_est_fail_ctrl_s::conn_est_fail_count_e_"); + static const uint8_t options[] = {1, 2, 3, 4}; + return map_enum_number(options, 4, value, "conn_est_fail_ctrl_s::conn_est_fail_count_e_"); } std::string conn_est_fail_ctrl_s::conn_est_fail_offset_validity_opts::to_string() const { - static constexpr const char* options[] = {"s30", "s60", "s120", "s240", "s300", "s420", "s600", "s900"}; + static const char* options[] = {"s30", "s60", "s120", "s240", "s300", "s420", "s600", "s900"}; return convert_enum_idx(options, 8, value, "conn_est_fail_ctrl_s::conn_est_fail_offset_validity_e_"); } uint16_t conn_est_fail_ctrl_s::conn_est_fail_offset_validity_opts::to_number() const { - static constexpr uint16_t options[] = {30, 60, 120, 240, 300, 420, 600, 900}; - return convert_enum_idx(options, 8, value, "conn_est_fail_ctrl_s::conn_est_fail_offset_validity_e_"); + static const uint16_t options[] = {30, 60, 120, 240, 300, 420, 600, 900}; + return map_enum_number(options, 8, value, "conn_est_fail_ctrl_s::conn_est_fail_offset_validity_e_"); } // SI-SchedulingInfo ::= SEQUENCE @@ -6903,8 +6922,8 @@ void si_sched_info_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("schedulingInfoList"); - for (uint32_t i1 = 0; i1 < sched_info_list.size(); ++i1) { - sched_info_list[i1].to_json(j); + for (const auto& e1 : sched_info_list) { + e1.to_json(j); } j.end_array(); j.write_str("si-WindowLength", si_win_len.to_string()); @@ -6924,13 +6943,13 @@ void si_sched_info_s::to_json(json_writer& j) const std::string si_sched_info_s::si_win_len_opts::to_string() const { - static constexpr const char* options[] = {"s5", "s10", "s20", "s40", "s80", "s160", "s320", "s640", "s1280"}; + static const char* options[] = {"s5", "s10", "s20", "s40", "s80", "s160", "s320", "s640", "s1280"}; return convert_enum_idx(options, 9, value, "si_sched_info_s::si_win_len_e_"); } uint16_t si_sched_info_s::si_win_len_opts::to_number() const { - static constexpr uint16_t options[] = {5, 10, 20, 40, 80, 160, 320, 640, 1280}; - return convert_enum_idx(options, 9, value, "si_sched_info_s::si_win_len_e_"); + static const uint16_t options[] = {5, 10, 20, 40, 80, 160, 320, 640, 1280}; + return map_enum_number(options, 9, value, "si_sched_info_s::si_win_len_e_"); } // ServingCellConfigCommonSIB ::= SEQUENCE @@ -7030,24 +7049,24 @@ void serving_cell_cfg_common_sib_s::to_json(json_writer& j) const std::string serving_cell_cfg_common_sib_s::n_timing_advance_offset_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n25600", "n39936"}; + static const char* options[] = {"n0", "n25600", "n39936"}; return convert_enum_idx(options, 3, value, "serving_cell_cfg_common_sib_s::n_timing_advance_offset_e_"); } uint16_t serving_cell_cfg_common_sib_s::n_timing_advance_offset_opts::to_number() const { - static constexpr uint16_t options[] = {0, 25600, 39936}; - return convert_enum_idx(options, 3, value, "serving_cell_cfg_common_sib_s::n_timing_advance_offset_e_"); + static const uint16_t options[] = {0, 25600, 39936}; + return map_enum_number(options, 3, value, "serving_cell_cfg_common_sib_s::n_timing_advance_offset_e_"); } std::string serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_opts::to_string() const { - static constexpr const char* options[] = {"ms5", "ms10", "ms20", "ms40", "ms80", "ms160"}; + static const char* options[] = {"ms5", "ms10", "ms20", "ms40", "ms80", "ms160"}; return convert_enum_idx(options, 6, value, "serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_e_"); } uint8_t serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 20, 40, 80, 160}; - return convert_enum_idx(options, 6, value, "serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_e_"); + static const uint8_t options[] = {5, 10, 20, 40, 80, 160}; + return map_enum_number(options, 6, value, "serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_e_"); } // SystemInformation-IEs ::= SEQUENCE @@ -7079,8 +7098,8 @@ void sys_info_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("sib-TypeAndInfo"); - for (uint32_t i1 = 0; i1 < sib_type_and_info.size(); ++i1) { - sib_type_and_info[i1].to_json(j); + for (const auto& e1 : sib_type_and_info) { + e1.to_json(j); } j.end_array(); if (late_non_crit_ext_present) { @@ -7349,19 +7368,19 @@ SRSASN_CODE sys_info_ies_s::sib_type_and_info_item_c_::unpack(cbit_ref& bref) std::string sys_info_ies_s::sib_type_and_info_item_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sib2", "sib3", "sib4", "sib5", "sib6", "sib7", "sib8", "sib9"}; + static const char* options[] = {"sib2", "sib3", "sib4", "sib5", "sib6", "sib7", "sib8", "sib9"}; return convert_enum_idx(options, 8, value, "sys_info_ies_s::sib_type_and_info_item_c_::types"); } uint8_t sys_info_ies_s::sib_type_and_info_item_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4, 5, 6, 7, 8, 9}; - return convert_enum_idx(options, 8, value, "sys_info_ies_s::sib_type_and_info_item_c_::types"); + static const uint8_t options[] = {2, 3, 4, 5, 6, 7, 8, 9}; + return map_enum_number(options, 8, value, "sys_info_ies_s::sib_type_and_info_item_c_::types"); } // UAC-AccessCategory1-SelectionAssistanceInfo ::= ENUMERATED std::string uac_access_category1_sel_assist_info_opts::to_string() const { - static constexpr const char* options[] = {"a", "b", "c"}; + static const char* options[] = {"a", "b", "c"}; return convert_enum_idx(options, 3, value, "uac_access_category1_sel_assist_info_e"); } @@ -7407,79 +7426,79 @@ void ue_timers_and_consts_s::to_json(json_writer& j) const std::string ue_timers_and_consts_s::t300_opts::to_string() const { - static constexpr const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + static const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t300_e_"); } uint16_t ue_timers_and_consts_s::t300_opts::to_number() const { - static constexpr uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t300_e_"); + static const uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::t300_e_"); } std::string ue_timers_and_consts_s::t301_opts::to_string() const { - static constexpr const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + static const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t301_e_"); } uint16_t ue_timers_and_consts_s::t301_opts::to_number() const { - static constexpr uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t301_e_"); + static const uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::t301_e_"); } std::string ue_timers_and_consts_s::t310_opts::to_string() const { - static constexpr const char* options[] = {"ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000"}; + static const char* options[] = {"ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000"}; return convert_enum_idx(options, 7, value, "ue_timers_and_consts_s::t310_e_"); } uint16_t ue_timers_and_consts_s::t310_opts::to_number() const { - static constexpr uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000}; - return convert_enum_idx(options, 7, value, "ue_timers_and_consts_s::t310_e_"); + static const uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000}; + return map_enum_number(options, 7, value, "ue_timers_and_consts_s::t310_e_"); } std::string ue_timers_and_consts_s::n310_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::n310_e_"); } uint8_t ue_timers_and_consts_s::n310_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::n310_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::n310_e_"); } std::string ue_timers_and_consts_s::t311_opts::to_string() const { - static constexpr const char* options[] = {"ms1000", "ms3000", "ms5000", "ms10000", "ms15000", "ms20000", "ms30000"}; + static const char* options[] = {"ms1000", "ms3000", "ms5000", "ms10000", "ms15000", "ms20000", "ms30000"}; return convert_enum_idx(options, 7, value, "ue_timers_and_consts_s::t311_e_"); } uint16_t ue_timers_and_consts_s::t311_opts::to_number() const { - static constexpr uint16_t options[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; - return convert_enum_idx(options, 7, value, "ue_timers_and_consts_s::t311_e_"); + static const uint16_t options[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; + return map_enum_number(options, 7, value, "ue_timers_and_consts_s::t311_e_"); } std::string ue_timers_and_consts_s::n311_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::n311_e_"); } uint8_t ue_timers_and_consts_s::n311_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::n311_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::n311_e_"); } std::string ue_timers_and_consts_s::t319_opts::to_string() const { - static constexpr const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + static const char* options[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t319_e_"); } uint16_t ue_timers_and_consts_s::t319_opts::to_number() const { - static constexpr uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return convert_enum_idx(options, 8, value, "ue_timers_and_consts_s::t319_e_"); + static const uint16_t options[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(options, 8, value, "ue_timers_and_consts_s::t319_e_"); } // SIB1 ::= SEQUENCE @@ -7667,21 +7686,21 @@ void sib1_s::to_json(json_writer& j) const j.start_obj(); if (uac_barr_info.uac_barr_for_common_present) { j.start_array("uac-BarringForCommon"); - for (uint32_t i1 = 0; i1 < uac_barr_info.uac_barr_for_common.size(); ++i1) { - uac_barr_info.uac_barr_for_common[i1].to_json(j); + for (const auto& e1 : uac_barr_info.uac_barr_for_common) { + e1.to_json(j); } j.end_array(); } if (uac_barr_info.uac_barr_per_plmn_list_present) { j.start_array("uac-BarringPerPLMN-List"); - for (uint32_t i1 = 0; i1 < uac_barr_info.uac_barr_per_plmn_list.size(); ++i1) { - uac_barr_info.uac_barr_per_plmn_list[i1].to_json(j); + for (const auto& e1 : uac_barr_info.uac_barr_per_plmn_list) { + e1.to_json(j); } j.end_array(); } j.start_array("uac-BarringInfoSetList"); - for (uint32_t i1 = 0; i1 < uac_barr_info.uac_barr_info_set_list.size(); ++i1) { - uac_barr_info.uac_barr_info_set_list[i1].to_json(j); + for (const auto& e1 : uac_barr_info.uac_barr_info_set_list) { + e1.to_json(j); } j.end_array(); if (uac_barr_info.uac_access_category1_sel_assist_info_present) { @@ -7779,8 +7798,8 @@ void sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::to_json( break; case types::individual_plmn_list: j.start_array("individualPLMNList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -7826,7 +7845,7 @@ SRSASN_CODE sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::u std::string sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"plmnCommon", "individualPLMNList"}; + static const char* options[] = {"plmnCommon", "individualPLMNList"}; return convert_enum_idx( options, 2, value, "sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::types"); } @@ -7963,7 +7982,7 @@ SRSASN_CODE sys_info_s::crit_exts_c_::unpack(cbit_ref& bref) std::string sys_info_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"systemInformation-r15", "criticalExtensionsFuture"}; + static const char* options[] = {"systemInformation-r15", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "sys_info_s::crit_exts_c_::types"); } @@ -8198,29 +8217,27 @@ SRSASN_CODE bcch_dl_sch_msg_type_c::c1_c_::unpack(cbit_ref& bref) std::string bcch_dl_sch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"systemInformation", "systemInformationBlockType1"}; + static const char* options[] = {"systemInformation", "systemInformationBlockType1"}; return convert_enum_idx(options, 2, value, "bcch_dl_sch_msg_type_c::c1_c_::types"); } uint8_t bcch_dl_sch_msg_type_c::c1_c_::types_opts::to_number() const { - switch (value) { - case sib_type1: - return 1; - default: - invalid_enum_number(value, "bcch_dl_sch_msg_type_c::c1_c_::types"); + if (value == sib_type1) { + return 1; } + invalid_enum_number(value, "bcch_dl_sch_msg_type_c::c1_c_::types"); return 0; } std::string bcch_dl_sch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "bcch_dl_sch_msg_type_c::types"); } uint8_t bcch_dl_sch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "bcch_dl_sch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "bcch_dl_sch_msg_type_c::types"); } // BCCH-DL-SCH-Message ::= SEQUENCE @@ -8255,18 +8272,17 @@ void bcch_dl_sch_msg_s::to_json(json_writer& j) const // Alpha ::= ENUMERATED std::string alpha_opts::to_string() const { - static constexpr const char* options[] = { - "alpha0", "alpha04", "alpha05", "alpha06", "alpha07", "alpha08", "alpha09", "alpha1"}; + static const char* options[] = {"alpha0", "alpha04", "alpha05", "alpha06", "alpha07", "alpha08", "alpha09", "alpha1"}; return convert_enum_idx(options, 8, value, "alpha_e"); } float alpha_opts::to_number() const { - static constexpr float options[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; - return convert_enum_idx(options, 8, value, "alpha_e"); + static const float options[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; + return map_enum_number(options, 8, value, "alpha_e"); } std::string alpha_opts::to_number_string() const { - static constexpr const char* options[] = {"0", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"}; + static const char* options[] = {"0", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"}; return convert_enum_idx(options, 8, value, "alpha_e"); } @@ -8309,8 +8325,8 @@ void bfr_csirs_res_s::to_json(json_writer& j) const j.write_int("csi-RS", csi_rs); if (ra_occasion_list_present) { j.start_array("ra-OccasionList"); - for (uint32_t i1 = 0; i1 < ra_occasion_list.size(); ++i1) { - j.write_int(ra_occasion_list[i1]); + for (const auto& e1 : ra_occasion_list) { + j.write_int(e1); } j.end_array(); } @@ -8618,15 +8634,15 @@ void ptrs_ul_cfg_s::to_json(json_writer& j) const j.start_obj(); if (transform_precoder_disabled.freq_density_present) { j.start_array("frequencyDensity"); - for (uint32_t i1 = 0; i1 < transform_precoder_disabled.freq_density.size(); ++i1) { - j.write_int(transform_precoder_disabled.freq_density[i1]); + for (const auto& e1 : transform_precoder_disabled.freq_density) { + j.write_int(e1); } j.end_array(); } if (transform_precoder_disabled.time_density_present) { j.start_array("timeDensity"); - for (uint32_t i1 = 0; i1 < transform_precoder_disabled.time_density.size(); ++i1) { - j.write_int(transform_precoder_disabled.time_density[i1]); + for (const auto& e1 : transform_precoder_disabled.time_density) { + j.write_int(e1); } j.end_array(); } @@ -8641,8 +8657,8 @@ void ptrs_ul_cfg_s::to_json(json_writer& j) const j.write_fieldname("transformPrecoderEnabled"); j.start_obj(); j.start_array("sampleDensity"); - for (uint32_t i1 = 0; i1 < transform_precoder_enabled.sample_density.size(); ++i1) { - j.write_int(transform_precoder_enabled.sample_density[i1]); + for (const auto& e1 : transform_precoder_enabled.sample_density) { + j.write_int(e1); } j.end_array(); if (transform_precoder_enabled.time_density_transform_precoding_present) { @@ -8655,62 +8671,62 @@ void ptrs_ul_cfg_s::to_json(json_writer& j) const std::string ptrs_ul_cfg_s::transform_precoder_disabled_s_::max_nrof_ports_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2"}; + static const char* options[] = {"n1", "n2"}; return convert_enum_idx(options, 2, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::max_nrof_ports_e_"); } uint8_t ptrs_ul_cfg_s::transform_precoder_disabled_s_::max_nrof_ports_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::max_nrof_ports_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::max_nrof_ports_e_"); } std::string ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_opts::to_string() const { - static constexpr const char* options[] = {"offset01", "offset10", "offset11"}; + static const char* options[] = {"offset01", "offset10", "offset11"}; return convert_enum_idx(options, 3, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_e_"); } float ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_opts::to_number() const { - static constexpr float options[] = {0.1, 1.0, 1.1}; - return convert_enum_idx(options, 3, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_e_"); + static const float options[] = {0.1, 1.0, 1.1}; + return map_enum_number(options, 3, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_e_"); } std::string ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_opts::to_number_string() const { - static constexpr const char* options[] = {"0.1", "1.0", "1.1"}; + static const char* options[] = {"0.1", "1.0", "1.1"}; return convert_enum_idx(options, 3, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_e_"); } std::string ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_opts::to_string() const { - static constexpr const char* options[] = {"p00", "p01", "p10", "p11"}; + static const char* options[] = {"p00", "p01", "p10", "p11"}; return convert_enum_idx(options, 4, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_e_"); } float ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_opts::to_number() const { - static constexpr float options[] = {0.0, 0.1, 1.0, 1.1}; - return convert_enum_idx(options, 4, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_e_"); + static const float options[] = {0.0, 0.1, 1.0, 1.1}; + return map_enum_number(options, 4, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_e_"); } std::string ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_opts::to_number_string() const { - static constexpr const char* options[] = {"0.0", "0.1", "1.0", "1.1"}; + static const char* options[] = {"0.0", "0.1", "1.0", "1.1"}; return convert_enum_idx(options, 4, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_e_"); } // PUCCH-MaxCodeRate ::= ENUMERATED std::string pucch_max_code_rate_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "zeroDot08", "zeroDot15", "zeroDot25", "zeroDot35", "zeroDot45", "zeroDot60", "zeroDot80"}; return convert_enum_idx(options, 7, value, "pucch_max_code_rate_e"); } float pucch_max_code_rate_opts::to_number() const { - static constexpr float options[] = {0.08, 0.15, 0.25, 0.35, 0.45, 0.6, 0.8}; - return convert_enum_idx(options, 7, value, "pucch_max_code_rate_e"); + static const float options[] = {0.08, 0.15, 0.25, 0.35, 0.45, 0.6, 0.8}; + return map_enum_number(options, 7, value, "pucch_max_code_rate_e"); } std::string pucch_max_code_rate_opts::to_number_string() const { - static constexpr const char* options[] = {"0.08", "0.15", "0.25", "0.35", "0.45", "0.60", "0.80"}; + static const char* options[] = {"0.08", "0.15", "0.25", "0.35", "0.45", "0.60", "0.80"}; return convert_enum_idx(options, 7, value, "pucch_max_code_rate_e"); } @@ -8834,7 +8850,7 @@ SRSASN_CODE pucch_pathloss_ref_rs_s::ref_sig_c_::unpack(cbit_ref& bref) std::string pucch_pathloss_ref_rs_s::ref_sig_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ssb-Index", "csi-RS-Index"}; + static const char* options[] = {"ssb-Index", "csi-RS-Index"}; return convert_enum_idx(options, 2, value, "pucch_pathloss_ref_rs_s::ref_sig_c_::types"); } @@ -8976,24 +8992,24 @@ void pucch_format4_s::to_json(json_writer& j) const std::string pucch_format4_s::occ_len_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "pucch_format4_s::occ_len_e_"); } uint8_t pucch_format4_s::occ_len_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "pucch_format4_s::occ_len_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "pucch_format4_s::occ_len_e_"); } std::string pucch_format4_s::occ_idx_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1", "n2", "n3"}; + static const char* options[] = {"n0", "n1", "n2", "n3"}; return convert_enum_idx(options, 4, value, "pucch_format4_s::occ_idx_e_"); } uint8_t pucch_format4_s::occ_idx_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "pucch_format4_s::occ_idx_e_"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "pucch_format4_s::occ_idx_e_"); } // PUSCH-PathlossReferenceRS ::= SEQUENCE @@ -9116,7 +9132,7 @@ SRSASN_CODE pusch_pathloss_ref_rs_s::ref_sig_c_::unpack(cbit_ref& bref) std::string pusch_pathloss_ref_rs_s::ref_sig_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ssb-Index", "csi-RS-Index"}; + static const char* options[] = {"ssb-Index", "csi-RS-Index"}; return convert_enum_idx(options, 2, value, "pusch_pathloss_ref_rs_s::ref_sig_c_::types"); } @@ -9151,13 +9167,13 @@ void sri_pusch_pwr_ctrl_s::to_json(json_writer& j) const std::string sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_opts::to_string() const { - static constexpr const char* options[] = {"i0", "i1"}; + static const char* options[] = {"i0", "i1"}; return convert_enum_idx(options, 2, value, "sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_e_"); } uint8_t sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_e_"); } // SRS-PeriodicityAndOffset ::= CHOICE @@ -9476,29 +9492,29 @@ SRSASN_CODE srs_periodicity_and_offset_c::unpack(cbit_ref& bref) std::string srs_periodicity_and_offset_c::types_opts::to_string() const { - static constexpr const char* options[] = {"sl1", - "sl2", - "sl4", - "sl5", - "sl8", - "sl10", - "sl16", - "sl20", - "sl32", - "sl40", - "sl64", - "sl80", - "sl160", - "sl320", - "sl640", - "sl1280", - "sl2560"}; + static const char* options[] = {"sl1", + "sl2", + "sl4", + "sl5", + "sl8", + "sl10", + "sl16", + "sl20", + "sl32", + "sl40", + "sl64", + "sl80", + "sl160", + "sl320", + "sl640", + "sl1280", + "sl2560"}; return convert_enum_idx(options, 17, value, "srs_periodicity_and_offset_c::types"); } uint16_t srs_periodicity_and_offset_c::types_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560}; - return convert_enum_idx(options, 17, value, "srs_periodicity_and_offset_c::types"); + static const uint16_t options[] = {1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560}; + return map_enum_number(options, 17, value, "srs_periodicity_and_offset_c::types"); } // SRS-SpatialRelationInfo ::= SEQUENCE @@ -9674,7 +9690,7 @@ SRSASN_CODE srs_spatial_relation_info_s::ref_sig_c_::unpack(cbit_ref& bref) std::string srs_spatial_relation_info_s::ref_sig_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ssb-Index", "csi-RS-Index", "srs"}; + static const char* options[] = {"ssb-Index", "csi-RS-Index", "srs"}; return convert_enum_idx(options, 3, value, "srs_spatial_relation_info_s::ref_sig_c_::types"); } @@ -9752,8 +9768,8 @@ void cg_uci_on_pusch_c::to_json(json_writer& j) const switch (type_) { case types::dynamic_type: j.start_array("dynamic"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -9803,7 +9819,7 @@ SRSASN_CODE cg_uci_on_pusch_c::unpack(cbit_ref& bref) std::string cg_uci_on_pusch_c::types_opts::to_string() const { - static constexpr const char* options[] = {"dynamic", "semiStatic"}; + static const char* options[] = {"dynamic", "semiStatic"}; return convert_enum_idx(options, 2, value, "cg_uci_on_pusch_c::types"); } @@ -10022,29 +10038,29 @@ SRSASN_CODE csi_rs_res_map_s::freq_domain_alloc_c_::unpack(cbit_ref& bref) std::string csi_rs_res_map_s::freq_domain_alloc_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"row1", "row2", "row4", "other"}; + static const char* options[] = {"row1", "row2", "row4", "other"}; return convert_enum_idx(options, 4, value, "csi_rs_res_map_s::freq_domain_alloc_c_::types"); } uint8_t csi_rs_res_map_s::freq_domain_alloc_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "csi_rs_res_map_s::freq_domain_alloc_c_::types"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "csi_rs_res_map_s::freq_domain_alloc_c_::types"); } std::string csi_rs_res_map_s::nrof_ports_opts::to_string() const { - static constexpr const char* options[] = {"p1", "p2", "p4", "p8", "p12", "p16", "p24", "p32"}; + static const char* options[] = {"p1", "p2", "p4", "p8", "p12", "p16", "p24", "p32"}; return convert_enum_idx(options, 8, value, "csi_rs_res_map_s::nrof_ports_e_"); } uint8_t csi_rs_res_map_s::nrof_ports_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 12, 16, 24, 32}; - return convert_enum_idx(options, 8, value, "csi_rs_res_map_s::nrof_ports_e_"); + static const uint8_t options[] = {1, 2, 4, 8, 12, 16, 24, 32}; + return map_enum_number(options, 8, value, "csi_rs_res_map_s::nrof_ports_e_"); } std::string csi_rs_res_map_s::cdm_type_opts::to_string() const { - static constexpr const char* options[] = {"noCDM", "fd-CDM2", "cdm4-FD2-TD2", "cdm8-FD2-TD4"}; + static const char* options[] = {"noCDM", "fd-CDM2", "cdm4-FD2-TD2", "cdm8-FD2-TD4"}; return convert_enum_idx(options, 4, value, "csi_rs_res_map_s::cdm_type_e_"); } uint8_t csi_rs_res_map_s::cdm_type_opts::to_number() const @@ -10127,19 +10143,19 @@ SRSASN_CODE csi_rs_res_map_s::density_c_::unpack(cbit_ref& bref) std::string csi_rs_res_map_s::density_c_::dot5_opts::to_string() const { - static constexpr const char* options[] = {"evenPRBs", "oddPRBs"}; + static const char* options[] = {"evenPRBs", "oddPRBs"}; return convert_enum_idx(options, 2, value, "csi_rs_res_map_s::density_c_::dot5_e_"); } std::string csi_rs_res_map_s::density_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"dot5", "one", "three", "spare"}; + static const char* options[] = {"dot5", "one", "three", "spare"}; return convert_enum_idx(options, 4, value, "csi_rs_res_map_s::density_c_::types"); } uint8_t csi_rs_res_map_s::density_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {5, 1, 3}; - return convert_enum_idx(options, 3, value, "csi_rs_res_map_s::density_c_::types"); + static const uint8_t options[] = {5, 1, 3}; + return map_enum_number(options, 3, value, "csi_rs_res_map_s::density_c_::types"); } // CSI-ResourcePeriodicityAndOffset ::= CHOICE @@ -10404,25 +10420,25 @@ SRSASN_CODE csi_res_periodicity_and_offset_c::unpack(cbit_ref& bref) std::string csi_res_periodicity_and_offset_c::types_opts::to_string() const { - static constexpr const char* options[] = {"slots4", - "slots5", - "slots8", - "slots10", - "slots16", - "slots20", - "slots32", - "slots40", - "slots64", - "slots80", - "slots160", - "slots320", - "slots640"}; + static const char* options[] = {"slots4", + "slots5", + "slots8", + "slots10", + "slots16", + "slots20", + "slots32", + "slots40", + "slots64", + "slots80", + "slots160", + "slots320", + "slots640"}; return convert_enum_idx(options, 13, value, "csi_res_periodicity_and_offset_c::types"); } uint16_t csi_res_periodicity_and_offset_c::types_opts::to_number() const { - static constexpr uint16_t options[] = {4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640}; - return convert_enum_idx(options, 13, value, "csi_res_periodicity_and_offset_c::types"); + static const uint16_t options[] = {4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640}; + return map_enum_number(options, 13, value, "csi_res_periodicity_and_offset_c::types"); } // DMRS-UplinkConfig ::= SEQUENCE @@ -10550,13 +10566,13 @@ void dmrs_ul_cfg_s::to_json(json_writer& j) const std::string dmrs_ul_cfg_s::dmrs_add_position_opts::to_string() const { - static constexpr const char* options[] = {"pos0", "pos1", "pos3"}; + static const char* options[] = {"pos0", "pos1", "pos3"}; return convert_enum_idx(options, 3, value, "dmrs_ul_cfg_s::dmrs_add_position_e_"); } uint8_t dmrs_ul_cfg_s::dmrs_add_position_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 3}; - return convert_enum_idx(options, 3, value, "dmrs_ul_cfg_s::dmrs_add_position_e_"); + static const uint8_t options[] = {0, 1, 3}; + return map_enum_number(options, 3, value, "dmrs_ul_cfg_s::dmrs_add_position_e_"); } // INT-ConfigurationPerServingCell ::= SEQUENCE @@ -10704,7 +10720,7 @@ SRSASN_CODE prach_res_ded_bfr_c::unpack(cbit_ref& bref) std::string prach_res_ded_bfr_c::types_opts::to_string() const { - static constexpr const char* options[] = {"ssb", "csi-RS"}; + static const char* options[] = {"ssb", "csi-RS"}; return convert_enum_idx(options, 2, value, "prach_res_ded_bfr_c::types"); } @@ -10760,15 +10776,15 @@ void ptrs_dl_cfg_s::to_json(json_writer& j) const j.start_obj(); if (freq_density_present) { j.start_array("frequencyDensity"); - for (uint32_t i1 = 0; i1 < freq_density.size(); ++i1) { - j.write_int(freq_density[i1]); + for (const auto& e1 : freq_density) { + j.write_int(e1); } j.end_array(); } if (time_density_present) { j.start_array("timeDensity"); - for (uint32_t i1 = 0; i1 < time_density.size(); ++i1) { - j.write_int(time_density[i1]); + for (const auto& e1 : time_density) { + j.write_int(e1); } j.end_array(); } @@ -10783,17 +10799,17 @@ void ptrs_dl_cfg_s::to_json(json_writer& j) const std::string ptrs_dl_cfg_s::res_elem_offset_opts::to_string() const { - static constexpr const char* options[] = {"offset01", "offset10", "offset11"}; + static const char* options[] = {"offset01", "offset10", "offset11"}; return convert_enum_idx(options, 3, value, "ptrs_dl_cfg_s::res_elem_offset_e_"); } float ptrs_dl_cfg_s::res_elem_offset_opts::to_number() const { - static constexpr float options[] = {0.1, 1.0, 1.1}; - return convert_enum_idx(options, 3, value, "ptrs_dl_cfg_s::res_elem_offset_e_"); + static const float options[] = {0.1, 1.0, 1.1}; + return map_enum_number(options, 3, value, "ptrs_dl_cfg_s::res_elem_offset_e_"); } std::string ptrs_dl_cfg_s::res_elem_offset_opts::to_number_string() const { - static constexpr const char* options[] = {"0.1", "1.0", "1.1"}; + static const char* options[] = {"0.1", "1.0", "1.1"}; return convert_enum_idx(options, 3, value, "ptrs_dl_cfg_s::res_elem_offset_e_"); } @@ -10860,13 +10876,13 @@ void pucch_format_cfg_s::to_json(json_writer& j) const std::string pucch_format_cfg_s::nrof_slots_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n8"}; + static const char* options[] = {"n2", "n4", "n8"}; return convert_enum_idx(options, 3, value, "pucch_format_cfg_s::nrof_slots_e_"); } uint8_t pucch_format_cfg_s::nrof_slots_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8}; - return convert_enum_idx(options, 3, value, "pucch_format_cfg_s::nrof_slots_e_"); + static const uint8_t options[] = {2, 4, 8}; + return map_enum_number(options, 3, value, "pucch_format_cfg_s::nrof_slots_e_"); } // PUCCH-PowerControl ::= SEQUENCE @@ -10962,15 +10978,15 @@ void pucch_pwr_ctrl_s::to_json(json_writer& j) const } if (p0_set_present) { j.start_array("p0-Set"); - for (uint32_t i1 = 0; i1 < p0_set.size(); ++i1) { - p0_set[i1].to_json(j); + for (const auto& e1 : p0_set) { + e1.to_json(j); } j.end_array(); } if (pathloss_ref_rss_present) { j.start_array("pathlossReferenceRSs"); - for (uint32_t i1 = 0; i1 < pathloss_ref_rss.size(); ++i1) { - pathloss_ref_rss[i1].to_json(j); + for (const auto& e1 : pathloss_ref_rss) { + e1.to_json(j); } j.end_array(); } @@ -11212,13 +11228,13 @@ SRSASN_CODE pucch_res_s::format_c_::unpack(cbit_ref& bref) std::string pucch_res_s::format_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"format0", "format1", "format2", "format3", "format4"}; + static const char* options[] = {"format0", "format1", "format2", "format3", "format4"}; return convert_enum_idx(options, 5, value, "pucch_res_s::format_c_::types"); } uint8_t pucch_res_s::format_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4}; - return convert_enum_idx(options, 5, value, "pucch_res_s::format_c_::types"); + static const uint8_t options[] = {0, 1, 2, 3, 4}; + return map_enum_number(options, 5, value, "pucch_res_s::format_c_::types"); } // PUCCH-ResourceSet ::= SEQUENCE @@ -11251,8 +11267,8 @@ void pucch_res_set_s::to_json(json_writer& j) const j.start_obj(); j.write_int("pucch-ResourceSetId", pucch_res_set_id); j.start_array("resourceList"); - for (uint32_t i1 = 0; i1 < res_list.size(); ++i1) { - j.write_int(res_list[i1]); + for (const auto& e1 : res_list) { + j.write_int(e1); } j.end_array(); if (max_payload_minus1_present) { @@ -11446,19 +11462,19 @@ SRSASN_CODE pucch_spatial_relation_info_s::ref_sig_c_::unpack(cbit_ref& bref) std::string pucch_spatial_relation_info_s::ref_sig_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ssb-Index", "csi-RS-Index", "srs"}; + static const char* options[] = {"ssb-Index", "csi-RS-Index", "srs"}; return convert_enum_idx(options, 3, value, "pucch_spatial_relation_info_s::ref_sig_c_::types"); } std::string pucch_spatial_relation_info_s::closed_loop_idx_opts::to_string() const { - static constexpr const char* options[] = {"i0", "i1"}; + static const char* options[] = {"i0", "i1"}; return convert_enum_idx(options, 2, value, "pucch_spatial_relation_info_s::closed_loop_idx_e_"); } uint8_t pucch_spatial_relation_info_s::closed_loop_idx_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "pucch_spatial_relation_info_s::closed_loop_idx_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "pucch_spatial_relation_info_s::closed_loop_idx_e_"); } // PUSCH-PowerControl ::= SEQUENCE @@ -11550,22 +11566,22 @@ void pusch_pwr_ctrl_s::to_json(json_writer& j) const } if (p0_alpha_sets_present) { j.start_array("p0-AlphaSets"); - for (uint32_t i1 = 0; i1 < p0_alpha_sets.size(); ++i1) { - p0_alpha_sets[i1].to_json(j); + for (const auto& e1 : p0_alpha_sets) { + e1.to_json(j); } j.end_array(); } if (pathloss_ref_rs_to_add_mod_list_present) { j.start_array("pathlossReferenceRSToAddModList"); - for (uint32_t i1 = 0; i1 < pathloss_ref_rs_to_add_mod_list.size(); ++i1) { - pathloss_ref_rs_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : pathloss_ref_rs_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (pathloss_ref_rs_to_release_list_present) { j.start_array("pathlossReferenceRSToReleaseList"); - for (uint32_t i1 = 0; i1 < pathloss_ref_rs_to_release_list.size(); ++i1) { - j.write_int(pathloss_ref_rs_to_release_list[i1]); + for (const auto& e1 : pathloss_ref_rs_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -11577,15 +11593,15 @@ void pusch_pwr_ctrl_s::to_json(json_writer& j) const } if (sri_pusch_map_to_add_mod_list_present) { j.start_array("sri-PUSCH-MappingToAddModList"); - for (uint32_t i1 = 0; i1 < sri_pusch_map_to_add_mod_list.size(); ++i1) { - sri_pusch_map_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : sri_pusch_map_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (sri_pusch_map_to_release_list_present) { j.start_array("sri-PUSCH-MappingToReleaseList"); - for (uint32_t i1 = 0; i1 < sri_pusch_map_to_release_list.size(); ++i1) { - j.write_int(sri_pusch_map_to_release_list[i1]); + for (const auto& e1 : sri_pusch_map_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -11737,13 +11753,13 @@ SRSASN_CODE qcl_info_s::ref_sig_c_::unpack(cbit_ref& bref) std::string qcl_info_s::ref_sig_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"csi-rs", "ssb"}; + static const char* options[] = {"csi-rs", "ssb"}; return convert_enum_idx(options, 2, value, "qcl_info_s::ref_sig_c_::types"); } std::string qcl_info_s::qcl_type_opts::to_string() const { - static constexpr const char* options[] = {"typeA", "typeB", "typeC", "typeD"}; + static const char* options[] = {"typeA", "typeB", "typeC", "typeD"}; return convert_enum_idx(options, 4, value, "qcl_info_s::qcl_type_e_"); } @@ -11784,24 +11800,24 @@ void ra_prioritization_s::to_json(json_writer& j) const std::string ra_prioritization_s::pwr_ramp_step_high_prio_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB2", "dB4", "dB6"}; + static const char* options[] = {"dB0", "dB2", "dB4", "dB6"}; return convert_enum_idx(options, 4, value, "ra_prioritization_s::pwr_ramp_step_high_prio_e_"); } uint8_t ra_prioritization_s::pwr_ramp_step_high_prio_opts::to_number() const { - static constexpr uint8_t options[] = {0, 2, 4, 6}; - return convert_enum_idx(options, 4, value, "ra_prioritization_s::pwr_ramp_step_high_prio_e_"); + static const uint8_t options[] = {0, 2, 4, 6}; + return map_enum_number(options, 4, value, "ra_prioritization_s::pwr_ramp_step_high_prio_e_"); } std::string ra_prioritization_s::scaling_factor_bi_opts::to_string() const { - static constexpr const char* options[] = {"zero", "dot25", "dot5", "dot75"}; + static const char* options[] = {"zero", "dot25", "dot5", "dot75"}; return convert_enum_idx(options, 4, value, "ra_prioritization_s::scaling_factor_bi_e_"); } uint8_t ra_prioritization_s::scaling_factor_bi_opts::to_number() const { - static constexpr uint8_t options[] = {0, 25, 5, 75}; - return convert_enum_idx(options, 4, value, "ra_prioritization_s::scaling_factor_bi_e_"); + static const uint8_t options[] = {0, 25, 5, 75}; + return map_enum_number(options, 4, value, "ra_prioritization_s::scaling_factor_bi_e_"); } // SRS-Resource ::= SEQUENCE @@ -11900,24 +11916,24 @@ void srs_res_s::to_json(json_writer& j) const std::string srs_res_s::nrof_srs_ports_opts::to_string() const { - static constexpr const char* options[] = {"port1", "ports2", "ports4"}; + static const char* options[] = {"port1", "ports2", "ports4"}; return convert_enum_idx(options, 3, value, "srs_res_s::nrof_srs_ports_e_"); } uint8_t srs_res_s::nrof_srs_ports_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "srs_res_s::nrof_srs_ports_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "srs_res_s::nrof_srs_ports_e_"); } std::string srs_res_s::ptrs_port_idx_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1"}; + static const char* options[] = {"n0", "n1"}; return convert_enum_idx(options, 2, value, "srs_res_s::ptrs_port_idx_e_"); } uint8_t srs_res_s::ptrs_port_idx_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "srs_res_s::ptrs_port_idx_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "srs_res_s::ptrs_port_idx_e_"); } void srs_res_s::tx_comb_c_::destroy_() @@ -12051,40 +12067,40 @@ SRSASN_CODE srs_res_s::tx_comb_c_::unpack(cbit_ref& bref) std::string srs_res_s::tx_comb_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "srs_res_s::tx_comb_c_::types"); } uint8_t srs_res_s::tx_comb_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "srs_res_s::tx_comb_c_::types"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "srs_res_s::tx_comb_c_::types"); } std::string srs_res_s::res_map_s_::nrof_symbols_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4"}; + static const char* options[] = {"n1", "n2", "n4"}; return convert_enum_idx(options, 3, value, "srs_res_s::res_map_s_::nrof_symbols_e_"); } uint8_t srs_res_s::res_map_s_::nrof_symbols_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "srs_res_s::res_map_s_::nrof_symbols_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "srs_res_s::res_map_s_::nrof_symbols_e_"); } std::string srs_res_s::res_map_s_::repeat_factor_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4"}; + static const char* options[] = {"n1", "n2", "n4"}; return convert_enum_idx(options, 3, value, "srs_res_s::res_map_s_::repeat_factor_e_"); } uint8_t srs_res_s::res_map_s_::repeat_factor_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "srs_res_s::res_map_s_::repeat_factor_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "srs_res_s::res_map_s_::repeat_factor_e_"); } std::string srs_res_s::group_or_seq_hop_opts::to_string() const { - static constexpr const char* options[] = {"neither", "groupHopping", "sequenceHopping"}; + static const char* options[] = {"neither", "groupHopping", "sequenceHopping"}; return convert_enum_idx(options, 3, value, "srs_res_s::group_or_seq_hop_e_"); } @@ -12242,7 +12258,7 @@ SRSASN_CODE srs_res_s::res_type_c_::unpack(cbit_ref& bref) std::string srs_res_s::res_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"aperiodic", "semi-persistent", "periodic"}; + static const char* options[] = {"aperiodic", "semi-persistent", "periodic"}; return convert_enum_idx(options, 3, value, "srs_res_s::res_type_c_::types"); } @@ -12313,8 +12329,8 @@ void srs_res_set_s::to_json(json_writer& j) const j.write_int("srs-ResourceSetId", srs_res_set_id); if (srs_res_id_list_present) { j.start_array("srs-ResourceIdList"); - for (uint32_t i1 = 0; i1 < srs_res_id_list.size(); ++i1) { - j.write_int(srs_res_id_list[i1]); + for (const auto& e1 : srs_res_id_list) { + j.write_int(e1); } j.end_array(); } @@ -12577,8 +12593,8 @@ void srs_res_set_s::res_type_c_::aperiodic_s_::to_json(json_writer& j) const if (ext) { if (aperiodic_srs_res_trigger_list_v1530.is_present()) { j.start_array("aperiodicSRS-ResourceTriggerList-v1530"); - for (uint32_t i1 = 0; i1 < aperiodic_srs_res_trigger_list_v1530->size(); ++i1) { - j.write_int(((*aperiodic_srs_res_trigger_list_v1530)[i1])); + for (const auto& e1 : *aperiodic_srs_res_trigger_list_v1530) { + j.write_int(e1); } j.end_array(); } @@ -12588,13 +12604,13 @@ void srs_res_set_s::res_type_c_::aperiodic_s_::to_json(json_writer& j) const std::string srs_res_set_s::res_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"aperiodic", "semi-persistent", "periodic"}; + static const char* options[] = {"aperiodic", "semi-persistent", "periodic"}; return convert_enum_idx(options, 3, value, "srs_res_set_s::res_type_c_::types"); } std::string srs_res_set_s::usage_opts::to_string() const { - static constexpr const char* options[] = {"beamManagement", "codebook", "nonCodebook", "antennaSwitching"}; + static const char* options[] = {"beamManagement", "codebook", "nonCodebook", "antennaSwitching"}; return convert_enum_idx(options, 4, value, "srs_res_set_s::usage_e_"); } @@ -12694,19 +12710,19 @@ SRSASN_CODE srs_res_set_s::pathloss_ref_rs_c_::unpack(cbit_ref& bref) std::string srs_res_set_s::pathloss_ref_rs_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ssb-Index", "csi-RS-Index"}; + static const char* options[] = {"ssb-Index", "csi-RS-Index"}; return convert_enum_idx(options, 2, value, "srs_res_set_s::pathloss_ref_rs_c_::types"); } std::string srs_res_set_s::srs_pwr_ctrl_adjustment_states_opts::to_string() const { - static constexpr const char* options[] = {"sameAsFci2", "separateClosedLoop"}; + static const char* options[] = {"sameAsFci2", "separateClosedLoop"}; return convert_enum_idx(options, 2, value, "srs_res_set_s::srs_pwr_ctrl_adjustment_states_e_"); } uint8_t srs_res_set_s::srs_pwr_ctrl_adjustment_states_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx(options, 1, value, "srs_res_set_s::srs_pwr_ctrl_adjustment_states_e_"); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "srs_res_set_s::srs_pwr_ctrl_adjustment_states_e_"); } // SchedulingRequestResourceConfig ::= SEQUENCE @@ -13034,21 +13050,21 @@ SRSASN_CODE sched_request_res_cfg_s::periodicity_and_offset_c_::unpack(cbit_ref& std::string sched_request_res_cfg_s::periodicity_and_offset_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"sym2", - "sym6or7", - "sl1", - "sl2", - "sl4", - "sl5", - "sl8", - "sl10", - "sl16", - "sl20", - "sl40", - "sl80", - "sl160", - "sl320", - "sl640"}; + static const char* options[] = {"sym2", + "sym6or7", + "sl1", + "sl2", + "sl4", + "sl5", + "sl8", + "sl10", + "sl16", + "sl20", + "sl40", + "sl80", + "sl160", + "sl320", + "sl640"}; return convert_enum_idx(options, 15, value, "sched_request_res_cfg_s::periodicity_and_offset_c_::types"); } @@ -13160,8 +13176,8 @@ void uci_on_pusch_s::beta_offsets_c_::to_json(json_writer& j) const switch (type_) { case types::dynamic_type: j.start_array("dynamic"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -13211,13 +13227,13 @@ SRSASN_CODE uci_on_pusch_s::beta_offsets_c_::unpack(cbit_ref& bref) std::string uci_on_pusch_s::beta_offsets_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"dynamic", "semiStatic"}; + static const char* options[] = {"dynamic", "semiStatic"}; return convert_enum_idx(options, 2, value, "uci_on_pusch_s::beta_offsets_c_::types"); } std::string uci_on_pusch_s::scaling_opts::to_string() const { - static constexpr const char* options[] = {"f0p5", "f0p65", "f0p8", "f1"}; + static const char* options[] = {"f0p5", "f0p65", "f0p8", "f1"}; return convert_enum_idx(options, 4, value, "uci_on_pusch_s::scaling_e_"); } @@ -13350,8 +13366,8 @@ void beam_fail_recovery_cfg_s::to_json(json_writer& j) const } if (candidate_beam_rs_list_present) { j.start_array("candidateBeamRSList"); - for (uint32_t i1 = 0; i1 < candidate_beam_rs_list.size(); ++i1) { - candidate_beam_rs_list[i1].to_json(j); + for (const auto& e1 : candidate_beam_rs_list) { + e1.to_json(j); } j.end_array(); } @@ -13381,30 +13397,29 @@ void beam_fail_recovery_cfg_s::to_json(json_writer& j) const std::string beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_string() const { - static constexpr const char* options[] = { - "oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; + static const char* options[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; return convert_enum_idx(options, 8, value, "beam_fail_recovery_cfg_s::ssb_per_rach_occasion_e_"); } float beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_number() const { - static constexpr float options[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; - return convert_enum_idx(options, 8, value, "beam_fail_recovery_cfg_s::ssb_per_rach_occasion_e_"); + static const float options[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; + return map_enum_number(options, 8, value, "beam_fail_recovery_cfg_s::ssb_per_rach_occasion_e_"); } std::string beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_number_string() const { - static constexpr const char* options[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; + static const char* options[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; return convert_enum_idx(options, 8, value, "beam_fail_recovery_cfg_s::ssb_per_rach_occasion_e_"); } std::string beam_fail_recovery_cfg_s::beam_fail_recovery_timer_opts::to_string() const { - static constexpr const char* options[] = {"ms10", "ms20", "ms40", "ms60", "ms80", "ms100", "ms150", "ms200"}; + static const char* options[] = {"ms10", "ms20", "ms40", "ms60", "ms80", "ms100", "ms150", "ms200"}; return convert_enum_idx(options, 8, value, "beam_fail_recovery_cfg_s::beam_fail_recovery_timer_e_"); } uint8_t beam_fail_recovery_cfg_s::beam_fail_recovery_timer_opts::to_number() const { - static constexpr uint8_t options[] = {10, 20, 40, 60, 80, 100, 150, 200}; - return convert_enum_idx(options, 8, value, "beam_fail_recovery_cfg_s::beam_fail_recovery_timer_e_"); + static const uint8_t options[] = {10, 20, 40, 60, 80, 100, 150, 200}; + return map_enum_number(options, 8, value, "beam_fail_recovery_cfg_s::beam_fail_recovery_timer_e_"); } // CSI-AssociatedReportConfigInfo ::= SEQUENCE @@ -13532,8 +13547,8 @@ void csi_associated_report_cfg_info_s::res_for_ch_c_::to_json(json_writer& j) co j.write_int("resourceSet", c.get().res_set); if (c.get().qcl_info_present) { j.start_array("qcl-info"); - for (uint32_t i1 = 0; i1 < c.get().qcl_info.size(); ++i1) { - j.write_int(c.get().qcl_info[i1]); + for (const auto& e1 : c.get().qcl_info) { + j.write_int(e1); } j.end_array(); } @@ -13592,7 +13607,7 @@ SRSASN_CODE csi_associated_report_cfg_info_s::res_for_ch_c_::unpack(cbit_ref& br std::string csi_associated_report_cfg_info_s::res_for_ch_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"nzp-CSI-RS", "csi-SSB-ResourceSet"}; + static const char* options[] = {"nzp-CSI-RS", "csi-SSB-ResourceSet"}; return convert_enum_idx(options, 2, value, "csi_associated_report_cfg_info_s::res_for_ch_c_::types"); } @@ -13791,85 +13806,85 @@ void cfgured_grant_cfg_s::to_json(json_writer& j) const std::string cfgured_grant_cfg_s::freq_hop_opts::to_string() const { - static constexpr const char* options[] = {"intraSlot", "interSlot"}; + static const char* options[] = {"intraSlot", "interSlot"}; return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::freq_hop_e_"); } std::string cfgured_grant_cfg_s::mcs_table_opts::to_string() const { - static constexpr const char* options[] = {"qam256", "qam64LowSE"}; + static const char* options[] = {"qam256", "qam64LowSE"}; return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::mcs_table_e_"); } uint16_t cfgured_grant_cfg_s::mcs_table_opts::to_number() const { - static constexpr uint16_t options[] = {256, 64}; - return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::mcs_table_e_"); + static const uint16_t options[] = {256, 64}; + return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::mcs_table_e_"); } std::string cfgured_grant_cfg_s::mcs_table_transform_precoder_opts::to_string() const { - static constexpr const char* options[] = {"qam256", "qam64LowSE"}; + static const char* options[] = {"qam256", "qam64LowSE"}; return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::mcs_table_transform_precoder_e_"); } uint16_t cfgured_grant_cfg_s::mcs_table_transform_precoder_opts::to_number() const { - static constexpr uint16_t options[] = {256, 64}; - return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::mcs_table_transform_precoder_e_"); + static const uint16_t options[] = {256, 64}; + return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::mcs_table_transform_precoder_e_"); } std::string cfgured_grant_cfg_s::res_alloc_opts::to_string() const { - static constexpr const char* options[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; + static const char* options[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; return convert_enum_idx(options, 3, value, "cfgured_grant_cfg_s::res_alloc_e_"); } uint8_t cfgured_grant_cfg_s::res_alloc_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::res_alloc_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::res_alloc_e_"); } std::string cfgured_grant_cfg_s::pwr_ctrl_loop_to_use_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1"}; + static const char* options[] = {"n0", "n1"}; return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::pwr_ctrl_loop_to_use_e_"); } uint8_t cfgured_grant_cfg_s::pwr_ctrl_loop_to_use_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::pwr_ctrl_loop_to_use_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "cfgured_grant_cfg_s::pwr_ctrl_loop_to_use_e_"); } std::string cfgured_grant_cfg_s::transform_precoder_opts::to_string() const { - static constexpr const char* options[] = {"enabled", "disabled"}; + static const char* options[] = {"enabled", "disabled"}; return convert_enum_idx(options, 2, value, "cfgured_grant_cfg_s::transform_precoder_e_"); } std::string cfgured_grant_cfg_s::rep_k_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "n8"}; + static const char* options[] = {"n1", "n2", "n4", "n8"}; return convert_enum_idx(options, 4, value, "cfgured_grant_cfg_s::rep_k_e_"); } uint8_t cfgured_grant_cfg_s::rep_k_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx(options, 4, value, "cfgured_grant_cfg_s::rep_k_e_"); + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number(options, 4, value, "cfgured_grant_cfg_s::rep_k_e_"); } std::string cfgured_grant_cfg_s::rep_k_rv_opts::to_string() const { - static constexpr const char* options[] = {"s1-0231", "s2-0303", "s3-0000"}; + static const char* options[] = {"s1-0231", "s2-0303", "s3-0000"}; return convert_enum_idx(options, 3, value, "cfgured_grant_cfg_s::rep_k_rv_e_"); } uint8_t cfgured_grant_cfg_s::rep_k_rv_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx(options, 3, value, "cfgured_grant_cfg_s::rep_k_rv_e_"); + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number(options, 3, value, "cfgured_grant_cfg_s::rep_k_rv_e_"); } std::string cfgured_grant_cfg_s::periodicity_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "sym2", "sym7", "sym1x14", "sym2x14", "sym4x14", "sym5x14", "sym8x14", "sym10x14", "sym16x14", "sym20x14", "sym32x14", "sym40x14", "sym64x14", "sym80x14", "sym128x14", "sym160x14", "sym256x14", "sym320x14", "sym512x14", "sym640x14", "sym1024x14", "sym1280x14", "sym2560x14", "sym5120x14", @@ -13957,13 +13972,13 @@ void dmrs_dl_cfg_s::to_json(json_writer& j) const std::string dmrs_dl_cfg_s::dmrs_add_position_opts::to_string() const { - static constexpr const char* options[] = {"pos0", "pos1", "pos3"}; + static const char* options[] = {"pos0", "pos1", "pos3"}; return convert_enum_idx(options, 3, value, "dmrs_dl_cfg_s::dmrs_add_position_e_"); } uint8_t dmrs_dl_cfg_s::dmrs_add_position_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 3}; - return convert_enum_idx(options, 3, value, "dmrs_dl_cfg_s::dmrs_add_position_e_"); + static const uint8_t options[] = {0, 1, 3}; + return map_enum_number(options, 3, value, "dmrs_dl_cfg_s::dmrs_add_position_e_"); } // DownlinkPreemption ::= SEQUENCE @@ -13994,8 +14009,8 @@ void dl_preemption_s::to_json(json_writer& j) const j.write_str("timeFrequencySet", time_freq_set.to_string()); j.write_int("dci-PayloadSize", dci_payload_size); j.start_array("int-ConfigurationPerServingCell"); - for (uint32_t i1 = 0; i1 < int_cfg_per_serving_cell.size(); ++i1) { - int_cfg_per_serving_cell[i1].to_json(j); + for (const auto& e1 : int_cfg_per_serving_cell) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -14003,13 +14018,13 @@ void dl_preemption_s::to_json(json_writer& j) const std::string dl_preemption_s::time_freq_set_opts::to_string() const { - static constexpr const char* options[] = {"set0", "set1"}; + static const char* options[] = {"set0", "set1"}; return convert_enum_idx(options, 2, value, "dl_preemption_s::time_freq_set_e_"); } uint8_t dl_preemption_s::time_freq_set_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "dl_preemption_s::time_freq_set_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "dl_preemption_s::time_freq_set_e_"); } // EUTRA-MBSFN-SubframeConfig ::= SEQUENCE @@ -14057,13 +14072,13 @@ void eutra_mbsfn_sf_cfg_s::to_json(json_writer& j) const std::string eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32"}; + static const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32"}; return convert_enum_idx(options, 6, value, "eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_e_"); } uint8_t eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 16, 32}; - return convert_enum_idx(options, 6, value, "eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_e_"); + static const uint8_t options[] = {1, 2, 4, 8, 16, 32}; + return map_enum_number(options, 6, value, "eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_e_"); } void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::destroy_() @@ -14186,13 +14201,13 @@ SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::unpack(cbit_ref& bref) std::string eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"oneFrame", "fourFrames"}; + static const char* options[] = {"oneFrame", "fourFrames"}; return convert_enum_idx(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types"); } uint8_t eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 4}; - return convert_enum_idx(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types"); + static const uint8_t options[] = {1, 4}; + return map_enum_number(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types"); } void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::destroy_() @@ -14315,13 +14330,13 @@ SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::unpack(cbit_ref& bref) std::string eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"oneFrame", "fourFrames"}; + static const char* options[] = {"oneFrame", "fourFrames"}; return convert_enum_idx(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types"); } uint8_t eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 4}; - return convert_enum_idx(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types"); + static const uint8_t options[] = {1, 4}; + return map_enum_number(options, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types"); } // PUCCH-Config ::= SEQUENCE @@ -14464,29 +14479,29 @@ void pucch_cfg_s::to_json(json_writer& j) const j.start_obj(); if (res_set_to_add_mod_list_present) { j.start_array("resourceSetToAddModList"); - for (uint32_t i1 = 0; i1 < res_set_to_add_mod_list.size(); ++i1) { - res_set_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : res_set_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (res_set_to_release_list_present) { j.start_array("resourceSetToReleaseList"); - for (uint32_t i1 = 0; i1 < res_set_to_release_list.size(); ++i1) { - j.write_int(res_set_to_release_list[i1]); + for (const auto& e1 : res_set_to_release_list) { + j.write_int(e1); } j.end_array(); } if (res_to_add_mod_list_present) { j.start_array("resourceToAddModList"); - for (uint32_t i1 = 0; i1 < res_to_add_mod_list.size(); ++i1) { - res_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : res_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (res_to_release_list_present) { j.start_array("resourceToReleaseList"); - for (uint32_t i1 = 0; i1 < res_to_release_list.size(); ++i1) { - j.write_int(res_to_release_list[i1]); + for (const auto& e1 : res_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -14508,43 +14523,43 @@ void pucch_cfg_s::to_json(json_writer& j) const } if (sched_request_res_to_add_mod_list_present) { j.start_array("schedulingRequestResourceToAddModList"); - for (uint32_t i1 = 0; i1 < sched_request_res_to_add_mod_list.size(); ++i1) { - sched_request_res_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : sched_request_res_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (sched_request_res_to_release_list_present) { j.start_array("schedulingRequestResourceToReleaseList"); - for (uint32_t i1 = 0; i1 < sched_request_res_to_release_list.size(); ++i1) { - j.write_int(sched_request_res_to_release_list[i1]); + for (const auto& e1 : sched_request_res_to_release_list) { + j.write_int(e1); } j.end_array(); } if (multi_csi_pucch_res_list_present) { j.start_array("multi-CSI-PUCCH-ResourceList"); - for (uint32_t i1 = 0; i1 < multi_csi_pucch_res_list.size(); ++i1) { - j.write_int(multi_csi_pucch_res_list[i1]); + for (const auto& e1 : multi_csi_pucch_res_list) { + j.write_int(e1); } j.end_array(); } if (dl_data_to_ul_ack_present) { j.start_array("dl-DataToUL-ACK"); - for (uint32_t i1 = 0; i1 < dl_data_to_ul_ack.size(); ++i1) { - j.write_int(dl_data_to_ul_ack[i1]); + for (const auto& e1 : dl_data_to_ul_ack) { + j.write_int(e1); } j.end_array(); } if (spatial_relation_info_to_add_mod_list_present) { j.start_array("spatialRelationInfoToAddModList"); - for (uint32_t i1 = 0; i1 < spatial_relation_info_to_add_mod_list.size(); ++i1) { - spatial_relation_info_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : spatial_relation_info_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (spatial_relation_info_to_release_list_present) { j.start_array("spatialRelationInfoToReleaseList"); - for (uint32_t i1 = 0; i1 < spatial_relation_info_to_release_list.size(); ++i1) { - j.write_int(spatial_relation_info_to_release_list[i1]); + for (const auto& e1 : spatial_relation_info_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -14765,8 +14780,8 @@ void pusch_cfg_s::to_json(json_writer& j) const } if (freq_hop_offset_lists_present) { j.start_array("frequencyHoppingOffsetLists"); - for (uint32_t i1 = 0; i1 < freq_hop_offset_lists.size(); ++i1) { - j.write_int(freq_hop_offset_lists[i1]); + for (const auto& e1 : freq_hop_offset_lists) { + j.write_int(e1); } j.end_array(); } @@ -14808,69 +14823,69 @@ void pusch_cfg_s::to_json(json_writer& j) const std::string pusch_cfg_s::tx_cfg_opts::to_string() const { - static constexpr const char* options[] = {"codebook", "nonCodebook"}; + static const char* options[] = {"codebook", "nonCodebook"}; return convert_enum_idx(options, 2, value, "pusch_cfg_s::tx_cfg_e_"); } std::string pusch_cfg_s::freq_hop_opts::to_string() const { - static constexpr const char* options[] = {"intraSlot", "interSlot"}; + static const char* options[] = {"intraSlot", "interSlot"}; return convert_enum_idx(options, 2, value, "pusch_cfg_s::freq_hop_e_"); } std::string pusch_cfg_s::res_alloc_opts::to_string() const { - static constexpr const char* options[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; + static const char* options[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; return convert_enum_idx(options, 3, value, "pusch_cfg_s::res_alloc_e_"); } uint8_t pusch_cfg_s::res_alloc_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "pusch_cfg_s::res_alloc_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "pusch_cfg_s::res_alloc_e_"); } std::string pusch_cfg_s::pusch_aggregation_factor_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n8"}; + static const char* options[] = {"n2", "n4", "n8"}; return convert_enum_idx(options, 3, value, "pusch_cfg_s::pusch_aggregation_factor_e_"); } uint8_t pusch_cfg_s::pusch_aggregation_factor_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8}; - return convert_enum_idx(options, 3, value, "pusch_cfg_s::pusch_aggregation_factor_e_"); + static const uint8_t options[] = {2, 4, 8}; + return map_enum_number(options, 3, value, "pusch_cfg_s::pusch_aggregation_factor_e_"); } std::string pusch_cfg_s::mcs_table_opts::to_string() const { - static constexpr const char* options[] = {"qam256", "qam64LowSE"}; + static const char* options[] = {"qam256", "qam64LowSE"}; return convert_enum_idx(options, 2, value, "pusch_cfg_s::mcs_table_e_"); } uint16_t pusch_cfg_s::mcs_table_opts::to_number() const { - static constexpr uint16_t options[] = {256, 64}; - return convert_enum_idx(options, 2, value, "pusch_cfg_s::mcs_table_e_"); + static const uint16_t options[] = {256, 64}; + return map_enum_number(options, 2, value, "pusch_cfg_s::mcs_table_e_"); } std::string pusch_cfg_s::mcs_table_transform_precoder_opts::to_string() const { - static constexpr const char* options[] = {"qam256", "qam64LowSE"}; + static const char* options[] = {"qam256", "qam64LowSE"}; return convert_enum_idx(options, 2, value, "pusch_cfg_s::mcs_table_transform_precoder_e_"); } uint16_t pusch_cfg_s::mcs_table_transform_precoder_opts::to_number() const { - static constexpr uint16_t options[] = {256, 64}; - return convert_enum_idx(options, 2, value, "pusch_cfg_s::mcs_table_transform_precoder_e_"); + static const uint16_t options[] = {256, 64}; + return map_enum_number(options, 2, value, "pusch_cfg_s::mcs_table_transform_precoder_e_"); } std::string pusch_cfg_s::transform_precoder_opts::to_string() const { - static constexpr const char* options[] = {"enabled", "disabled"}; + static const char* options[] = {"enabled", "disabled"}; return convert_enum_idx(options, 2, value, "pusch_cfg_s::transform_precoder_e_"); } std::string pusch_cfg_s::codebook_subset_opts::to_string() const { - static constexpr const char* options[] = {"fullyAndPartialAndNonCoherent", "partialAndNonCoherent", "nonCoherent"}; + static const char* options[] = {"fullyAndPartialAndNonCoherent", "partialAndNonCoherent", "nonCoherent"}; return convert_enum_idx(options, 3, value, "pusch_cfg_s::codebook_subset_e_"); } @@ -14959,7 +14974,7 @@ void radio_link_monitoring_rs_s::to_json(json_writer& j) const std::string radio_link_monitoring_rs_s::purpose_opts::to_string() const { - static constexpr const char* options[] = {"beamFailure", "rlf", "both"}; + static const char* options[] = {"beamFailure", "rlf", "both"}; return convert_enum_idx(options, 3, value, "radio_link_monitoring_rs_s::purpose_e_"); } @@ -15060,7 +15075,7 @@ SRSASN_CODE radio_link_monitoring_rs_s::detection_res_c_::unpack(cbit_ref& bref) std::string radio_link_monitoring_rs_s::detection_res_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ssb-Index", "csi-RS-Index"}; + static const char* options[] = {"ssb-Index", "csi-RS-Index"}; return convert_enum_idx(options, 2, value, "radio_link_monitoring_rs_s::detection_res_c_::types"); } @@ -15363,14 +15378,14 @@ SRSASN_CODE rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_bl std::string rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"oneSlot", "twoSlots"}; + static const char* options[] = {"oneSlot", "twoSlots"}; return convert_enum_idx( options, 2, value, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types"); } uint8_t rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2}; + return map_enum_number( options, 2, value, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types"); } @@ -15601,26 +15616,26 @@ SRSASN_CODE rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_p std::string rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n5", "n8", "n10", "n20", "n40"}; + static const char* options[] = {"n2", "n4", "n5", "n8", "n10", "n20", "n40"}; return convert_enum_idx( options, 7, value, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types"); } uint8_t rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 5, 8, 10, 20, 40}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 5, 8, 10, 20, 40}; + return map_enum_number( options, 7, value, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types"); } std::string rate_match_pattern_s::pattern_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"bitmaps", "controlResourceSet"}; + static const char* options[] = {"bitmaps", "controlResourceSet"}; return convert_enum_idx(options, 2, value, "rate_match_pattern_s::pattern_type_c_::types"); } std::string rate_match_pattern_s::dummy_opts::to_string() const { - static constexpr const char* options[] = {"dynamic", "semiStatic"}; + static const char* options[] = {"dynamic", "semiStatic"}; return convert_enum_idx(options, 2, value, "rate_match_pattern_s::dummy_e_"); } @@ -15720,7 +15735,7 @@ SRSASN_CODE rate_match_pattern_group_item_c_::unpack(cbit_ref& bref) std::string rate_match_pattern_group_item_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"cellLevel", "bwpLevel"}; + static const char* options[] = {"cellLevel", "bwpLevel"}; return convert_enum_idx(options, 2, value, "rate_match_pattern_group_item_c_::types"); } @@ -15819,29 +15834,29 @@ void srs_cfg_s::to_json(json_writer& j) const j.start_obj(); if (srs_res_set_to_release_list_present) { j.start_array("srs-ResourceSetToReleaseList"); - for (uint32_t i1 = 0; i1 < srs_res_set_to_release_list.size(); ++i1) { - j.write_int(srs_res_set_to_release_list[i1]); + for (const auto& e1 : srs_res_set_to_release_list) { + j.write_int(e1); } j.end_array(); } if (srs_res_set_to_add_mod_list_present) { j.start_array("srs-ResourceSetToAddModList"); - for (uint32_t i1 = 0; i1 < srs_res_set_to_add_mod_list.size(); ++i1) { - srs_res_set_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : srs_res_set_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (srs_res_to_release_list_present) { j.start_array("srs-ResourceToReleaseList"); - for (uint32_t i1 = 0; i1 < srs_res_to_release_list.size(); ++i1) { - j.write_int(srs_res_to_release_list[i1]); + for (const auto& e1 : srs_res_to_release_list) { + j.write_int(e1); } j.end_array(); } if (srs_res_to_add_mod_list_present) { j.start_array("srs-ResourceToAddModList"); - for (uint32_t i1 = 0; i1 < srs_res_to_add_mod_list.size(); ++i1) { - srs_res_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : srs_res_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } @@ -15946,8 +15961,8 @@ void slot_format_combination_s::to_json(json_writer& j) const j.start_obj(); j.write_int("slotFormatCombinationId", slot_format_combination_id); j.start_array("slotFormats"); - for (uint32_t i1 = 0; i1 < slot_formats.size(); ++i1) { - j.write_int(slot_formats[i1]); + for (const auto& e1 : slot_formats) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -16055,8 +16070,8 @@ void zp_csi_rs_res_set_s::to_json(json_writer& j) const j.start_obj(); j.write_int("zp-CSI-RS-ResourceSetId", zp_csi_rs_res_set_id); j.start_array("zp-CSI-RS-ResourceIdList"); - for (uint32_t i1 = 0; i1 < zp_csi_rs_res_id_list.size(); ++i1) { - j.write_int(zp_csi_rs_res_id_list[i1]); + for (const auto& e1 : zp_csi_rs_res_id_list) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -16167,8 +16182,8 @@ void cfra_csirs_res_s::to_json(json_writer& j) const j.start_obj(); j.write_int("csi-RS", csi_rs); j.start_array("ra-OccasionList"); - for (uint32_t i1 = 0; i1 < ra_occasion_list.size(); ++i1) { - j.write_int(ra_occasion_list[i1]); + for (const auto& e1 : ra_occasion_list) { + j.write_int(e1); } j.end_array(); j.write_int("ra-PreambleIndex", ra_preamb_idx); @@ -16219,8 +16234,8 @@ void csi_aperiodic_trigger_state_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("associatedReportConfigInfoList"); - for (uint32_t i1 = 0; i1 < associated_report_cfg_info_list.size(); ++i1) { - associated_report_cfg_info_list[i1].to_json(j); + for (const auto& e1 : associated_report_cfg_info_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -16444,14 +16459,14 @@ SRSASN_CODE csi_report_periodicity_and_offset_c::unpack(cbit_ref& bref) std::string csi_report_periodicity_and_offset_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "slots4", "slots5", "slots8", "slots10", "slots16", "slots20", "slots40", "slots80", "slots160", "slots320"}; return convert_enum_idx(options, 10, value, "csi_report_periodicity_and_offset_c::types"); } uint16_t csi_report_periodicity_and_offset_c::types_opts::to_number() const { - static constexpr uint16_t options[] = {4, 5, 8, 10, 16, 20, 40, 80, 160, 320}; - return convert_enum_idx(options, 10, value, "csi_report_periodicity_and_offset_c::types"); + static const uint16_t options[] = {4, 5, 8, 10, 16, 20, 40, 80, 160, 320}; + return map_enum_number(options, 10, value, "csi_report_periodicity_and_offset_c::types"); } // CSI-SemiPersistentOnPUSCH-TriggerState ::= SEQUENCE @@ -17293,19 +17308,19 @@ SRSASN_CODE codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_sing std::string codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_:: more_than_two_s_::n1_n2_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"two-one-TypeI-SinglePanel-Restriction", - "two-two-TypeI-SinglePanel-Restriction", - "four-one-TypeI-SinglePanel-Restriction", - "three-two-TypeI-SinglePanel-Restriction", - "six-one-TypeI-SinglePanel-Restriction", - "four-two-TypeI-SinglePanel-Restriction", - "eight-one-TypeI-SinglePanel-Restriction", - "four-three-TypeI-SinglePanel-Restriction", - "six-two-TypeI-SinglePanel-Restriction", - "twelve-one-TypeI-SinglePanel-Restriction", - "four-four-TypeI-SinglePanel-Restriction", - "eight-two-TypeI-SinglePanel-Restriction", - "sixteen-one-TypeI-SinglePanel-Restriction"}; + static const char* options[] = {"two-one-TypeI-SinglePanel-Restriction", + "two-two-TypeI-SinglePanel-Restriction", + "four-one-TypeI-SinglePanel-Restriction", + "three-two-TypeI-SinglePanel-Restriction", + "six-one-TypeI-SinglePanel-Restriction", + "four-two-TypeI-SinglePanel-Restriction", + "eight-one-TypeI-SinglePanel-Restriction", + "four-three-TypeI-SinglePanel-Restriction", + "six-two-TypeI-SinglePanel-Restriction", + "twelve-one-TypeI-SinglePanel-Restriction", + "four-four-TypeI-SinglePanel-Restriction", + "eight-two-TypeI-SinglePanel-Restriction", + "sixteen-one-TypeI-SinglePanel-Restriction"}; return convert_enum_idx(options, 13, value, @@ -17316,7 +17331,7 @@ std::string codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_sing std::string codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_:: types_opts::to_string() const { - static constexpr const char* options[] = {"two", "moreThanTwo"}; + static const char* options[] = {"two", "moreThanTwo"}; return convert_enum_idx( options, 2, @@ -17326,8 +17341,8 @@ std::string codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_sing uint8_t codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_:: types_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx( + static const uint8_t options[] = {2}; + return map_enum_number( options, 1, value, @@ -17593,14 +17608,14 @@ std::string codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"two-two-one-TypeI-MultiPanel-Restriction", - "two-four-one-TypeI-MultiPanel-Restriction", - "four-two-one-TypeI-MultiPanel-Restriction", - "two-two-two-TypeI-MultiPanel-Restriction", - "two-eight-one-TypeI-MultiPanel-Restriction", - "four-four-one-TypeI-MultiPanel-Restriction", - "two-four-two-TypeI-MultiPanel-Restriction", - "four-two-two-TypeI-MultiPanel-Restriction"}; + static const char* options[] = {"two-two-one-TypeI-MultiPanel-Restriction", + "two-four-one-TypeI-MultiPanel-Restriction", + "four-two-one-TypeI-MultiPanel-Restriction", + "two-two-two-TypeI-MultiPanel-Restriction", + "two-eight-one-TypeI-MultiPanel-Restriction", + "four-four-one-TypeI-MultiPanel-Restriction", + "two-four-two-TypeI-MultiPanel-Restriction", + "four-two-two-TypeI-MultiPanel-Restriction"}; return convert_enum_idx( options, 8, @@ -17610,7 +17625,7 @@ codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_:: std::string codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"typeI-SinglePanel", "typeI-MultiPanel"}; + static const char* options[] = {"typeI-SinglePanel", "typeI-MultiPanel"}; return convert_enum_idx(options, 2, value, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::types"); } @@ -18129,19 +18144,19 @@ codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codeb std::string codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_:: types_opts::to_string() const { - static constexpr const char* options[] = {"two-one", - "two-two", - "four-one", - "three-two", - "six-one", - "four-two", - "eight-one", - "four-three", - "six-two", - "twelve-one", - "four-four", - "eight-two", - "sixteen-one"}; + static const char* options[] = {"two-one", + "two-two", + "four-one", + "three-two", + "six-one", + "four-two", + "eight-one", + "four-three", + "six-two", + "twelve-one", + "four-four", + "eight-two", + "sixteen-one"}; return convert_enum_idx( options, 13, @@ -18153,7 +18168,7 @@ std::string codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_port_sel_s_::port_sel_sampling_size_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4"}; + static const char* options[] = {"n1", "n2", "n3", "n4"}; return convert_enum_idx( options, 4, @@ -18164,8 +18179,8 @@ uint8_t codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_port_sel_s_::port_sel_sampling_size_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 3, 4}; + return map_enum_number( options, 4, value, @@ -18174,41 +18189,41 @@ codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_port_sel_s_::po std::string codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"typeII", "typeII-PortSelection"}; + static const char* options[] = {"typeII", "typeII-PortSelection"}; return convert_enum_idx(options, 2, value, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::types"); } std::string codebook_cfg_s::codebook_type_c_::type2_s_::phase_alphabet_size_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8"}; + static const char* options[] = {"n4", "n8"}; return convert_enum_idx(options, 2, value, "codebook_cfg_s::codebook_type_c_::type2_s_::phase_alphabet_size_e_"); } uint8_t codebook_cfg_s::codebook_type_c_::type2_s_::phase_alphabet_size_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8}; - return convert_enum_idx(options, 2, value, "codebook_cfg_s::codebook_type_c_::type2_s_::phase_alphabet_size_e_"); + static const uint8_t options[] = {4, 8}; + return map_enum_number(options, 2, value, "codebook_cfg_s::codebook_type_c_::type2_s_::phase_alphabet_size_e_"); } std::string codebook_cfg_s::codebook_type_c_::type2_s_::nof_beams_opts::to_string() const { - static constexpr const char* options[] = {"two", "three", "four"}; + static const char* options[] = {"two", "three", "four"}; return convert_enum_idx(options, 3, value, "codebook_cfg_s::codebook_type_c_::type2_s_::nof_beams_e_"); } uint8_t codebook_cfg_s::codebook_type_c_::type2_s_::nof_beams_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4}; - return convert_enum_idx(options, 3, value, "codebook_cfg_s::codebook_type_c_::type2_s_::nof_beams_e_"); + static const uint8_t options[] = {2, 3, 4}; + return map_enum_number(options, 3, value, "codebook_cfg_s::codebook_type_c_::type2_s_::nof_beams_e_"); } std::string codebook_cfg_s::codebook_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"type1", "type2"}; + static const char* options[] = {"type1", "type2"}; return convert_enum_idx(options, 2, value, "codebook_cfg_s::codebook_type_c_::types"); } uint8_t codebook_cfg_s::codebook_type_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "codebook_cfg_s::codebook_type_c_::types"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "codebook_cfg_s::codebook_type_c_::types"); } // FrequencyInfoDL ::= SEQUENCE @@ -18247,14 +18262,14 @@ void freq_info_dl_s::to_json(json_writer& j) const j.write_int("absoluteFrequencySSB", absolute_freq_ssb); } j.start_array("frequencyBandList"); - for (uint32_t i1 = 0; i1 < freq_band_list.size(); ++i1) { - j.write_int(freq_band_list[i1]); + for (const auto& e1 : freq_band_list) { + j.write_int(e1); } j.end_array(); j.write_int("absoluteFrequencyPointA", absolute_freq_point_a); j.start_array("scs-SpecificCarrierList"); - for (uint32_t i1 = 0; i1 < scs_specific_carrier_list.size(); ++i1) { - scs_specific_carrier_list[i1].to_json(j); + for (const auto& e1 : scs_specific_carrier_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -18316,8 +18331,8 @@ void freq_info_ul_s::to_json(json_writer& j) const j.start_obj(); if (freq_band_list_present) { j.start_array("frequencyBandList"); - for (uint32_t i1 = 0; i1 < freq_band_list.size(); ++i1) { - j.write_int(freq_band_list[i1]); + for (const auto& e1 : freq_band_list) { + j.write_int(e1); } j.end_array(); } @@ -18325,8 +18340,8 @@ void freq_info_ul_s::to_json(json_writer& j) const j.write_int("absoluteFrequencyPointA", absolute_freq_point_a); } j.start_array("scs-SpecificCarrierList"); - for (uint32_t i1 = 0; i1 < scs_specific_carrier_list.size(); ++i1) { - scs_specific_carrier_list[i1].to_json(j); + for (const auto& e1 : scs_specific_carrier_list) { + e1.to_json(j); } j.end_array(); if (add_spec_emission_present) { @@ -18425,29 +18440,29 @@ void pdcch_cfg_s::to_json(json_writer& j) const j.start_obj(); if (ctrl_res_set_to_add_mod_list_present) { j.start_array("controlResourceSetToAddModList"); - for (uint32_t i1 = 0; i1 < ctrl_res_set_to_add_mod_list.size(); ++i1) { - ctrl_res_set_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : ctrl_res_set_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (ctrl_res_set_to_release_list_present) { j.start_array("controlResourceSetToReleaseList"); - for (uint32_t i1 = 0; i1 < ctrl_res_set_to_release_list.size(); ++i1) { - j.write_int(ctrl_res_set_to_release_list[i1]); + for (const auto& e1 : ctrl_res_set_to_release_list) { + j.write_int(e1); } j.end_array(); } if (search_spaces_to_add_mod_list_present) { j.start_array("searchSpacesToAddModList"); - for (uint32_t i1 = 0; i1 < search_spaces_to_add_mod_list.size(); ++i1) { - search_spaces_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : search_spaces_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (search_spaces_to_release_list_present) { j.start_array("searchSpacesToReleaseList"); - for (uint32_t i1 = 0; i1 < search_spaces_to_release_list.size(); ++i1) { - j.write_int(search_spaces_to_release_list[i1]); + for (const auto& e1 : search_spaces_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -18677,15 +18692,15 @@ void pdsch_cfg_s::to_json(json_writer& j) const } if (tci_states_to_add_mod_list_present) { j.start_array("tci-StatesToAddModList"); - for (uint32_t i1 = 0; i1 < tci_states_to_add_mod_list.size(); ++i1) { - tci_states_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : tci_states_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (tci_states_to_release_list_present) { j.start_array("tci-StatesToReleaseList"); - for (uint32_t i1 = 0; i1 < tci_states_to_release_list.size(); ++i1) { - j.write_int(tci_states_to_release_list[i1]); + for (const auto& e1 : tci_states_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -18702,29 +18717,29 @@ void pdsch_cfg_s::to_json(json_writer& j) const } if (rate_match_pattern_to_add_mod_list_present) { j.start_array("rateMatchPatternToAddModList"); - for (uint32_t i1 = 0; i1 < rate_match_pattern_to_add_mod_list.size(); ++i1) { - rate_match_pattern_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : rate_match_pattern_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (rate_match_pattern_to_release_list_present) { j.start_array("rateMatchPatternToReleaseList"); - for (uint32_t i1 = 0; i1 < rate_match_pattern_to_release_list.size(); ++i1) { - j.write_int(rate_match_pattern_to_release_list[i1]); + for (const auto& e1 : rate_match_pattern_to_release_list) { + j.write_int(e1); } j.end_array(); } if (rate_match_pattern_group1_present) { j.start_array("rateMatchPatternGroup1"); - for (uint32_t i1 = 0; i1 < rate_match_pattern_group1.size(); ++i1) { - rate_match_pattern_group1[i1].to_json(j); + for (const auto& e1 : rate_match_pattern_group1) { + e1.to_json(j); } j.end_array(); } if (rate_match_pattern_group2_present) { j.start_array("rateMatchPatternGroup2"); - for (uint32_t i1 = 0; i1 < rate_match_pattern_group2.size(); ++i1) { - rate_match_pattern_group2[i1].to_json(j); + for (const auto& e1 : rate_match_pattern_group2) { + e1.to_json(j); } j.end_array(); } @@ -18739,43 +18754,43 @@ void pdsch_cfg_s::to_json(json_writer& j) const prb_bundling_type.to_json(j); if (zp_csi_rs_res_to_add_mod_list_present) { j.start_array("zp-CSI-RS-ResourceToAddModList"); - for (uint32_t i1 = 0; i1 < zp_csi_rs_res_to_add_mod_list.size(); ++i1) { - zp_csi_rs_res_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : zp_csi_rs_res_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (zp_csi_rs_res_to_release_list_present) { j.start_array("zp-CSI-RS-ResourceToReleaseList"); - for (uint32_t i1 = 0; i1 < zp_csi_rs_res_to_release_list.size(); ++i1) { - j.write_int(zp_csi_rs_res_to_release_list[i1]); + for (const auto& e1 : zp_csi_rs_res_to_release_list) { + j.write_int(e1); } j.end_array(); } if (aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present) { j.start_array("aperiodic-ZP-CSI-RS-ResourceSetsToAddModList"); - for (uint32_t i1 = 0; i1 < aperiodic_zp_csi_rs_res_sets_to_add_mod_list.size(); ++i1) { - aperiodic_zp_csi_rs_res_sets_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : aperiodic_zp_csi_rs_res_sets_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (aperiodic_zp_csi_rs_res_sets_to_release_list_present) { j.start_array("aperiodic-ZP-CSI-RS-ResourceSetsToReleaseList"); - for (uint32_t i1 = 0; i1 < aperiodic_zp_csi_rs_res_sets_to_release_list.size(); ++i1) { - j.write_int(aperiodic_zp_csi_rs_res_sets_to_release_list[i1]); + for (const auto& e1 : aperiodic_zp_csi_rs_res_sets_to_release_list) { + j.write_int(e1); } j.end_array(); } if (sp_zp_csi_rs_res_sets_to_add_mod_list_present) { j.start_array("sp-ZP-CSI-RS-ResourceSetsToAddModList"); - for (uint32_t i1 = 0; i1 < sp_zp_csi_rs_res_sets_to_add_mod_list.size(); ++i1) { - sp_zp_csi_rs_res_sets_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : sp_zp_csi_rs_res_sets_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (sp_zp_csi_rs_res_sets_to_release_list_present) { j.start_array("sp-ZP-CSI-RS-ResourceSetsToReleaseList"); - for (uint32_t i1 = 0; i1 < sp_zp_csi_rs_res_sets_to_release_list.size(); ++i1) { - j.write_int(sp_zp_csi_rs_res_sets_to_release_list[i1]); + for (const auto& e1 : sp_zp_csi_rs_res_sets_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -18788,68 +18803,68 @@ void pdsch_cfg_s::to_json(json_writer& j) const std::string pdsch_cfg_s::vrb_to_prb_interleaver_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "pdsch_cfg_s::vrb_to_prb_interleaver_e_"); } uint8_t pdsch_cfg_s::vrb_to_prb_interleaver_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "pdsch_cfg_s::vrb_to_prb_interleaver_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "pdsch_cfg_s::vrb_to_prb_interleaver_e_"); } std::string pdsch_cfg_s::res_alloc_opts::to_string() const { - static constexpr const char* options[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; + static const char* options[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; return convert_enum_idx(options, 3, value, "pdsch_cfg_s::res_alloc_e_"); } uint8_t pdsch_cfg_s::res_alloc_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "pdsch_cfg_s::res_alloc_e_"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "pdsch_cfg_s::res_alloc_e_"); } std::string pdsch_cfg_s::pdsch_aggregation_factor_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n8"}; + static const char* options[] = {"n2", "n4", "n8"}; return convert_enum_idx(options, 3, value, "pdsch_cfg_s::pdsch_aggregation_factor_e_"); } uint8_t pdsch_cfg_s::pdsch_aggregation_factor_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8}; - return convert_enum_idx(options, 3, value, "pdsch_cfg_s::pdsch_aggregation_factor_e_"); + static const uint8_t options[] = {2, 4, 8}; + return map_enum_number(options, 3, value, "pdsch_cfg_s::pdsch_aggregation_factor_e_"); } std::string pdsch_cfg_s::rbg_size_opts::to_string() const { - static constexpr const char* options[] = {"config1", "config2"}; + static const char* options[] = {"config1", "config2"}; return convert_enum_idx(options, 2, value, "pdsch_cfg_s::rbg_size_e_"); } uint8_t pdsch_cfg_s::rbg_size_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "pdsch_cfg_s::rbg_size_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "pdsch_cfg_s::rbg_size_e_"); } std::string pdsch_cfg_s::mcs_table_opts::to_string() const { - static constexpr const char* options[] = {"qam256", "qam64LowSE"}; + static const char* options[] = {"qam256", "qam64LowSE"}; return convert_enum_idx(options, 2, value, "pdsch_cfg_s::mcs_table_e_"); } uint16_t pdsch_cfg_s::mcs_table_opts::to_number() const { - static constexpr uint16_t options[] = {256, 64}; - return convert_enum_idx(options, 2, value, "pdsch_cfg_s::mcs_table_e_"); + static const uint16_t options[] = {256, 64}; + return map_enum_number(options, 2, value, "pdsch_cfg_s::mcs_table_e_"); } std::string pdsch_cfg_s::max_nrof_code_words_sched_by_dci_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2"}; + static const char* options[] = {"n1", "n2"}; return convert_enum_idx(options, 2, value, "pdsch_cfg_s::max_nrof_code_words_sched_by_dci_e_"); } uint8_t pdsch_cfg_s::max_nrof_code_words_sched_by_dci_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "pdsch_cfg_s::max_nrof_code_words_sched_by_dci_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "pdsch_cfg_s::max_nrof_code_words_sched_by_dci_e_"); } void pdsch_cfg_s::prb_bundling_type_c_::destroy_() @@ -19005,38 +19020,38 @@ SRSASN_CODE pdsch_cfg_s::prb_bundling_type_c_::unpack(cbit_ref& bref) std::string pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_opts::to_string() const { - static constexpr const char* options[] = {"n4", "wideband"}; + static const char* options[] = {"n4", "wideband"}; return convert_enum_idx(options, 2, value, "pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_e_"); } uint8_t pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_opts::to_number() const { - static constexpr uint8_t options[] = {4}; - return convert_enum_idx(options, 1, value, "pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_e_"); + static const uint8_t options[] = {4}; + return map_enum_number(options, 1, value, "pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_e_"); } std::string pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set1_opts::to_string() const { - static constexpr const char* options[] = {"n4", "wideband", "n2-wideband", "n4-wideband"}; + static const char* options[] = {"n4", "wideband", "n2-wideband", "n4-wideband"}; return convert_enum_idx( options, 4, value, "pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set1_e_"); } std::string pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set2_opts::to_string() const { - static constexpr const char* options[] = {"n4", "wideband"}; + static const char* options[] = {"n4", "wideband"}; return convert_enum_idx( options, 2, value, "pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set2_e_"); } uint8_t pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set2_opts::to_number() const { - static constexpr uint8_t options[] = {4}; - return convert_enum_idx( + static const uint8_t options[] = {4}; + return map_enum_number( options, 1, value, "pdsch_cfg_s::prb_bundling_type_c_::dynamic_bundling_s_::bundle_size_set2_e_"); } std::string pdsch_cfg_s::prb_bundling_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"staticBundling", "dynamicBundling"}; + static const char* options[] = {"staticBundling", "dynamicBundling"}; return convert_enum_idx(options, 2, value, "pdsch_cfg_s::prb_bundling_type_c_::types"); } @@ -19087,14 +19102,14 @@ void pusch_code_block_group_tx_s::to_json(json_writer& j) const std::string pusch_code_block_group_tx_s::max_code_block_groups_per_transport_block_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n6", "n8"}; + static const char* options[] = {"n2", "n4", "n6", "n8"}; return convert_enum_idx( options, 4, value, "pusch_code_block_group_tx_s::max_code_block_groups_per_transport_block_e_"); } uint8_t pusch_code_block_group_tx_s::max_code_block_groups_per_transport_block_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 6, 8}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 6, 8}; + return map_enum_number( options, 4, value, "pusch_code_block_group_tx_s::max_code_block_groups_per_transport_block_e_"); } @@ -19196,50 +19211,50 @@ void port_idx_for8_ranks_c::to_json(json_writer& j) const } if (c.get().rank2_minus8_present) { j.start_array("rank2-8"); - for (uint32_t i1 = 0; i1 < c.get().rank2_minus8.size(); ++i1) { - j.write_int(c.get().rank2_minus8[i1]); + for (const auto& e1 : c.get().rank2_minus8) { + j.write_int(e1); } j.end_array(); } if (c.get().rank3_minus8_present) { j.start_array("rank3-8"); - for (uint32_t i1 = 0; i1 < c.get().rank3_minus8.size(); ++i1) { - j.write_int(c.get().rank3_minus8[i1]); + for (const auto& e1 : c.get().rank3_minus8) { + j.write_int(e1); } j.end_array(); } if (c.get().rank4_minus8_present) { j.start_array("rank4-8"); - for (uint32_t i1 = 0; i1 < c.get().rank4_minus8.size(); ++i1) { - j.write_int(c.get().rank4_minus8[i1]); + for (const auto& e1 : c.get().rank4_minus8) { + j.write_int(e1); } j.end_array(); } if (c.get().rank5_minus8_present) { j.start_array("rank5-8"); - for (uint32_t i1 = 0; i1 < c.get().rank5_minus8.size(); ++i1) { - j.write_int(c.get().rank5_minus8[i1]); + for (const auto& e1 : c.get().rank5_minus8) { + j.write_int(e1); } j.end_array(); } if (c.get().rank6_minus8_present) { j.start_array("rank6-8"); - for (uint32_t i1 = 0; i1 < c.get().rank6_minus8.size(); ++i1) { - j.write_int(c.get().rank6_minus8[i1]); + for (const auto& e1 : c.get().rank6_minus8) { + j.write_int(e1); } j.end_array(); } if (c.get().rank7_minus8_present) { j.start_array("rank7-8"); - for (uint32_t i1 = 0; i1 < c.get().rank7_minus8.size(); ++i1) { - j.write_int(c.get().rank7_minus8[i1]); + for (const auto& e1 : c.get().rank7_minus8) { + j.write_int(e1); } j.end_array(); } if (c.get().rank8_minus8_present) { j.start_array("rank8-8"); - for (uint32_t i1 = 0; i1 < c.get().rank8_minus8.size(); ++i1) { - j.write_int(c.get().rank8_minus8[i1]); + for (const auto& e1 : c.get().rank8_minus8) { + j.write_int(e1); } j.end_array(); } @@ -19253,22 +19268,22 @@ void port_idx_for8_ranks_c::to_json(json_writer& j) const } if (c.get().rank2_minus4_present) { j.start_array("rank2-4"); - for (uint32_t i1 = 0; i1 < c.get().rank2_minus4.size(); ++i1) { - j.write_int(c.get().rank2_minus4[i1]); + for (const auto& e1 : c.get().rank2_minus4) { + j.write_int(e1); } j.end_array(); } if (c.get().rank3_minus4_present) { j.start_array("rank3-4"); - for (uint32_t i1 = 0; i1 < c.get().rank3_minus4.size(); ++i1) { - j.write_int(c.get().rank3_minus4[i1]); + for (const auto& e1 : c.get().rank3_minus4) { + j.write_int(e1); } j.end_array(); } if (c.get().rank4_minus4_present) { j.start_array("rank4-4"); - for (uint32_t i1 = 0; i1 < c.get().rank4_minus4.size(); ++i1) { - j.write_int(c.get().rank4_minus4[i1]); + for (const auto& e1 : c.get().rank4_minus4) { + j.write_int(e1); } j.end_array(); } @@ -19282,8 +19297,8 @@ void port_idx_for8_ranks_c::to_json(json_writer& j) const } if (c.get().rank2_minus2_present) { j.start_array("rank2-2"); - for (uint32_t i1 = 0; i1 < c.get().rank2_minus2.size(); ++i1) { - j.write_int(c.get().rank2_minus2[i1]); + for (const auto& e1 : c.get().rank2_minus2) { + j.write_int(e1); } j.end_array(); } @@ -19515,13 +19530,13 @@ SRSASN_CODE port_idx_for8_ranks_c::unpack(cbit_ref& bref) std::string port_idx_for8_ranks_c::types_opts::to_string() const { - static constexpr const char* options[] = {"portIndex8", "portIndex4", "portIndex2", "portIndex1"}; + static const char* options[] = {"portIndex8", "portIndex4", "portIndex2", "portIndex1"}; return convert_enum_idx(options, 4, value, "port_idx_for8_ranks_c::types"); } uint8_t port_idx_for8_ranks_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {8, 4, 2, 1}; - return convert_enum_idx(options, 4, value, "port_idx_for8_ranks_c::types"); + static const uint8_t options[] = {8, 4, 2, 1}; + return map_enum_number(options, 4, value, "port_idx_for8_ranks_c::types"); } // RadioLinkMonitoringConfig ::= SEQUENCE @@ -19576,15 +19591,15 @@ void radio_link_monitoring_cfg_s::to_json(json_writer& j) const j.start_obj(); if (fail_detection_res_to_add_mod_list_present) { j.start_array("failureDetectionResourcesToAddModList"); - for (uint32_t i1 = 0; i1 < fail_detection_res_to_add_mod_list.size(); ++i1) { - fail_detection_res_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : fail_detection_res_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (fail_detection_res_to_release_list_present) { j.start_array("failureDetectionResourcesToReleaseList"); - for (uint32_t i1 = 0; i1 < fail_detection_res_to_release_list.size(); ++i1) { - j.write_int(fail_detection_res_to_release_list[i1]); + for (const auto& e1 : fail_detection_res_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -19599,24 +19614,24 @@ void radio_link_monitoring_cfg_s::to_json(json_writer& j) const std::string radio_link_monitoring_cfg_s::beam_fail_instance_max_count_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; return convert_enum_idx(options, 8, value, "radio_link_monitoring_cfg_s::beam_fail_instance_max_count_e_"); } uint8_t radio_link_monitoring_cfg_s::beam_fail_instance_max_count_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return convert_enum_idx(options, 8, value, "radio_link_monitoring_cfg_s::beam_fail_instance_max_count_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(options, 8, value, "radio_link_monitoring_cfg_s::beam_fail_instance_max_count_e_"); } std::string radio_link_monitoring_cfg_s::beam_fail_detection_timer_opts::to_string() const { - static constexpr const char* options[] = {"pbfd1", "pbfd2", "pbfd3", "pbfd4", "pbfd5", "pbfd6", "pbfd8", "pbfd10"}; + static const char* options[] = {"pbfd1", "pbfd2", "pbfd3", "pbfd4", "pbfd5", "pbfd6", "pbfd8", "pbfd10"}; return convert_enum_idx(options, 8, value, "radio_link_monitoring_cfg_s::beam_fail_detection_timer_e_"); } uint8_t radio_link_monitoring_cfg_s::beam_fail_detection_timer_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return convert_enum_idx(options, 8, value, "radio_link_monitoring_cfg_s::beam_fail_detection_timer_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(options, 8, value, "radio_link_monitoring_cfg_s::beam_fail_detection_timer_e_"); } // SPS-Config ::= SEQUENCE @@ -19664,28 +19679,28 @@ void sps_cfg_s::to_json(json_writer& j) const std::string sps_cfg_s::periodicity_opts::to_string() const { - static constexpr const char* options[] = {"ms10", - "ms20", - "ms32", - "ms40", - "ms64", - "ms80", - "ms128", - "ms160", - "ms320", - "ms640", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"ms10", + "ms20", + "ms32", + "ms40", + "ms64", + "ms80", + "ms128", + "ms160", + "ms320", + "ms640", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "sps_cfg_s::periodicity_e_"); } uint16_t sps_cfg_s::periodicity_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 320, 640}; - return convert_enum_idx(options, 10, value, "sps_cfg_s::periodicity_e_"); + static const uint16_t options[] = {10, 20, 32, 40, 64, 80, 128, 160, 320, 640}; + return map_enum_number(options, 10, value, "sps_cfg_s::periodicity_e_"); } // SRS-TPC-PDCCH-Config ::= SEQUENCE @@ -19714,8 +19729,8 @@ void srs_tpc_pdcch_cfg_s::to_json(json_writer& j) const j.start_obj(); if (srs_cc_set_idxlist_present) { j.start_array("srs-CC-SetIndexlist"); - for (uint32_t i1 = 0; i1 < srs_cc_set_idxlist.size(); ++i1) { - srs_cc_set_idxlist[i1].to_json(j); + for (const auto& e1 : srs_cc_set_idxlist) { + e1.to_json(j); } j.end_array(); } @@ -19775,8 +19790,8 @@ void slot_format_combinations_per_cell_s::to_json(json_writer& j) const } if (slot_format_combinations_present) { j.start_array("slotFormatCombinations"); - for (uint32_t i1 = 0; i1 < slot_format_combinations.size(); ++i1) { - slot_format_combinations[i1].to_json(j); + for (const auto& e1 : slot_format_combinations) { + e1.to_json(j); } j.end_array(); } @@ -19988,18 +20003,17 @@ void cfra_s::to_json(json_writer& j) const std::string cfra_s::occasions_s_::ssb_per_rach_occasion_opts::to_string() const { - static constexpr const char* options[] = { - "oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; + static const char* options[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; return convert_enum_idx(options, 8, value, "cfra_s::occasions_s_::ssb_per_rach_occasion_e_"); } float cfra_s::occasions_s_::ssb_per_rach_occasion_opts::to_number() const { - static constexpr float options[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; - return convert_enum_idx(options, 8, value, "cfra_s::occasions_s_::ssb_per_rach_occasion_e_"); + static const float options[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; + return map_enum_number(options, 8, value, "cfra_s::occasions_s_::ssb_per_rach_occasion_e_"); } std::string cfra_s::occasions_s_::ssb_per_rach_occasion_opts::to_number_string() const { - static constexpr const char* options[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; + static const char* options[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; return convert_enum_idx(options, 8, value, "cfra_s::occasions_s_::ssb_per_rach_occasion_e_"); } @@ -20078,8 +20092,8 @@ void cfra_s::res_c_::to_json(json_writer& j) const j.write_fieldname("ssb"); j.start_obj(); j.start_array("ssb-ResourceList"); - for (uint32_t i1 = 0; i1 < c.get().ssb_res_list.size(); ++i1) { - c.get().ssb_res_list[i1].to_json(j); + for (const auto& e1 : c.get().ssb_res_list) { + e1.to_json(j); } j.end_array(); j.write_int("ra-ssb-OccasionMaskIndex", c.get().ra_ssb_occasion_mask_idx); @@ -20089,8 +20103,8 @@ void cfra_s::res_c_::to_json(json_writer& j) const j.write_fieldname("csirs"); j.start_obj(); j.start_array("csirs-ResourceList"); - for (uint32_t i1 = 0; i1 < c.get().csirs_res_list.size(); ++i1) { - c.get().csirs_res_list[i1].to_json(j); + for (const auto& e1 : c.get().csirs_res_list) { + e1.to_json(j); } j.end_array(); j.write_int("rsrp-ThresholdCSI-RS", c.get().rsrp_thres_csi_rs); @@ -20142,7 +20156,7 @@ SRSASN_CODE cfra_s::res_c_::unpack(cbit_ref& bref) std::string cfra_s::res_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ssb", "csirs"}; + static const char* options[] = {"ssb", "csirs"}; return convert_enum_idx(options, 2, value, "cfra_s::res_c_::types"); } @@ -20339,39 +20353,39 @@ SRSASN_CODE csi_im_res_s::csi_im_res_elem_pattern_c_::unpack(cbit_ref& bref) std::string csi_im_res_s::csi_im_res_elem_pattern_c_::pattern0_s_::subcarrier_location_p0_opts::to_string() const { - static constexpr const char* options[] = {"s0", "s2", "s4", "s6", "s8", "s10"}; + static const char* options[] = {"s0", "s2", "s4", "s6", "s8", "s10"}; return convert_enum_idx( options, 6, value, "csi_im_res_s::csi_im_res_elem_pattern_c_::pattern0_s_::subcarrier_location_p0_e_"); } uint8_t csi_im_res_s::csi_im_res_elem_pattern_c_::pattern0_s_::subcarrier_location_p0_opts::to_number() const { - static constexpr uint8_t options[] = {0, 2, 4, 6, 8, 10}; - return convert_enum_idx( + static const uint8_t options[] = {0, 2, 4, 6, 8, 10}; + return map_enum_number( options, 6, value, "csi_im_res_s::csi_im_res_elem_pattern_c_::pattern0_s_::subcarrier_location_p0_e_"); } std::string csi_im_res_s::csi_im_res_elem_pattern_c_::pattern1_s_::subcarrier_location_p1_opts::to_string() const { - static constexpr const char* options[] = {"s0", "s4", "s8"}; + static const char* options[] = {"s0", "s4", "s8"}; return convert_enum_idx( options, 3, value, "csi_im_res_s::csi_im_res_elem_pattern_c_::pattern1_s_::subcarrier_location_p1_e_"); } uint8_t csi_im_res_s::csi_im_res_elem_pattern_c_::pattern1_s_::subcarrier_location_p1_opts::to_number() const { - static constexpr uint8_t options[] = {0, 4, 8}; - return convert_enum_idx( + static const uint8_t options[] = {0, 4, 8}; + return map_enum_number( options, 3, value, "csi_im_res_s::csi_im_res_elem_pattern_c_::pattern1_s_::subcarrier_location_p1_e_"); } std::string csi_im_res_s::csi_im_res_elem_pattern_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"pattern0", "pattern1"}; + static const char* options[] = {"pattern0", "pattern1"}; return convert_enum_idx(options, 2, value, "csi_im_res_s::csi_im_res_elem_pattern_c_::types"); } uint8_t csi_im_res_s::csi_im_res_elem_pattern_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1}; - return convert_enum_idx(options, 2, value, "csi_im_res_s::csi_im_res_elem_pattern_c_::types"); + static const uint8_t options[] = {0, 1}; + return map_enum_number(options, 2, value, "csi_im_res_s::csi_im_res_elem_pattern_c_::types"); } // CSI-IM-ResourceSet ::= SEQUENCE @@ -20396,8 +20410,8 @@ void csi_im_res_set_s::to_json(json_writer& j) const j.start_obj(); j.write_int("csi-IM-ResourceSetId", csi_im_res_set_id); j.start_array("csi-IM-Resources"); - for (uint32_t i1 = 0; i1 < csi_im_res.size(); ++i1) { - j.write_int(csi_im_res[i1]); + for (const auto& e1 : csi_im_res) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -20599,8 +20613,8 @@ void csi_report_cfg_s::to_json(json_writer& j) const j.write_str("subbandSize", subband_size.to_string()); if (non_pmi_port_ind_present) { j.start_array("non-PMI-PortIndication"); - for (uint32_t i1 = 0; i1 < non_pmi_port_ind.size(); ++i1) { - non_pmi_port_ind[i1].to_json(j); + for (const auto& e1 : non_pmi_port_ind) { + e1.to_json(j); } j.end_array(); } @@ -20717,8 +20731,8 @@ void csi_report_cfg_s::report_cfg_type_c_::to_json(json_writer& j) const j.write_fieldname("reportSlotConfig"); c.get().report_slot_cfg.to_json(j); j.start_array("pucch-CSI-ResourceList"); - for (uint32_t i1 = 0; i1 < c.get().pucch_csi_res_list.size(); ++i1) { - c.get().pucch_csi_res_list[i1].to_json(j); + for (const auto& e1 : c.get().pucch_csi_res_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -20729,8 +20743,8 @@ void csi_report_cfg_s::report_cfg_type_c_::to_json(json_writer& j) const j.write_fieldname("reportSlotConfig"); c.get().report_slot_cfg.to_json(j); j.start_array("pucch-CSI-ResourceList"); - for (uint32_t i1 = 0; i1 < c.get().pucch_csi_res_list.size(); ++i1) { - c.get().pucch_csi_res_list[i1].to_json(j); + for (const auto& e1 : c.get().pucch_csi_res_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -20740,8 +20754,8 @@ void csi_report_cfg_s::report_cfg_type_c_::to_json(json_writer& j) const j.start_obj(); j.write_str("reportSlotConfig", c.get().report_slot_cfg.to_string()); j.start_array("reportSlotOffsetList"); - for (uint32_t i1 = 0; i1 < c.get().report_slot_offset_list.size(); ++i1) { - j.write_int(c.get().report_slot_offset_list[i1]); + for (const auto& e1 : c.get().report_slot_offset_list) { + j.write_int(e1); } j.end_array(); j.write_int("p0alpha", c.get().p0alpha); @@ -20751,8 +20765,8 @@ void csi_report_cfg_s::report_cfg_type_c_::to_json(json_writer& j) const j.write_fieldname("aperiodic"); j.start_obj(); j.start_array("reportSlotOffsetList"); - for (uint32_t i1 = 0; i1 < c.get().report_slot_offset_list.size(); ++i1) { - j.write_int(c.get().report_slot_offset_list[i1]); + for (const auto& e1 : c.get().report_slot_offset_list) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -20823,20 +20837,20 @@ SRSASN_CODE csi_report_cfg_s::report_cfg_type_c_::unpack(cbit_ref& bref) std::string csi_report_cfg_s::report_cfg_type_c_::semi_persistent_on_pusch_s_::report_slot_cfg_opts::to_string() const { - static constexpr const char* options[] = {"sl5", "sl10", "sl20", "sl40", "sl80", "sl160", "sl320"}; + static const char* options[] = {"sl5", "sl10", "sl20", "sl40", "sl80", "sl160", "sl320"}; return convert_enum_idx( options, 7, value, "csi_report_cfg_s::report_cfg_type_c_::semi_persistent_on_pusch_s_::report_slot_cfg_e_"); } uint16_t csi_report_cfg_s::report_cfg_type_c_::semi_persistent_on_pusch_s_::report_slot_cfg_opts::to_number() const { - static constexpr uint16_t options[] = {5, 10, 20, 40, 80, 160, 320}; - return convert_enum_idx( + static const uint16_t options[] = {5, 10, 20, 40, 80, 160, 320}; + return map_enum_number( options, 7, value, "csi_report_cfg_s::report_cfg_type_c_::semi_persistent_on_pusch_s_::report_slot_cfg_e_"); } std::string csi_report_cfg_s::report_cfg_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"periodic", "semiPersistentOnPUCCH", "semiPersistentOnPUSCH", "aperiodic"}; + static const char* options[] = {"periodic", "semiPersistentOnPUCCH", "semiPersistentOnPUSCH", "aperiodic"}; return convert_enum_idx(options, 4, value, "csi_report_cfg_s::report_cfg_type_c_::types"); } @@ -20940,39 +20954,39 @@ SRSASN_CODE csi_report_cfg_s::report_quant_c_::unpack(cbit_ref& bref) std::string csi_report_cfg_s::report_quant_c_::cri_ri_i1_cqi_s_::pdsch_bundle_size_for_csi_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx( options, 2, value, "csi_report_cfg_s::report_quant_c_::cri_ri_i1_cqi_s_::pdsch_bundle_size_for_csi_e_"); } uint8_t csi_report_cfg_s::report_quant_c_::cri_ri_i1_cqi_s_::pdsch_bundle_size_for_csi_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4}; + return map_enum_number( options, 2, value, "csi_report_cfg_s::report_quant_c_::cri_ri_i1_cqi_s_::pdsch_bundle_size_for_csi_e_"); } std::string csi_report_cfg_s::report_quant_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"none", - "cri-RI-PMI-CQI", - "cri-RI-i1", - "cri-RI-i1-CQI", - "cri-RI-CQI", - "cri-RSRP", - "ssb-Index-RSRP", - "cri-RI-LI-PMI-CQI"}; + static const char* options[] = {"none", + "cri-RI-PMI-CQI", + "cri-RI-i1", + "cri-RI-i1-CQI", + "cri-RI-CQI", + "cri-RSRP", + "ssb-Index-RSRP", + "cri-RI-LI-PMI-CQI"}; return convert_enum_idx(options, 8, value, "csi_report_cfg_s::report_quant_c_::types"); } std::string csi_report_cfg_s::report_freq_cfg_s_::cqi_format_ind_opts::to_string() const { - static constexpr const char* options[] = {"widebandCQI", "subbandCQI"}; + static const char* options[] = {"widebandCQI", "subbandCQI"}; return convert_enum_idx(options, 2, value, "csi_report_cfg_s::report_freq_cfg_s_::cqi_format_ind_e_"); } std::string csi_report_cfg_s::report_freq_cfg_s_::pmi_format_ind_opts::to_string() const { - static constexpr const char* options[] = {"widebandPMI", "subbandPMI"}; + static const char* options[] = {"widebandPMI", "subbandPMI"}; return convert_enum_idx(options, 2, value, "csi_report_cfg_s::report_freq_cfg_s_::pmi_format_ind_e_"); } @@ -21414,52 +21428,52 @@ SRSASN_CODE csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::unpack(cbi std::string csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"subbands3", - "subbands4", - "subbands5", - "subbands6", - "subbands7", - "subbands8", - "subbands9", - "subbands10", - "subbands11", - "subbands12", - "subbands13", - "subbands14", - "subbands15", - "subbands16", - "subbands17", - "subbands18", - "subbands19-v1530"}; + static const char* options[] = {"subbands3", + "subbands4", + "subbands5", + "subbands6", + "subbands7", + "subbands8", + "subbands9", + "subbands10", + "subbands11", + "subbands12", + "subbands13", + "subbands14", + "subbands15", + "subbands16", + "subbands17", + "subbands18", + "subbands19-v1530"}; return convert_enum_idx(options, 17, value, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types"); } uint8_t csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; - return convert_enum_idx(options, 17, value, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types"); + static const uint8_t options[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; + return map_enum_number(options, 17, value, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types"); } std::string csi_report_cfg_s::time_restrict_for_ch_meass_opts::to_string() const { - static constexpr const char* options[] = {"configured", "notConfigured"}; + static const char* options[] = {"configured", "notConfigured"}; return convert_enum_idx(options, 2, value, "csi_report_cfg_s::time_restrict_for_ch_meass_e_"); } std::string csi_report_cfg_s::time_restrict_for_interference_meass_opts::to_string() const { - static constexpr const char* options[] = {"configured", "notConfigured"}; + static const char* options[] = {"configured", "notConfigured"}; return convert_enum_idx(options, 2, value, "csi_report_cfg_s::time_restrict_for_interference_meass_e_"); } std::string csi_report_cfg_s::dummy_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2"}; + static const char* options[] = {"n1", "n2"}; return convert_enum_idx(options, 2, value, "csi_report_cfg_s::dummy_e_"); } uint8_t csi_report_cfg_s::dummy_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "csi_report_cfg_s::dummy_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "csi_report_cfg_s::dummy_e_"); } void csi_report_cfg_s::group_based_beam_report_c_::set(types::options e) @@ -21526,55 +21540,55 @@ SRSASN_CODE csi_report_cfg_s::group_based_beam_report_c_::unpack(cbit_ref& bref) std::string csi_report_cfg_s::group_based_beam_report_c_::disabled_s_::nrof_reported_rs_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4"}; + static const char* options[] = {"n1", "n2", "n3", "n4"}; return convert_enum_idx( options, 4, value, "csi_report_cfg_s::group_based_beam_report_c_::disabled_s_::nrof_reported_rs_e_"); } uint8_t csi_report_cfg_s::group_based_beam_report_c_::disabled_s_::nrof_reported_rs_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 3, 4}; + return map_enum_number( options, 4, value, "csi_report_cfg_s::group_based_beam_report_c_::disabled_s_::nrof_reported_rs_e_"); } std::string csi_report_cfg_s::group_based_beam_report_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"enabled", "disabled"}; + static const char* options[] = {"enabled", "disabled"}; return convert_enum_idx(options, 2, value, "csi_report_cfg_s::group_based_beam_report_c_::types"); } std::string csi_report_cfg_s::cqi_table_opts::to_string() const { - static constexpr const char* options[] = {"table1", "table2", "table3", "spare1"}; + static const char* options[] = {"table1", "table2", "table3", "spare1"}; return convert_enum_idx(options, 4, value, "csi_report_cfg_s::cqi_table_e_"); } uint8_t csi_report_cfg_s::cqi_table_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx(options, 3, value, "csi_report_cfg_s::cqi_table_e_"); + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number(options, 3, value, "csi_report_cfg_s::cqi_table_e_"); } std::string csi_report_cfg_s::subband_size_opts::to_string() const { - static constexpr const char* options[] = {"value1", "value2"}; + static const char* options[] = {"value1", "value2"}; return convert_enum_idx(options, 2, value, "csi_report_cfg_s::subband_size_e_"); } uint8_t csi_report_cfg_s::subband_size_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "csi_report_cfg_s::subband_size_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "csi_report_cfg_s::subband_size_e_"); } std::string csi_report_cfg_s::semi_persistent_on_pusch_v1530_s_::report_slot_cfg_v1530_opts::to_string() const { - static constexpr const char* options[] = {"sl4", "sl8", "sl16"}; + static const char* options[] = {"sl4", "sl8", "sl16"}; return convert_enum_idx( options, 3, value, "csi_report_cfg_s::semi_persistent_on_pusch_v1530_s_::report_slot_cfg_v1530_e_"); } uint8_t csi_report_cfg_s::semi_persistent_on_pusch_v1530_s_::report_slot_cfg_v1530_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16}; - return convert_enum_idx( + static const uint8_t options[] = {4, 8, 16}; + return map_enum_number( options, 3, value, "csi_report_cfg_s::semi_persistent_on_pusch_v1530_s_::report_slot_cfg_v1530_e_"); } @@ -21687,15 +21701,15 @@ void csi_res_cfg_s::csi_rs_res_set_list_c_::to_json(json_writer& j) const j.start_obj(); if (c.get().nzp_csi_rs_res_set_list_present) { j.start_array("nzp-CSI-RS-ResourceSetList"); - for (uint32_t i1 = 0; i1 < c.get().nzp_csi_rs_res_set_list.size(); ++i1) { - j.write_int(c.get().nzp_csi_rs_res_set_list[i1]); + for (const auto& e1 : c.get().nzp_csi_rs_res_set_list) { + j.write_int(e1); } j.end_array(); } if (c.get().csi_ssb_res_set_list_present) { j.start_array("csi-SSB-ResourceSetList"); - for (uint32_t i1 = 0; i1 < c.get().csi_ssb_res_set_list.size(); ++i1) { - j.write_int(c.get().csi_ssb_res_set_list[i1]); + for (const auto& e1 : c.get().csi_ssb_res_set_list) { + j.write_int(e1); } j.end_array(); } @@ -21703,8 +21717,8 @@ void csi_res_cfg_s::csi_rs_res_set_list_c_::to_json(json_writer& j) const break; case types::csi_im_res_set_list: j.start_array("csi-IM-ResourceSetList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_int(c.get()[i1]); + for (const auto& e1 : c.get()) { + j.write_int(e1); } j.end_array(); break; @@ -21772,13 +21786,13 @@ SRSASN_CODE csi_res_cfg_s::csi_rs_res_set_list_c_::unpack(cbit_ref& bref) std::string csi_res_cfg_s::csi_rs_res_set_list_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"nzp-CSI-RS-SSB", "csi-IM-ResourceSetList"}; + static const char* options[] = {"nzp-CSI-RS-SSB", "csi-IM-ResourceSetList"}; return convert_enum_idx(options, 2, value, "csi_res_cfg_s::csi_rs_res_set_list_c_::types"); } std::string csi_res_cfg_s::res_type_opts::to_string() const { - static constexpr const char* options[] = {"aperiodic", "semiPersistent", "periodic"}; + static const char* options[] = {"aperiodic", "semiPersistent", "periodic"}; return convert_enum_idx(options, 3, value, "csi_res_cfg_s::res_type_e_"); } @@ -21804,8 +21818,8 @@ void csi_ssb_res_set_s::to_json(json_writer& j) const j.start_obj(); j.write_int("csi-SSB-ResourceSetId", csi_ssb_res_set_id); j.start_array("csi-SSB-ResourceList"); - for (uint32_t i1 = 0; i1 < csi_ssb_res_list.size(); ++i1) { - j.write_int(csi_ssb_res_list[i1]); + for (const auto& e1 : csi_ssb_res_list) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -21926,13 +21940,13 @@ void nzp_csi_rs_res_s::to_json(json_writer& j) const std::string nzp_csi_rs_res_s::pwr_ctrl_offset_ss_opts::to_string() const { - static constexpr const char* options[] = {"db-3", "db0", "db3", "db6"}; + static const char* options[] = {"db-3", "db0", "db3", "db6"}; return convert_enum_idx(options, 4, value, "nzp_csi_rs_res_s::pwr_ctrl_offset_ss_e_"); } int8_t nzp_csi_rs_res_s::pwr_ctrl_offset_ss_opts::to_number() const { - static constexpr int8_t options[] = {-3, 0, 3, 6}; - return convert_enum_idx(options, 4, value, "nzp_csi_rs_res_s::pwr_ctrl_offset_ss_e_"); + static const int8_t options[] = {-3, 0, 3, 6}; + return map_enum_number(options, 4, value, "nzp_csi_rs_res_s::pwr_ctrl_offset_ss_e_"); } // NZP-CSI-RS-ResourceSet ::= SEQUENCE @@ -21977,8 +21991,8 @@ void nzp_csi_rs_res_set_s::to_json(json_writer& j) const j.start_obj(); j.write_int("nzp-CSI-ResourceSetId", nzp_csi_res_set_id); j.start_array("nzp-CSI-RS-Resources"); - for (uint32_t i1 = 0; i1 < nzp_csi_rs_res.size(); ++i1) { - j.write_int(nzp_csi_rs_res[i1]); + for (const auto& e1 : nzp_csi_rs_res) { + j.write_int(e1); } j.end_array(); if (repeat_present) { @@ -21995,7 +22009,7 @@ void nzp_csi_rs_res_set_s::to_json(json_writer& j) const std::string nzp_csi_rs_res_set_s::repeat_opts::to_string() const { - static constexpr const char* options[] = {"on", "off"}; + static const char* options[] = {"on", "off"}; return convert_enum_idx(options, 2, value, "nzp_csi_rs_res_set_s::repeat_e_"); } @@ -22026,14 +22040,14 @@ void pdsch_code_block_group_tx_s::to_json(json_writer& j) const std::string pdsch_code_block_group_tx_s::max_code_block_groups_per_transport_block_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n6", "n8"}; + static const char* options[] = {"n2", "n4", "n6", "n8"}; return convert_enum_idx( options, 4, value, "pdsch_code_block_group_tx_s::max_code_block_groups_per_transport_block_e_"); } uint8_t pdsch_code_block_group_tx_s::max_code_block_groups_per_transport_block_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 6, 8}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 6, 8}; + return map_enum_number( options, 4, value, "pdsch_code_block_group_tx_s::max_code_block_groups_per_transport_block_e_"); } @@ -22132,19 +22146,19 @@ void pusch_serving_cell_cfg_s::to_json(json_writer& j) const std::string pusch_serving_cell_cfg_s::xoverhead_opts::to_string() const { - static constexpr const char* options[] = {"xoh6", "xoh12", "xoh18"}; + static const char* options[] = {"xoh6", "xoh12", "xoh18"}; return convert_enum_idx(options, 3, value, "pusch_serving_cell_cfg_s::xoverhead_e_"); } uint8_t pusch_serving_cell_cfg_s::xoverhead_opts::to_number() const { - static constexpr uint8_t options[] = {6, 12, 18}; - return convert_enum_idx(options, 3, value, "pusch_serving_cell_cfg_s::xoverhead_e_"); + static const uint8_t options[] = {6, 12, 18}; + return map_enum_number(options, 3, value, "pusch_serving_cell_cfg_s::xoverhead_e_"); } // PollByte ::= ENUMERATED std::string poll_byte_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "kB1", "kB2", "kB5", "kB8", "kB10", "kB15", "kB25", "kB50", "kB75", "kB100", "kB125", "kB250", "kB375", "kB500", "kB750", "kB1000", "kB1250", "kB1500", "kB2000", "kB3000", "kB4000", "kB4500", "kB5000", "kB5500", "kB6000", "kB6500", "kB7000", "kB7500", "mB8", "mB9", @@ -22158,18 +22172,17 @@ std::string poll_byte_opts::to_string() const // PollPDU ::= ENUMERATED std::string poll_pdu_opts::to_string() const { - static constexpr const char* options[] = { - "p4", "p8", "p16", "p32", "p64", "p128", "p256", "p512", "p1024", "p2048", "p4096", - "p6144", "p8192", "p12288", "p16384", "p20480", "p24576", "p28672", "p32768", "p40960", "p49152", "p57344", - "p65536", "infinity", "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"p4", "p8", "p16", "p32", "p64", "p128", "p256", "p512", + "p1024", "p2048", "p4096", "p6144", "p8192", "p12288", "p16384", "p20480", + "p24576", "p28672", "p32768", "p40960", "p49152", "p57344", "p65536", "infinity", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "poll_pdu_e"); } int32_t poll_pdu_opts::to_number() const { - static constexpr int32_t options[] = {4, 8, 16, 32, 64, 128, 256, 512, - 1024, 2048, 4096, 6144, 8192, 12288, 16384, 20480, - 24576, 28672, 32768, 40960, 49152, 57344, 65536, -1}; - return convert_enum_idx(options, 24, value, "poll_pdu_e"); + static const int32_t options[] = {4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 6144, + 8192, 12288, 16384, 20480, 24576, 28672, 32768, 40960, 49152, 57344, 65536, -1}; + return map_enum_number(options, 24, value, "poll_pdu_e"); } // RateMatchPatternLTE-CRS ::= SEQUENCE @@ -22208,8 +22221,8 @@ void rate_match_pattern_lte_crs_s::to_json(json_writer& j) const j.write_str("carrierBandwidthDL", carrier_bw_dl.to_string()); if (mbsfn_sf_cfg_list_present) { j.start_array("mbsfn-SubframeConfigList"); - for (uint32_t i1 = 0; i1 < mbsfn_sf_cfg_list.size(); ++i1) { - mbsfn_sf_cfg_list[i1].to_json(j); + for (const auto& e1 : mbsfn_sf_cfg_list) { + e1.to_json(j); } j.end_array(); } @@ -22220,59 +22233,59 @@ void rate_match_pattern_lte_crs_s::to_json(json_writer& j) const std::string rate_match_pattern_lte_crs_s::carrier_bw_dl_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100", "spare2", "spare1"}; + static const char* options[] = {"n6", "n15", "n25", "n50", "n75", "n100", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "rate_match_pattern_lte_crs_s::carrier_bw_dl_e_"); } uint8_t rate_match_pattern_lte_crs_s::carrier_bw_dl_opts::to_number() const { - static constexpr uint8_t options[] = {6, 15, 25, 50, 75, 100}; - return convert_enum_idx(options, 6, value, "rate_match_pattern_lte_crs_s::carrier_bw_dl_e_"); + static const uint8_t options[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(options, 6, value, "rate_match_pattern_lte_crs_s::carrier_bw_dl_e_"); } std::string rate_match_pattern_lte_crs_s::nrof_crs_ports_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4"}; + static const char* options[] = {"n1", "n2", "n4"}; return convert_enum_idx(options, 3, value, "rate_match_pattern_lte_crs_s::nrof_crs_ports_e_"); } uint8_t rate_match_pattern_lte_crs_s::nrof_crs_ports_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "rate_match_pattern_lte_crs_s::nrof_crs_ports_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "rate_match_pattern_lte_crs_s::nrof_crs_ports_e_"); } std::string rate_match_pattern_lte_crs_s::v_shift_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5"}; + static const char* options[] = {"n0", "n1", "n2", "n3", "n4", "n5"}; return convert_enum_idx(options, 6, value, "rate_match_pattern_lte_crs_s::v_shift_e_"); } uint8_t rate_match_pattern_lte_crs_s::v_shift_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5}; - return convert_enum_idx(options, 6, value, "rate_match_pattern_lte_crs_s::v_shift_e_"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5}; + return map_enum_number(options, 6, value, "rate_match_pattern_lte_crs_s::v_shift_e_"); } // SN-FieldLengthAM ::= ENUMERATED std::string sn_field_len_am_opts::to_string() const { - static constexpr const char* options[] = {"size12", "size18"}; + static const char* options[] = {"size12", "size18"}; return convert_enum_idx(options, 2, value, "sn_field_len_am_e"); } uint8_t sn_field_len_am_opts::to_number() const { - static constexpr uint8_t options[] = {12, 18}; - return convert_enum_idx(options, 2, value, "sn_field_len_am_e"); + static const uint8_t options[] = {12, 18}; + return map_enum_number(options, 2, value, "sn_field_len_am_e"); } // SN-FieldLengthUM ::= ENUMERATED std::string sn_field_len_um_opts::to_string() const { - static constexpr const char* options[] = {"size6", "size12"}; + static const char* options[] = {"size6", "size12"}; return convert_enum_idx(options, 2, value, "sn_field_len_um_e"); } uint8_t sn_field_len_um_opts::to_number() const { - static constexpr uint8_t options[] = {6, 12}; - return convert_enum_idx(options, 2, value, "sn_field_len_um_e"); + static const uint8_t options[] = {6, 12}; + return map_enum_number(options, 2, value, "sn_field_len_um_e"); } // SRS-CarrierSwitching ::= SEQUENCE @@ -22329,8 +22342,8 @@ void srs_carrier_switching_s::to_json(json_writer& j) const } if (monitoring_cells_present) { j.start_array("monitoringCells"); - for (uint32_t i1 = 0; i1 < monitoring_cells.size(); ++i1) { - j.write_int(monitoring_cells[i1]); + for (const auto& e1 : monitoring_cells) { + j.write_int(e1); } j.end_array(); } @@ -22339,7 +22352,7 @@ void srs_carrier_switching_s::to_json(json_writer& j) const std::string srs_carrier_switching_s::srs_switch_from_carrier_opts::to_string() const { - static constexpr const char* options[] = {"sUL", "nUL"}; + static const char* options[] = {"sUL", "nUL"}; return convert_enum_idx(options, 2, value, "srs_carrier_switching_s::srs_switch_from_carrier_e_"); } @@ -22418,8 +22431,8 @@ void srs_carrier_switching_s::srs_tpc_pdcch_group_c_::to_json(json_writer& j) co switch (type_) { case types::type_a: j.start_array("typeA"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -22469,7 +22482,7 @@ SRSASN_CODE srs_carrier_switching_s::srs_tpc_pdcch_group_c_::unpack(cbit_ref& br std::string srs_carrier_switching_s::srs_tpc_pdcch_group_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"typeA", "typeB"}; + static const char* options[] = {"typeA", "typeB"}; return convert_enum_idx(options, 2, value, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_::types"); } @@ -22515,15 +22528,15 @@ void slot_format_ind_s::to_json(json_writer& j) const j.write_int("dci-PayloadSize", dci_payload_size); if (slot_format_comb_to_add_mod_list_present) { j.start_array("slotFormatCombToAddModList"); - for (uint32_t i1 = 0; i1 < slot_format_comb_to_add_mod_list.size(); ++i1) { - slot_format_comb_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : slot_format_comb_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (slot_format_comb_to_release_list_present) { j.start_array("slotFormatCombToReleaseList"); - for (uint32_t i1 = 0; i1 < slot_format_comb_to_release_list.size(); ++i1) { - j.write_int(slot_format_comb_to_release_list[i1]); + for (const auto& e1 : slot_format_comb_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -22533,7 +22546,7 @@ void slot_format_ind_s::to_json(json_writer& j) const // T-PollRetransmit ::= ENUMERATED std::string t_poll_retx_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ms5", "ms10", "ms15", "ms20", "ms25", "ms30", "ms35", "ms40", "ms45", "ms50", "ms55", "ms60", "ms65", "ms70", "ms75", "ms80", "ms85", "ms90", "ms95", "ms100", "ms105", "ms110", "ms115", "ms120", "ms125", "ms130", "ms135", "ms140", "ms145", "ms150", "ms155", "ms160", "ms165", @@ -22544,33 +22557,33 @@ std::string t_poll_retx_opts::to_string() const } uint16_t t_poll_retx_opts::to_number() const { - static constexpr uint16_t options[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, - 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, - 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, - 230, 235, 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 2000, 4000}; - return convert_enum_idx(options, 59, value, "t_poll_retx_e"); + static const uint16_t options[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, + 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, + 230, 235, 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 2000, 4000}; + return map_enum_number(options, 59, value, "t_poll_retx_e"); } // T-Reassembly ::= ENUMERATED std::string t_reassembly_opts::to_string() const { - static constexpr const char* options[] = {"ms0", "ms5", "ms10", "ms15", "ms20", "ms25", "ms30", "ms35", - "ms40", "ms45", "ms50", "ms55", "ms60", "ms65", "ms70", "ms75", - "ms80", "ms85", "ms90", "ms95", "ms100", "ms110", "ms120", "ms130", - "ms140", "ms150", "ms160", "ms170", "ms180", "ms190", "ms200", "spare1"}; + static const char* options[] = {"ms0", "ms5", "ms10", "ms15", "ms20", "ms25", "ms30", "ms35", + "ms40", "ms45", "ms50", "ms55", "ms60", "ms65", "ms70", "ms75", + "ms80", "ms85", "ms90", "ms95", "ms100", "ms110", "ms120", "ms130", + "ms140", "ms150", "ms160", "ms170", "ms180", "ms190", "ms200", "spare1"}; return convert_enum_idx(options, 32, value, "t_reassembly_e"); } uint8_t t_reassembly_opts::to_number() const { - static constexpr uint8_t options[] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, - 80, 85, 90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200}; - return convert_enum_idx(options, 31, value, "t_reassembly_e"); + static const uint8_t options[] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + 80, 85, 90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200}; + return map_enum_number(options, 31, value, "t_reassembly_e"); } // T-StatusProhibit ::= ENUMERATED std::string t_status_prohibit_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ms0", "ms5", "ms10", "ms15", "ms20", "ms25", "ms30", "ms35", "ms40", "ms45", "ms50", "ms55", "ms60", "ms65", "ms70", "ms75", "ms80", "ms85", "ms90", "ms95", "ms100", "ms105", "ms110", "ms115", "ms120", "ms125", "ms130", "ms135", "ms140", "ms145", "ms150", "ms155", "ms160", @@ -22581,11 +22594,11 @@ std::string t_status_prohibit_opts::to_string() const } uint16_t t_status_prohibit_opts::to_number() const { - static constexpr uint16_t options[] = { - 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, - 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, - 210, 215, 220, 225, 230, 235, 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 1200, 1600, 2000, 2400}; - return convert_enum_idx(options, 62, value, "t_status_prohibit_e"); + static const uint16_t options[] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, + 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, + 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 1200, 1600, 2000, 2400}; + return map_enum_number(options, 62, value, "t_status_prohibit_e"); } // TDD-UL-DL-SlotConfig ::= SEQUENCE @@ -22693,26 +22706,26 @@ SRSASN_CODE tdd_ul_dl_slot_cfg_s::symbols_c_::unpack(cbit_ref& bref) std::string tdd_ul_dl_slot_cfg_s::symbols_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"allDownlink", "allUplink", "explicit"}; + static const char* options[] = {"allDownlink", "allUplink", "explicit"}; return convert_enum_idx(options, 3, value, "tdd_ul_dl_slot_cfg_s::symbols_c_::types"); } // UL-DataSplitThreshold ::= ENUMERATED std::string ul_data_split_thres_opts::to_string() const { - static constexpr const char* options[] = { - "b0", "b100", "b200", "b400", "b800", "b1600", "b3200", "b6400", - "b12800", "b25600", "b51200", "b102400", "b204800", "b409600", "b819200", "b1228800", - "b1638400", "b2457600", "b3276800", "b4096000", "b4915200", "b5734400", "b6553600", "infinity", - "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"b0", "b100", "b200", "b400", "b800", "b1600", "b3200", + "b6400", "b12800", "b25600", "b51200", "b102400", "b204800", "b409600", + "b819200", "b1228800", "b1638400", "b2457600", "b3276800", "b4096000", "b4915200", + "b5734400", "b6553600", "infinity", "spare8", "spare7", "spare6", "spare5", + "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "ul_data_split_thres_e"); } int32_t ul_data_split_thres_opts::to_number() const { - static constexpr int32_t options[] = {0, 100, 200, 400, 800, 1600, 3200, 6400, - 12800, 25600, 51200, 102400, 204800, 409600, 819200, 1228800, - 1638400, 2457600, 3276800, 4096000, 4915200, 5734400, 6553600, -1}; - return convert_enum_idx(options, 24, value, "ul_data_split_thres_e"); + static const int32_t options[] = {0, 100, 200, 400, 800, 1600, 3200, 6400, + 12800, 25600, 51200, 102400, 204800, 409600, 819200, 1228800, + 1638400, 2457600, 3276800, 4096000, 4915200, 5734400, 6553600, -1}; + return map_enum_number(options, 24, value, "ul_data_split_thres_e"); } // UplinkConfigCommon ::= SEQUENCE @@ -22965,99 +22978,99 @@ void csi_meas_cfg_s::to_json(json_writer& j) const j.start_obj(); if (nzp_csi_rs_res_to_add_mod_list_present) { j.start_array("nzp-CSI-RS-ResourceToAddModList"); - for (uint32_t i1 = 0; i1 < nzp_csi_rs_res_to_add_mod_list.size(); ++i1) { - nzp_csi_rs_res_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : nzp_csi_rs_res_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (nzp_csi_rs_res_to_release_list_present) { j.start_array("nzp-CSI-RS-ResourceToReleaseList"); - for (uint32_t i1 = 0; i1 < nzp_csi_rs_res_to_release_list.size(); ++i1) { - j.write_int(nzp_csi_rs_res_to_release_list[i1]); + for (const auto& e1 : nzp_csi_rs_res_to_release_list) { + j.write_int(e1); } j.end_array(); } if (nzp_csi_rs_res_set_to_add_mod_list_present) { j.start_array("nzp-CSI-RS-ResourceSetToAddModList"); - for (uint32_t i1 = 0; i1 < nzp_csi_rs_res_set_to_add_mod_list.size(); ++i1) { - nzp_csi_rs_res_set_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : nzp_csi_rs_res_set_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (nzp_csi_rs_res_set_to_release_list_present) { j.start_array("nzp-CSI-RS-ResourceSetToReleaseList"); - for (uint32_t i1 = 0; i1 < nzp_csi_rs_res_set_to_release_list.size(); ++i1) { - j.write_int(nzp_csi_rs_res_set_to_release_list[i1]); + for (const auto& e1 : nzp_csi_rs_res_set_to_release_list) { + j.write_int(e1); } j.end_array(); } if (csi_im_res_to_add_mod_list_present) { j.start_array("csi-IM-ResourceToAddModList"); - for (uint32_t i1 = 0; i1 < csi_im_res_to_add_mod_list.size(); ++i1) { - csi_im_res_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : csi_im_res_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (csi_im_res_to_release_list_present) { j.start_array("csi-IM-ResourceToReleaseList"); - for (uint32_t i1 = 0; i1 < csi_im_res_to_release_list.size(); ++i1) { - j.write_int(csi_im_res_to_release_list[i1]); + for (const auto& e1 : csi_im_res_to_release_list) { + j.write_int(e1); } j.end_array(); } if (csi_im_res_set_to_add_mod_list_present) { j.start_array("csi-IM-ResourceSetToAddModList"); - for (uint32_t i1 = 0; i1 < csi_im_res_set_to_add_mod_list.size(); ++i1) { - csi_im_res_set_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : csi_im_res_set_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (csi_im_res_set_to_release_list_present) { j.start_array("csi-IM-ResourceSetToReleaseList"); - for (uint32_t i1 = 0; i1 < csi_im_res_set_to_release_list.size(); ++i1) { - j.write_int(csi_im_res_set_to_release_list[i1]); + for (const auto& e1 : csi_im_res_set_to_release_list) { + j.write_int(e1); } j.end_array(); } if (csi_ssb_res_set_to_add_mod_list_present) { j.start_array("csi-SSB-ResourceSetToAddModList"); - for (uint32_t i1 = 0; i1 < csi_ssb_res_set_to_add_mod_list.size(); ++i1) { - csi_ssb_res_set_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : csi_ssb_res_set_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (csi_ssb_res_set_to_add_release_list_present) { j.start_array("csi-SSB-ResourceSetToAddReleaseList"); - for (uint32_t i1 = 0; i1 < csi_ssb_res_set_to_add_release_list.size(); ++i1) { - j.write_int(csi_ssb_res_set_to_add_release_list[i1]); + for (const auto& e1 : csi_ssb_res_set_to_add_release_list) { + j.write_int(e1); } j.end_array(); } if (csi_res_cfg_to_add_mod_list_present) { j.start_array("csi-ResourceConfigToAddModList"); - for (uint32_t i1 = 0; i1 < csi_res_cfg_to_add_mod_list.size(); ++i1) { - csi_res_cfg_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : csi_res_cfg_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (csi_res_cfg_to_release_list_present) { j.start_array("csi-ResourceConfigToReleaseList"); - for (uint32_t i1 = 0; i1 < csi_res_cfg_to_release_list.size(); ++i1) { - j.write_int(csi_res_cfg_to_release_list[i1]); + for (const auto& e1 : csi_res_cfg_to_release_list) { + j.write_int(e1); } j.end_array(); } if (csi_report_cfg_to_add_mod_list_present) { j.start_array("csi-ReportConfigToAddModList"); - for (uint32_t i1 = 0; i1 < csi_report_cfg_to_add_mod_list.size(); ++i1) { - csi_report_cfg_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : csi_report_cfg_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (csi_report_cfg_to_release_list_present) { j.start_array("csi-ReportConfigToReleaseList"); - for (uint32_t i1 = 0; i1 < csi_report_cfg_to_release_list.size(); ++i1) { - j.write_int(csi_report_cfg_to_release_list[i1]); + for (const auto& e1 : csi_report_cfg_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -23078,13 +23091,13 @@ void csi_meas_cfg_s::to_json(json_writer& j) const // CipheringAlgorithm ::= ENUMERATED std::string ciphering_algorithm_opts::to_string() const { - static constexpr const char* options[] = {"nea0", "nea1", "nea2", "nea3", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"nea0", "nea1", "nea2", "nea3", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ciphering_algorithm_e"); } uint8_t ciphering_algorithm_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "ciphering_algorithm_e"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "ciphering_algorithm_e"); } // CrossCarrierSchedulingConfig ::= SEQUENCE @@ -23240,7 +23253,7 @@ SRSASN_CODE cross_carrier_sched_cfg_s::sched_cell_info_c_::unpack(cbit_ref& bref std::string cross_carrier_sched_cfg_s::sched_cell_info_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"own", "other"}; + static const char* options[] = {"own", "other"}; return convert_enum_idx(options, 2, value, "cross_carrier_sched_cfg_s::sched_cell_info_c_::types"); } @@ -23316,13 +23329,13 @@ void dl_um_rlc_s::to_json(json_writer& j) const // IntegrityProtAlgorithm ::= ENUMERATED std::string integrity_prot_algorithm_opts::to_string() const { - static constexpr const char* options[] = {"nia0", "nia1", "nia2", "nia3", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"nia0", "nia1", "nia2", "nia3", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "integrity_prot_algorithm_e"); } uint8_t integrity_prot_algorithm_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3}; - return convert_enum_idx(options, 4, value, "integrity_prot_algorithm_e"); + static const uint8_t options[] = {0, 1, 2, 3}; + return map_enum_number(options, 4, value, "integrity_prot_algorithm_e"); } // PDCCH-ServingCellConfig ::= SEQUENCE @@ -23539,50 +23552,50 @@ void pdcp_cfg_s::to_json(json_writer& j) const std::string pdcp_cfg_s::drb_s_::discard_timer_opts::to_string() const { - static constexpr const char* options[] = {"ms10", - "ms20", - "ms30", - "ms40", - "ms50", - "ms60", - "ms75", - "ms100", - "ms150", - "ms200", - "ms250", - "ms300", - "ms500", - "ms750", - "ms1500", - "infinity"}; + static const char* options[] = {"ms10", + "ms20", + "ms30", + "ms40", + "ms50", + "ms60", + "ms75", + "ms100", + "ms150", + "ms200", + "ms250", + "ms300", + "ms500", + "ms750", + "ms1500", + "infinity"}; return convert_enum_idx(options, 16, value, "pdcp_cfg_s::drb_s_::discard_timer_e_"); } int16_t pdcp_cfg_s::drb_s_::discard_timer_opts::to_number() const { - static constexpr int16_t options[] = {10, 20, 30, 40, 50, 60, 75, 100, 150, 200, 250, 300, 500, 750, 1500, -1}; - return convert_enum_idx(options, 16, value, "pdcp_cfg_s::drb_s_::discard_timer_e_"); + static const int16_t options[] = {10, 20, 30, 40, 50, 60, 75, 100, 150, 200, 250, 300, 500, 750, 1500, -1}; + return map_enum_number(options, 16, value, "pdcp_cfg_s::drb_s_::discard_timer_e_"); } std::string pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_opts::to_string() const { - static constexpr const char* options[] = {"len12bits", "len18bits"}; + static const char* options[] = {"len12bits", "len18bits"}; return convert_enum_idx(options, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_e_"); } uint8_t pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_opts::to_number() const { - static constexpr uint8_t options[] = {12, 18}; - return convert_enum_idx(options, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_e_"); + static const uint8_t options[] = {12, 18}; + return map_enum_number(options, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_e_"); } std::string pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_opts::to_string() const { - static constexpr const char* options[] = {"len12bits", "len18bits"}; + static const char* options[] = {"len12bits", "len18bits"}; return convert_enum_idx(options, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_e_"); } uint8_t pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_opts::to_number() const { - static constexpr uint8_t options[] = {12, 18}; - return convert_enum_idx(options, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_e_"); + static const uint8_t options[] = {12, 18}; + return map_enum_number(options, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_e_"); } void pdcp_cfg_s::drb_s_::hdr_compress_c_::destroy_() @@ -23785,13 +23798,13 @@ SRSASN_CODE pdcp_cfg_s::drb_s_::hdr_compress_c_::unpack(cbit_ref& bref) std::string pdcp_cfg_s::drb_s_::hdr_compress_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"notUsed", "rohc", "uplinkOnlyROHC"}; + static const char* options[] = {"notUsed", "rohc", "uplinkOnlyROHC"}; return convert_enum_idx(options, 3, value, "pdcp_cfg_s::drb_s_::hdr_compress_c_::types"); } std::string pdcp_cfg_s::t_reordering_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ms0", "ms1", "ms2", "ms4", "ms5", "ms8", "ms10", "ms15", "ms20", "ms30", "ms40", "ms50", "ms60", "ms80", "ms100", "ms120", "ms140", "ms160", "ms180", "ms200", "ms220", "ms240", "ms260", "ms280", "ms300", "ms500", "ms750", "ms1000", "ms1250", "ms1500", @@ -23803,10 +23816,10 @@ std::string pdcp_cfg_s::t_reordering_opts::to_string() const } uint16_t pdcp_cfg_s::t_reordering_opts::to_number() const { - static constexpr uint16_t options[] = {0, 1, 2, 4, 5, 8, 10, 15, 20, 30, 40, 50, - 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, - 300, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000}; - return convert_enum_idx(options, 36, value, "pdcp_cfg_s::t_reordering_e_"); + static const uint16_t options[] = {0, 1, 2, 4, 5, 8, 10, 15, 20, 30, 40, 50, + 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, + 300, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000}; + return map_enum_number(options, 36, value, "pdcp_cfg_s::t_reordering_e_"); } // PDSCH-ServingCellConfig ::= SEQUENCE @@ -23921,24 +23934,24 @@ void pdsch_serving_cell_cfg_s::to_json(json_writer& j) const std::string pdsch_serving_cell_cfg_s::xoverhead_opts::to_string() const { - static constexpr const char* options[] = {"xOh6", "xOh12", "xOh18"}; + static const char* options[] = {"xOh6", "xOh12", "xOh18"}; return convert_enum_idx(options, 3, value, "pdsch_serving_cell_cfg_s::xoverhead_e_"); } uint8_t pdsch_serving_cell_cfg_s::xoverhead_opts::to_number() const { - static constexpr uint8_t options[] = {6, 12, 18}; - return convert_enum_idx(options, 3, value, "pdsch_serving_cell_cfg_s::xoverhead_e_"); + static const uint8_t options[] = {6, 12, 18}; + return map_enum_number(options, 3, value, "pdsch_serving_cell_cfg_s::xoverhead_e_"); } std::string pdsch_serving_cell_cfg_s::nrof_harq_processes_for_pdsch_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n6", "n10", "n12", "n16"}; + static const char* options[] = {"n2", "n4", "n6", "n10", "n12", "n16"}; return convert_enum_idx(options, 6, value, "pdsch_serving_cell_cfg_s::nrof_harq_processes_for_pdsch_e_"); } uint8_t pdsch_serving_cell_cfg_s::nrof_harq_processes_for_pdsch_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 6, 10, 12, 16}; - return convert_enum_idx(options, 6, value, "pdsch_serving_cell_cfg_s::nrof_harq_processes_for_pdsch_e_"); + static const uint8_t options[] = {2, 4, 6, 10, 12, 16}; + return map_enum_number(options, 6, value, "pdsch_serving_cell_cfg_s::nrof_harq_processes_for_pdsch_e_"); } // RACH-ConfigDedicated ::= SEQUENCE @@ -24034,15 +24047,15 @@ void sdap_cfg_s::to_json(json_writer& j) const j.write_bool("defaultDRB", default_drb); if (mapped_qos_flows_to_add_present) { j.start_array("mappedQoS-FlowsToAdd"); - for (uint32_t i1 = 0; i1 < mapped_qos_flows_to_add.size(); ++i1) { - j.write_int(mapped_qos_flows_to_add[i1]); + for (const auto& e1 : mapped_qos_flows_to_add) { + j.write_int(e1); } j.end_array(); } if (mapped_qos_flows_to_release_present) { j.start_array("mappedQoS-FlowsToRelease"); - for (uint32_t i1 = 0; i1 < mapped_qos_flows_to_release.size(); ++i1) { - j.write_int(mapped_qos_flows_to_release[i1]); + for (const auto& e1 : mapped_qos_flows_to_release) { + j.write_int(e1); } j.end_array(); } @@ -24051,13 +24064,13 @@ void sdap_cfg_s::to_json(json_writer& j) const std::string sdap_cfg_s::sdap_hdr_dl_opts::to_string() const { - static constexpr const char* options[] = {"present", "absent"}; + static const char* options[] = {"present", "absent"}; return convert_enum_idx(options, 2, value, "sdap_cfg_s::sdap_hdr_dl_e_"); } std::string sdap_cfg_s::sdap_hdr_ul_opts::to_string() const { - static constexpr const char* options[] = {"present", "absent"}; + static const char* options[] = {"present", "absent"}; return convert_enum_idx(options, 2, value, "sdap_cfg_s::sdap_hdr_ul_e_"); } @@ -24099,24 +24112,24 @@ void sched_request_to_add_mod_s::to_json(json_writer& j) const std::string sched_request_to_add_mod_s::sr_prohibit_timer_opts::to_string() const { - static constexpr const char* options[] = {"ms1", "ms2", "ms4", "ms8", "ms16", "ms32", "ms64", "ms128"}; + static const char* options[] = {"ms1", "ms2", "ms4", "ms8", "ms16", "ms32", "ms64", "ms128"}; return convert_enum_idx(options, 8, value, "sched_request_to_add_mod_s::sr_prohibit_timer_e_"); } uint8_t sched_request_to_add_mod_s::sr_prohibit_timer_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 16, 32, 64, 128}; - return convert_enum_idx(options, 8, value, "sched_request_to_add_mod_s::sr_prohibit_timer_e_"); + static const uint8_t options[] = {1, 2, 4, 8, 16, 32, 64, 128}; + return map_enum_number(options, 8, value, "sched_request_to_add_mod_s::sr_prohibit_timer_e_"); } std::string sched_request_to_add_mod_s::sr_trans_max_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8", "n16", "n32", "n64", "spare3", "spare2", "spare1"}; + static const char* options[] = {"n4", "n8", "n16", "n32", "n64", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "sched_request_to_add_mod_s::sr_trans_max_e_"); } uint8_t sched_request_to_add_mod_s::sr_trans_max_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16, 32, 64}; - return convert_enum_idx(options, 5, value, "sched_request_to_add_mod_s::sr_trans_max_e_"); + static const uint8_t options[] = {4, 8, 16, 32, 64}; + return map_enum_number(options, 5, value, "sched_request_to_add_mod_s::sr_trans_max_e_"); } // ServingCellConfigCommon ::= SEQUENCE @@ -24269,15 +24282,15 @@ void serving_cell_cfg_common_s::to_json(json_writer& j) const } if (rate_match_pattern_to_add_mod_list_present) { j.start_array("rateMatchPatternToAddModList"); - for (uint32_t i1 = 0; i1 < rate_match_pattern_to_add_mod_list.size(); ++i1) { - rate_match_pattern_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : rate_match_pattern_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (rate_match_pattern_to_release_list_present) { j.start_array("rateMatchPatternToReleaseList"); - for (uint32_t i1 = 0; i1 < rate_match_pattern_to_release_list.size(); ++i1) { - j.write_int(rate_match_pattern_to_release_list[i1]); + for (const auto& e1 : rate_match_pattern_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -24294,13 +24307,13 @@ void serving_cell_cfg_common_s::to_json(json_writer& j) const std::string serving_cell_cfg_common_s::n_timing_advance_offset_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n25600", "n39936"}; + static const char* options[] = {"n0", "n25600", "n39936"}; return convert_enum_idx(options, 3, value, "serving_cell_cfg_common_s::n_timing_advance_offset_e_"); } uint16_t serving_cell_cfg_common_s::n_timing_advance_offset_opts::to_number() const { - static constexpr uint16_t options[] = {0, 25600, 39936}; - return convert_enum_idx(options, 3, value, "serving_cell_cfg_common_s::n_timing_advance_offset_e_"); + static const uint16_t options[] = {0, 25600, 39936}; + return map_enum_number(options, 3, value, "serving_cell_cfg_common_s::n_timing_advance_offset_e_"); } void serving_cell_cfg_common_s::ssb_positions_in_burst_c_::destroy_() @@ -24445,30 +24458,30 @@ SRSASN_CODE serving_cell_cfg_common_s::ssb_positions_in_burst_c_::unpack(cbit_re std::string serving_cell_cfg_common_s::ssb_positions_in_burst_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"shortBitmap", "mediumBitmap", "longBitmap"}; + static const char* options[] = {"shortBitmap", "mediumBitmap", "longBitmap"}; return convert_enum_idx(options, 3, value, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_::types"); } std::string serving_cell_cfg_common_s::ssb_periodicity_serving_cell_opts::to_string() const { - static constexpr const char* options[] = {"ms5", "ms10", "ms20", "ms40", "ms80", "ms160", "spare2", "spare1"}; + static const char* options[] = {"ms5", "ms10", "ms20", "ms40", "ms80", "ms160", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "serving_cell_cfg_common_s::ssb_periodicity_serving_cell_e_"); } uint8_t serving_cell_cfg_common_s::ssb_periodicity_serving_cell_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 20, 40, 80, 160}; - return convert_enum_idx(options, 6, value, "serving_cell_cfg_common_s::ssb_periodicity_serving_cell_e_"); + static const uint8_t options[] = {5, 10, 20, 40, 80, 160}; + return map_enum_number(options, 6, value, "serving_cell_cfg_common_s::ssb_periodicity_serving_cell_e_"); } std::string serving_cell_cfg_common_s::dmrs_type_a_position_opts::to_string() const { - static constexpr const char* options[] = {"pos2", "pos3"}; + static const char* options[] = {"pos2", "pos3"}; return convert_enum_idx(options, 2, value, "serving_cell_cfg_common_s::dmrs_type_a_position_e_"); } uint8_t serving_cell_cfg_common_s::dmrs_type_a_position_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3}; - return convert_enum_idx(options, 2, value, "serving_cell_cfg_common_s::dmrs_type_a_position_e_"); + static const uint8_t options[] = {2, 3}; + return map_enum_number(options, 2, value, "serving_cell_cfg_common_s::dmrs_type_a_position_e_"); } // TAG ::= SEQUENCE @@ -24532,15 +24545,15 @@ void tdd_ul_dl_cfg_ded_s::to_json(json_writer& j) const j.start_obj(); if (slot_specific_cfgs_to_add_mod_list_present) { j.start_array("slotSpecificConfigurationsToAddModList"); - for (uint32_t i1 = 0; i1 < slot_specific_cfgs_to_add_mod_list.size(); ++i1) { - slot_specific_cfgs_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : slot_specific_cfgs_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (slot_specific_cfgs_torelease_list_present) { j.start_array("slotSpecificConfigurationsToreleaseList"); - for (uint32_t i1 = 0; i1 < slot_specific_cfgs_torelease_list.size(); ++i1) { - j.write_int(slot_specific_cfgs_torelease_list[i1]); + for (const auto& e1 : slot_specific_cfgs_torelease_list) { + j.write_int(e1); } j.end_array(); } @@ -24591,13 +24604,13 @@ void ul_am_rlc_s::to_json(json_writer& j) const std::string ul_am_rlc_s::max_retx_thres_opts::to_string() const { - static constexpr const char* options[] = {"t1", "t2", "t3", "t4", "t6", "t8", "t16", "t32"}; + static const char* options[] = {"t1", "t2", "t3", "t4", "t6", "t8", "t16", "t32"}; return convert_enum_idx(options, 8, value, "ul_am_rlc_s::max_retx_thres_e_"); } uint8_t ul_am_rlc_s::max_retx_thres_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 6, 8, 16, 32}; - return convert_enum_idx(options, 8, value, "ul_am_rlc_s::max_retx_thres_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 6, 8, 16, 32}; + return map_enum_number(options, 8, value, "ul_am_rlc_s::max_retx_thres_e_"); } // UL-UM-RLC ::= SEQUENCE @@ -24740,15 +24753,15 @@ void ul_cfg_s::to_json(json_writer& j) const } if (ul_bwp_to_release_list_present) { j.start_array("uplinkBWP-ToReleaseList"); - for (uint32_t i1 = 0; i1 < ul_bwp_to_release_list.size(); ++i1) { - j.write_int(ul_bwp_to_release_list[i1]); + for (const auto& e1 : ul_bwp_to_release_list) { + j.write_int(e1); } j.end_array(); } if (ul_bwp_to_add_mod_list_present) { j.start_array("uplinkBWP-ToAddModList"); - for (uint32_t i1 = 0; i1 < ul_bwp_to_add_mod_list.size(); ++i1) { - ul_bwp_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : ul_bwp_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } @@ -24769,8 +24782,8 @@ void ul_cfg_s::to_json(json_writer& j) const } if (ul_ch_bw_per_scs_list.is_present()) { j.start_array("uplinkChannelBW-PerSCS-List"); - for (uint32_t i1 = 0; i1 < ul_ch_bw_per_scs_list->size(); ++i1) { - ((*ul_ch_bw_per_scs_list)[i1]).to_json(j); + for (const auto& e1 : *ul_ch_bw_per_scs_list) { + e1.to_json(j); } j.end_array(); } @@ -24818,65 +24831,65 @@ void bsr_cfg_s::to_json(json_writer& j) const std::string bsr_cfg_s::periodic_bsr_timer_opts::to_string() const { - static constexpr const char* options[] = {"sf1", - "sf5", - "sf10", - "sf16", - "sf20", - "sf32", - "sf40", - "sf64", - "sf80", - "sf128", - "sf160", - "sf320", - "sf640", - "sf1280", - "sf2560", - "infinity"}; + static const char* options[] = {"sf1", + "sf5", + "sf10", + "sf16", + "sf20", + "sf32", + "sf40", + "sf64", + "sf80", + "sf128", + "sf160", + "sf320", + "sf640", + "sf1280", + "sf2560", + "infinity"}; return convert_enum_idx(options, 16, value, "bsr_cfg_s::periodic_bsr_timer_e_"); } int16_t bsr_cfg_s::periodic_bsr_timer_opts::to_number() const { - static constexpr int16_t options[] = {1, 5, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, -1}; - return convert_enum_idx(options, 16, value, "bsr_cfg_s::periodic_bsr_timer_e_"); + static const int16_t options[] = {1, 5, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, -1}; + return map_enum_number(options, 16, value, "bsr_cfg_s::periodic_bsr_timer_e_"); } std::string bsr_cfg_s::retx_bsr_timer_opts::to_string() const { - static constexpr const char* options[] = {"sf10", - "sf20", - "sf40", - "sf80", - "sf160", - "sf320", - "sf640", - "sf1280", - "sf2560", - "sf5120", - "sf10240", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"sf10", + "sf20", + "sf40", + "sf80", + "sf160", + "sf320", + "sf640", + "sf1280", + "sf2560", + "sf5120", + "sf10240", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "bsr_cfg_s::retx_bsr_timer_e_"); } uint16_t bsr_cfg_s::retx_bsr_timer_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240}; - return convert_enum_idx(options, 11, value, "bsr_cfg_s::retx_bsr_timer_e_"); + static const uint16_t options[] = {10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240}; + return map_enum_number(options, 11, value, "bsr_cfg_s::retx_bsr_timer_e_"); } std::string bsr_cfg_s::lc_ch_sr_delay_timer_opts::to_string() const { - static constexpr const char* options[] = {"sf20", "sf40", "sf64", "sf128", "sf512", "sf1024", "sf2560", "spare1"}; + static const char* options[] = {"sf20", "sf40", "sf64", "sf128", "sf512", "sf1024", "sf2560", "spare1"}; return convert_enum_idx(options, 8, value, "bsr_cfg_s::lc_ch_sr_delay_timer_e_"); } uint16_t bsr_cfg_s::lc_ch_sr_delay_timer_opts::to_number() const { - static constexpr uint16_t options[] = {20, 40, 64, 128, 512, 1024, 2560}; - return convert_enum_idx(options, 7, value, "bsr_cfg_s::lc_ch_sr_delay_timer_e_"); + static const uint16_t options[] = {20, 40, 64, 128, 512, 1024, 2560}; + return map_enum_number(options, 7, value, "bsr_cfg_s::lc_ch_sr_delay_timer_e_"); } // DRB-ToAddMod ::= SEQUENCE @@ -25053,7 +25066,7 @@ SRSASN_CODE drb_to_add_mod_s::cn_assoc_c_::unpack(cbit_ref& bref) std::string drb_to_add_mod_s::cn_assoc_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"eps-BearerIdentity", "sdap-Config"}; + static const char* options[] = {"eps-BearerIdentity", "sdap-Config"}; return convert_enum_idx(options, 2, value, "drb_to_add_mod_s::cn_assoc_c_::types"); } @@ -25214,68 +25227,66 @@ SRSASN_CODE drx_cfg_s::drx_on_dur_timer_c_::unpack(cbit_ref& bref) std::string drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_opts::to_string() const { - static constexpr const char* options[] = { - "ms1", "ms2", "ms3", "ms4", "ms5", "ms6", "ms8", "ms10", "ms20", "ms30", "ms40", - "ms50", "ms60", "ms80", "ms100", "ms200", "ms300", "ms400", "ms500", "ms600", "ms800", "ms1000", - "ms1200", "ms1600", "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ms1", "ms2", "ms3", "ms4", "ms5", "ms6", "ms8", "ms10", + "ms20", "ms30", "ms40", "ms50", "ms60", "ms80", "ms100", "ms200", + "ms300", "ms400", "ms500", "ms600", "ms800", "ms1000", "ms1200", "ms1600", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_e_"); } uint16_t drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_opts::to_number() const { - static constexpr uint16_t options[] = {1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, - 60, 80, 100, 200, 300, 400, 500, 600, 800, 1000, 1200, 1600}; - return convert_enum_idx(options, 24, value, "drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_e_"); + static const uint16_t options[] = {1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, + 60, 80, 100, 200, 300, 400, 500, 600, 800, 1000, 1200, 1600}; + return map_enum_number(options, 24, value, "drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_e_"); } std::string drx_cfg_s::drx_on_dur_timer_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"subMilliSeconds", "milliSeconds"}; + static const char* options[] = {"subMilliSeconds", "milliSeconds"}; return convert_enum_idx(options, 2, value, "drx_cfg_s::drx_on_dur_timer_c_::types"); } std::string drx_cfg_s::drx_inactivity_timer_opts::to_string() const { - static constexpr const char* options[] = { - "ms0", "ms1", "ms2", "ms3", "ms4", "ms5", "ms6", "ms8", "ms10", "ms20", "ms30", - "ms40", "ms50", "ms60", "ms80", "ms100", "ms200", "ms300", "ms500", "ms750", "ms1280", "ms1920", - "ms2560", "spare9", "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ms0", "ms1", "ms2", "ms3", "ms4", "ms5", "ms6", "ms8", + "ms10", "ms20", "ms30", "ms40", "ms50", "ms60", "ms80", "ms100", + "ms200", "ms300", "ms500", "ms750", "ms1280", "ms1920", "ms2560", "spare9", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "drx_cfg_s::drx_inactivity_timer_e_"); } uint16_t drx_cfg_s::drx_inactivity_timer_opts::to_number() const { - static constexpr uint16_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, - 50, 60, 80, 100, 200, 300, 500, 750, 1280, 1920, 2560}; - return convert_enum_idx(options, 23, value, "drx_cfg_s::drx_inactivity_timer_e_"); + static const uint16_t options[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 20, 30, 40, + 50, 60, 80, 100, 200, 300, 500, 750, 1280, 1920, 2560}; + return map_enum_number(options, 23, value, "drx_cfg_s::drx_inactivity_timer_e_"); } std::string drx_cfg_s::drx_retx_timer_dl_opts::to_string() const { - static constexpr const char* options[] = {"sl0", "sl1", "sl2", "sl4", "sl6", "sl8", "sl16", - "sl24", "sl33", "sl40", "sl64", "sl80", "sl96", "sl112", - "sl128", "sl160", "sl320", "spare15", "spare14", "spare13", "spare12", - "spare11", "spare10", "spare9", "spare8", "spare7", "spare6", "spare5", - "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"sl0", "sl1", "sl2", "sl4", "sl6", "sl8", "sl16", "sl24", + "sl33", "sl40", "sl64", "sl80", "sl96", "sl112", "sl128", "sl160", + "sl320", "spare15", "spare14", "spare13", "spare12", "spare11", "spare10", "spare9", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "drx_cfg_s::drx_retx_timer_dl_e_"); } uint16_t drx_cfg_s::drx_retx_timer_dl_opts::to_number() const { - static constexpr uint16_t options[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; - return convert_enum_idx(options, 17, value, "drx_cfg_s::drx_retx_timer_dl_e_"); + static const uint16_t options[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; + return map_enum_number(options, 17, value, "drx_cfg_s::drx_retx_timer_dl_e_"); } std::string drx_cfg_s::drx_retx_timer_ul_opts::to_string() const { - static constexpr const char* options[] = {"sl0", "sl1", "sl2", "sl4", "sl6", "sl8", "sl16", - "sl24", "sl33", "sl40", "sl64", "sl80", "sl96", "sl112", - "sl128", "sl160", "sl320", "spare15", "spare14", "spare13", "spare12", - "spare11", "spare10", "spare9", "spare8", "spare7", "spare6", "spare5", - "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"sl0", "sl1", "sl2", "sl4", "sl6", "sl8", "sl16", "sl24", + "sl33", "sl40", "sl64", "sl80", "sl96", "sl112", "sl128", "sl160", + "sl320", "spare15", "spare14", "spare13", "spare12", "spare11", "spare10", "spare9", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "drx_cfg_s::drx_retx_timer_ul_e_"); } uint16_t drx_cfg_s::drx_retx_timer_ul_opts::to_number() const { - static constexpr uint16_t options[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; - return convert_enum_idx(options, 17, value, "drx_cfg_s::drx_retx_timer_ul_e_"); + static const uint16_t options[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; + return map_enum_number(options, 17, value, "drx_cfg_s::drx_retx_timer_ul_e_"); } void drx_cfg_s::drx_long_cycle_start_offset_c_::destroy_() {} @@ -25645,44 +25656,44 @@ SRSASN_CODE drx_cfg_s::drx_long_cycle_start_offset_c_::unpack(cbit_ref& bref) std::string drx_cfg_s::drx_long_cycle_start_offset_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", - "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", - "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; + static const char* options[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", + "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", + "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; return convert_enum_idx(options, 20, value, "drx_cfg_s::drx_long_cycle_start_offset_c_::types"); } uint16_t drx_cfg_s::drx_long_cycle_start_offset_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, - 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; - return convert_enum_idx(options, 20, value, "drx_cfg_s::drx_long_cycle_start_offset_c_::types"); + static const uint16_t options[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, + 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; + return map_enum_number(options, 20, value, "drx_cfg_s::drx_long_cycle_start_offset_c_::types"); } std::string drx_cfg_s::short_drx_s_::drx_short_cycle_opts::to_string() const { - static constexpr const char* options[] = { - "ms2", "ms3", "ms4", "ms5", "ms6", "ms7", "ms8", "ms10", "ms14", "ms16", "ms20", - "ms30", "ms32", "ms35", "ms40", "ms64", "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", - "ms640", "spare9", "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ms2", "ms3", "ms4", "ms5", "ms6", "ms7", "ms8", "ms10", + "ms14", "ms16", "ms20", "ms30", "ms32", "ms35", "ms40", "ms64", + "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", "spare9", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "drx_cfg_s::short_drx_s_::drx_short_cycle_e_"); } uint16_t drx_cfg_s::short_drx_s_::drx_short_cycle_opts::to_number() const { - static constexpr uint16_t options[] = {2, 3, 4, 5, 6, 7, 8, 10, 14, 16, 20, 30, - 32, 35, 40, 64, 80, 128, 160, 256, 320, 512, 640}; - return convert_enum_idx(options, 23, value, "drx_cfg_s::short_drx_s_::drx_short_cycle_e_"); + static const uint16_t options[] = {2, 3, 4, 5, 6, 7, 8, 10, 14, 16, 20, 30, + 32, 35, 40, 64, 80, 128, 160, 256, 320, 512, 640}; + return map_enum_number(options, 23, value, "drx_cfg_s::short_drx_s_::drx_short_cycle_e_"); } // DataInactivityTimer ::= ENUMERATED std::string data_inactivity_timer_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "s1", "s2", "s3", "s5", "s7", "s10", "s15", "s20", "s40", "s50", "s60", "s80", "s100", "s120", "s150", "s180"}; return convert_enum_idx(options, 16, value, "data_inactivity_timer_e"); } uint8_t data_inactivity_timer_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 5, 7, 10, 15, 20, 40, 50, 60, 80, 100, 120, 150, 180}; - return convert_enum_idx(options, 16, value, "data_inactivity_timer_e"); + static const uint8_t options[] = {1, 2, 3, 5, 7, 10, 15, 20, 40, 50, 60, 80, 100, 120, 150, 180}; + return map_enum_number(options, 16, value, "data_inactivity_timer_e"); } // LogicalChannelConfig ::= SEQUENCE @@ -25806,15 +25817,15 @@ void lc_ch_cfg_s::ul_specific_params_s_::to_json(json_writer& j) const j.write_str("bucketSizeDuration", bucket_size_dur.to_string()); if (allowed_serving_cells_present) { j.start_array("allowedServingCells"); - for (uint32_t i1 = 0; i1 < allowed_serving_cells.size(); ++i1) { - j.write_int(allowed_serving_cells[i1]); + for (const auto& e1 : allowed_serving_cells) { + j.write_int(e1); } j.end_array(); } if (allowed_scs_list_present) { j.start_array("allowedSCS-List"); - for (uint32_t i1 = 0; i1 < allowed_scs_list.size(); ++i1) { - j.write_str(allowed_scs_list[i1].to_string()); + for (const auto& e1 : allowed_scs_list) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -25842,77 +25853,75 @@ void lc_ch_cfg_s::ul_specific_params_s_::to_json(json_writer& j) const std::string lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_opts::to_string() const { - static constexpr const char* options[] = {"kBps0", - "kBps8", - "kBps16", - "kBps32", - "kBps64", - "kBps128", - "kBps256", - "kBps512", - "kBps1024", - "kBps2048", - "kBps4096", - "kBps8192", - "kBps16384", - "kBps32768", - "kBps65536", - "infinity"}; + static const char* options[] = {"kBps0", + "kBps8", + "kBps16", + "kBps32", + "kBps64", + "kBps128", + "kBps256", + "kBps512", + "kBps1024", + "kBps2048", + "kBps4096", + "kBps8192", + "kBps16384", + "kBps32768", + "kBps65536", + "infinity"}; return convert_enum_idx(options, 16, value, "lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_e_"); } int32_t lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_opts::to_number() const { - static constexpr int32_t options[] = { - 0, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, -1}; - return convert_enum_idx(options, 16, value, "lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_e_"); + static const int32_t options[] = {0, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, -1}; + return map_enum_number(options, 16, value, "lc_ch_cfg_s::ul_specific_params_s_::prioritised_bit_rate_e_"); } std::string lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_opts::to_string() const { - static constexpr const char* options[] = {"ms5", - "ms10", - "ms20", - "ms50", - "ms100", - "ms150", - "ms300", - "ms500", - "ms1000", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"ms5", + "ms10", + "ms20", + "ms50", + "ms100", + "ms150", + "ms300", + "ms500", + "ms1000", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_e_"); } uint16_t lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_opts::to_number() const { - static constexpr uint16_t options[] = {5, 10, 20, 50, 100, 150, 300, 500, 1000}; - return convert_enum_idx(options, 9, value, "lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_e_"); + static const uint16_t options[] = {5, 10, 20, 50, 100, 150, 300, 500, 1000}; + return map_enum_number(options, 9, value, "lc_ch_cfg_s::ul_specific_params_s_::bucket_size_dur_e_"); } std::string lc_ch_cfg_s::ul_specific_params_s_::max_pusch_dur_opts::to_string() const { - static constexpr const char* options[] = { - "ms0p02", "ms0p04", "ms0p0625", "ms0p125", "ms0p25", "ms0p5", "spare2", "spare1"}; + static const char* options[] = {"ms0p02", "ms0p04", "ms0p0625", "ms0p125", "ms0p25", "ms0p5", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "lc_ch_cfg_s::ul_specific_params_s_::max_pusch_dur_e_"); } std::string lc_ch_cfg_s::ul_specific_params_s_::bit_rate_query_prohibit_timer_opts::to_string() const { - static constexpr const char* options[] = {"s0", "s0dot4", "s0dot8", "s1dot6", "s3", "s6", "s12", "s30"}; + static const char* options[] = {"s0", "s0dot4", "s0dot8", "s1dot6", "s3", "s6", "s12", "s30"}; return convert_enum_idx(options, 8, value, "lc_ch_cfg_s::ul_specific_params_s_::bit_rate_query_prohibit_timer_e_"); } float lc_ch_cfg_s::ul_specific_params_s_::bit_rate_query_prohibit_timer_opts::to_number() const { - static constexpr float options[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; - return convert_enum_idx(options, 8, value, "lc_ch_cfg_s::ul_specific_params_s_::bit_rate_query_prohibit_timer_e_"); + static const float options[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; + return map_enum_number(options, 8, value, "lc_ch_cfg_s::ul_specific_params_s_::bit_rate_query_prohibit_timer_e_"); } std::string lc_ch_cfg_s::ul_specific_params_s_::bit_rate_query_prohibit_timer_opts::to_number_string() const { - static constexpr const char* options[] = {"0", "0.4", "0.8", "1.6", "3", "6", "12", "30"}; + static const char* options[] = {"0", "0.4", "0.8", "1.6", "3", "6", "12", "30"}; return convert_enum_idx(options, 8, value, "lc_ch_cfg_s::ul_specific_params_s_::bit_rate_query_prohibit_timer_e_"); } @@ -25958,40 +25967,40 @@ void phr_cfg_s::to_json(json_writer& j) const std::string phr_cfg_s::phr_periodic_timer_opts::to_string() const { - static constexpr const char* options[] = {"sf10", "sf20", "sf50", "sf100", "sf200", "sf500", "sf1000", "infinity"}; + static const char* options[] = {"sf10", "sf20", "sf50", "sf100", "sf200", "sf500", "sf1000", "infinity"}; return convert_enum_idx(options, 8, value, "phr_cfg_s::phr_periodic_timer_e_"); } int16_t phr_cfg_s::phr_periodic_timer_opts::to_number() const { - static constexpr int16_t options[] = {10, 20, 50, 100, 200, 500, 1000, -1}; - return convert_enum_idx(options, 8, value, "phr_cfg_s::phr_periodic_timer_e_"); + static const int16_t options[] = {10, 20, 50, 100, 200, 500, 1000, -1}; + return map_enum_number(options, 8, value, "phr_cfg_s::phr_periodic_timer_e_"); } std::string phr_cfg_s::phr_prohibit_timer_opts::to_string() const { - static constexpr const char* options[] = {"sf0", "sf10", "sf20", "sf50", "sf100", "sf200", "sf500", "sf1000"}; + static const char* options[] = {"sf0", "sf10", "sf20", "sf50", "sf100", "sf200", "sf500", "sf1000"}; return convert_enum_idx(options, 8, value, "phr_cfg_s::phr_prohibit_timer_e_"); } uint16_t phr_cfg_s::phr_prohibit_timer_opts::to_number() const { - static constexpr uint16_t options[] = {0, 10, 20, 50, 100, 200, 500, 1000}; - return convert_enum_idx(options, 8, value, "phr_cfg_s::phr_prohibit_timer_e_"); + static const uint16_t options[] = {0, 10, 20, 50, 100, 200, 500, 1000}; + return map_enum_number(options, 8, value, "phr_cfg_s::phr_prohibit_timer_e_"); } std::string phr_cfg_s::phr_tx_pwr_factor_change_opts::to_string() const { - static constexpr const char* options[] = {"dB1", "dB3", "dB6", "infinity"}; + static const char* options[] = {"dB1", "dB3", "dB6", "infinity"}; return convert_enum_idx(options, 4, value, "phr_cfg_s::phr_tx_pwr_factor_change_e_"); } int8_t phr_cfg_s::phr_tx_pwr_factor_change_opts::to_number() const { - static constexpr int8_t options[] = {1, 3, 6, -1}; - return convert_enum_idx(options, 4, value, "phr_cfg_s::phr_tx_pwr_factor_change_e_"); + static const int8_t options[] = {1, 3, 6, -1}; + return map_enum_number(options, 4, value, "phr_cfg_s::phr_tx_pwr_factor_change_e_"); } std::string phr_cfg_s::phr_mode_other_cg_opts::to_string() const { - static constexpr const char* options[] = {"real", "virtual"}; + static const char* options[] = {"real", "virtual"}; return convert_enum_idx(options, 2, value, "phr_cfg_s::phr_mode_other_cg_e_"); } @@ -26181,8 +26190,7 @@ SRSASN_CODE rlc_cfg_c::unpack(cbit_ref& bref) std::string rlc_cfg_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "am", "um-Bi-Directional", "um-Uni-Directional-UL", "um-Uni-Directional-DL"}; + static const char* options[] = {"am", "um-Bi-Directional", "um-Uni-Directional-UL", "um-Uni-Directional-DL"}; return convert_enum_idx(options, 4, value, "rlc_cfg_c::types"); } @@ -26240,47 +26248,46 @@ void rlf_timers_and_consts_s::to_json(json_writer& j) const std::string rlf_timers_and_consts_s::t310_opts::to_string() const { - static constexpr const char* options[] = { - "ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000", "ms4000", "ms6000"}; + static const char* options[] = {"ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000", "ms4000", "ms6000"}; return convert_enum_idx(options, 9, value, "rlf_timers_and_consts_s::t310_e_"); } uint16_t rlf_timers_and_consts_s::t310_opts::to_number() const { - static constexpr uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000, 4000, 6000}; - return convert_enum_idx(options, 9, value, "rlf_timers_and_consts_s::t310_e_"); + static const uint16_t options[] = {0, 50, 100, 200, 500, 1000, 2000, 4000, 6000}; + return map_enum_number(options, 9, value, "rlf_timers_and_consts_s::t310_e_"); } std::string rlf_timers_and_consts_s::n310_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_s::n310_e_"); } uint8_t rlf_timers_and_consts_s::n310_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; - return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_s::n310_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 6, 8, 10, 20}; + return map_enum_number(options, 8, value, "rlf_timers_and_consts_s::n310_e_"); } std::string rlf_timers_and_consts_s::n311_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; + static const char* options[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_s::n311_e_"); } uint8_t rlf_timers_and_consts_s::n311_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return convert_enum_idx(options, 8, value, "rlf_timers_and_consts_s::n311_e_"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(options, 8, value, "rlf_timers_and_consts_s::n311_e_"); } std::string rlf_timers_and_consts_s::t311_v1530_opts::to_string() const { - static constexpr const char* options[] = {"ms1000", "ms3000", "ms5000", "ms10000", "ms15000", "ms20000", "ms30000"}; + static const char* options[] = {"ms1000", "ms3000", "ms5000", "ms10000", "ms15000", "ms20000", "ms30000"}; return convert_enum_idx(options, 7, value, "rlf_timers_and_consts_s::t311_v1530_e_"); } uint16_t rlf_timers_and_consts_s::t311_v1530_opts::to_number() const { - static constexpr uint16_t options[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; - return convert_enum_idx(options, 7, value, "rlf_timers_and_consts_s::t311_v1530_e_"); + static const uint16_t options[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; + return map_enum_number(options, 7, value, "rlf_timers_and_consts_s::t311_v1530_e_"); } // ReconfigurationWithSync ::= SEQUENCE @@ -26371,13 +26378,13 @@ void recfg_with_sync_s::to_json(json_writer& j) const std::string recfg_with_sync_s::t304_opts::to_string() const { - static constexpr const char* options[] = {"ms50", "ms100", "ms150", "ms200", "ms500", "ms1000", "ms2000", "ms10000"}; + static const char* options[] = {"ms50", "ms100", "ms150", "ms200", "ms500", "ms1000", "ms2000", "ms10000"}; return convert_enum_idx(options, 8, value, "recfg_with_sync_s::t304_e_"); } uint16_t recfg_with_sync_s::t304_opts::to_number() const { - static constexpr uint16_t options[] = {50, 100, 150, 200, 500, 1000, 2000, 10000}; - return convert_enum_idx(options, 8, value, "recfg_with_sync_s::t304_e_"); + static const uint16_t options[] = {50, 100, 150, 200, 500, 1000, 2000, 10000}; + return map_enum_number(options, 8, value, "recfg_with_sync_s::t304_e_"); } void recfg_with_sync_s::rach_cfg_ded_c_::destroy_() @@ -26502,7 +26509,7 @@ SRSASN_CODE recfg_with_sync_s::rach_cfg_ded_c_::unpack(cbit_ref& bref) std::string recfg_with_sync_s::rach_cfg_ded_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"uplink", "supplementaryUplink"}; + static const char* options[] = {"uplink", "supplementaryUplink"}; return convert_enum_idx(options, 2, value, "recfg_with_sync_s::rach_cfg_ded_c_::types"); } @@ -26586,15 +26593,15 @@ void sched_request_cfg_s::to_json(json_writer& j) const j.start_obj(); if (sched_request_to_add_mod_list_present) { j.start_array("schedulingRequestToAddModList"); - for (uint32_t i1 = 0; i1 < sched_request_to_add_mod_list.size(); ++i1) { - sched_request_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : sched_request_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (sched_request_to_release_list_present) { j.start_array("schedulingRequestToReleaseList"); - for (uint32_t i1 = 0; i1 < sched_request_to_release_list.size(); ++i1) { - j.write_int(sched_request_to_release_list[i1]); + for (const auto& e1 : sched_request_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -26858,15 +26865,15 @@ void serving_cell_cfg_s::to_json(json_writer& j) const } if (dl_bwp_to_release_list_present) { j.start_array("downlinkBWP-ToReleaseList"); - for (uint32_t i1 = 0; i1 < dl_bwp_to_release_list.size(); ++i1) { - j.write_int(dl_bwp_to_release_list[i1]); + for (const auto& e1 : dl_bwp_to_release_list) { + j.write_int(e1); } j.end_array(); } if (dl_bwp_to_add_mod_list_present) { j.start_array("downlinkBWP-ToAddModList"); - for (uint32_t i1 = 0; i1 < dl_bwp_to_add_mod_list.size(); ++i1) { - dl_bwp_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : dl_bwp_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } @@ -26923,22 +26930,22 @@ void serving_cell_cfg_s::to_json(json_writer& j) const } if (rate_match_pattern_to_add_mod_list.is_present()) { j.start_array("rateMatchPatternToAddModList"); - for (uint32_t i1 = 0; i1 < rate_match_pattern_to_add_mod_list->size(); ++i1) { - ((*rate_match_pattern_to_add_mod_list)[i1]).to_json(j); + for (const auto& e1 : *rate_match_pattern_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (rate_match_pattern_to_release_list.is_present()) { j.start_array("rateMatchPatternToReleaseList"); - for (uint32_t i1 = 0; i1 < rate_match_pattern_to_release_list->size(); ++i1) { - j.write_int(((*rate_match_pattern_to_release_list)[i1])); + for (const auto& e1 : *rate_match_pattern_to_release_list) { + j.write_int(e1); } j.end_array(); } if (dl_ch_bw_per_scs_list.is_present()) { j.start_array("downlinkChannelBW-PerSCS-List"); - for (uint32_t i1 = 0; i1 < dl_ch_bw_per_scs_list->size(); ++i1) { - ((*dl_ch_bw_per_scs_list)[i1]).to_json(j); + for (const auto& e1 : *dl_ch_bw_per_scs_list) { + e1.to_json(j); } j.end_array(); } @@ -26948,48 +26955,48 @@ void serving_cell_cfg_s::to_json(json_writer& j) const std::string serving_cell_cfg_s::bwp_inactivity_timer_opts::to_string() const { - static constexpr const char* options[] = { - "ms2", "ms3", "ms4", "ms5", "ms6", "ms8", "ms10", "ms20", "ms30", "ms40", "ms50", - "ms60", "ms80", "ms100", "ms200", "ms300", "ms500", "ms750", "ms1280", "ms1920", "ms2560", "spare10", - "spare9", "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ms2", "ms3", "ms4", "ms5", "ms6", "ms8", "ms10", "ms20", + "ms30", "ms40", "ms50", "ms60", "ms80", "ms100", "ms200", "ms300", + "ms500", "ms750", "ms1280", "ms1920", "ms2560", "spare10", "spare9", "spare8", + "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 31, value, "serving_cell_cfg_s::bwp_inactivity_timer_e_"); } uint16_t serving_cell_cfg_s::bwp_inactivity_timer_opts::to_number() const { - static constexpr uint16_t options[] = {2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, - 60, 80, 100, 200, 300, 500, 750, 1280, 1920, 2560}; - return convert_enum_idx(options, 21, value, "serving_cell_cfg_s::bwp_inactivity_timer_e_"); + static const uint16_t options[] = {2, 3, 4, 5, 6, 8, 10, 20, 30, 40, 50, + 60, 80, 100, 200, 300, 500, 750, 1280, 1920, 2560}; + return map_enum_number(options, 21, value, "serving_cell_cfg_s::bwp_inactivity_timer_e_"); } std::string serving_cell_cfg_s::scell_deactivation_timer_opts::to_string() const { - static constexpr const char* options[] = {"ms20", - "ms40", - "ms80", - "ms160", - "ms200", - "ms240", - "ms320", - "ms400", - "ms480", - "ms520", - "ms640", - "ms720", - "ms840", - "ms1280", - "spare2", - "spare1"}; + static const char* options[] = {"ms20", + "ms40", + "ms80", + "ms160", + "ms200", + "ms240", + "ms320", + "ms400", + "ms480", + "ms520", + "ms640", + "ms720", + "ms840", + "ms1280", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "serving_cell_cfg_s::scell_deactivation_timer_e_"); } uint16_t serving_cell_cfg_s::scell_deactivation_timer_opts::to_number() const { - static constexpr uint16_t options[] = {20, 40, 80, 160, 200, 240, 320, 400, 480, 520, 640, 720, 840, 1280}; - return convert_enum_idx(options, 14, value, "serving_cell_cfg_s::scell_deactivation_timer_e_"); + static const uint16_t options[] = {20, 40, 80, 160, 200, 240, 320, 400, 480, 520, 640, 720, 840, 1280}; + return map_enum_number(options, 14, value, "serving_cell_cfg_s::scell_deactivation_timer_e_"); } std::string serving_cell_cfg_s::pathloss_ref_linking_opts::to_string() const { - static constexpr const char* options[] = {"pCell", "sCell"}; + static const char* options[] = {"pCell", "sCell"}; return convert_enum_idx(options, 2, value, "serving_cell_cfg_s::pathloss_ref_linking_e_"); } @@ -27027,15 +27034,15 @@ void tag_cfg_s::to_json(json_writer& j) const j.start_obj(); if (tag_to_release_list_present) { j.start_array("tag-ToReleaseList"); - for (uint32_t i1 = 0; i1 < tag_to_release_list.size(); ++i1) { - j.write_int(tag_to_release_list[i1]); + for (const auto& e1 : tag_to_release_list) { + j.write_int(e1); } j.end_array(); } if (tag_to_add_mod_list_present) { j.start_array("tag-ToAddModList"); - for (uint32_t i1 = 0; i1 < tag_to_add_mod_list.size(); ++i1) { - tag_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : tag_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } @@ -27340,19 +27347,19 @@ void phys_cell_group_cfg_s::to_json(json_writer& j) const std::string phys_cell_group_cfg_s::pdsch_harq_ack_codebook_opts::to_string() const { - static constexpr const char* options[] = {"semiStatic", "dynamic"}; + static const char* options[] = {"semiStatic", "dynamic"}; return convert_enum_idx(options, 2, value, "phys_cell_group_cfg_s::pdsch_harq_ack_codebook_e_"); } std::string phys_cell_group_cfg_s::xscale_opts::to_string() const { - static constexpr const char* options[] = {"dB0", "dB6", "spare2", "spare1"}; + static const char* options[] = {"dB0", "dB6", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "phys_cell_group_cfg_s::xscale_e_"); } uint8_t phys_cell_group_cfg_s::xscale_opts::to_number() const { - static constexpr uint8_t options[] = {0, 6}; - return convert_enum_idx(options, 2, value, "phys_cell_group_cfg_s::xscale_e_"); + static const uint8_t options[] = {0, 6}; + return map_enum_number(options, 2, value, "phys_cell_group_cfg_s::xscale_e_"); } // RLC-BearerConfig ::= SEQUENCE @@ -27516,7 +27523,7 @@ SRSASN_CODE rlc_bearer_cfg_s::served_radio_bearer_c_::unpack(cbit_ref& bref) std::string rlc_bearer_cfg_s::served_radio_bearer_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"srb-Identity", "drb-Identity"}; + static const char* options[] = {"srb-Identity", "drb-Identity"}; return convert_enum_idx(options, 2, value, "rlc_bearer_cfg_s::served_radio_bearer_c_::types"); } @@ -27649,7 +27656,7 @@ void security_cfg_s::to_json(json_writer& j) const std::string security_cfg_s::key_to_use_opts::to_string() const { - static constexpr const char* options[] = {"master", "secondary"}; + static const char* options[] = {"master", "secondary"}; return convert_enum_idx(options, 2, value, "security_cfg_s::key_to_use_e_"); } @@ -27826,15 +27833,15 @@ void cell_group_cfg_s::to_json(json_writer& j) const j.write_int("cellGroupId", cell_group_id); if (rlc_bearer_to_add_mod_list_present) { j.start_array("rlc-BearerToAddModList"); - for (uint32_t i1 = 0; i1 < rlc_bearer_to_add_mod_list.size(); ++i1) { - rlc_bearer_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : rlc_bearer_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (rlc_bearer_to_release_list_present) { j.start_array("rlc-BearerToReleaseList"); - for (uint32_t i1 = 0; i1 < rlc_bearer_to_release_list.size(); ++i1) { - j.write_int(rlc_bearer_to_release_list[i1]); + for (const auto& e1 : rlc_bearer_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -27852,15 +27859,15 @@ void cell_group_cfg_s::to_json(json_writer& j) const } if (scell_to_add_mod_list_present) { j.start_array("sCellToAddModList"); - for (uint32_t i1 = 0; i1 < scell_to_add_mod_list.size(); ++i1) { - scell_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : scell_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (scell_to_release_list_present) { j.start_array("sCellToReleaseList"); - for (uint32_t i1 = 0; i1 < scell_to_release_list.size(); ++i1) { - j.write_int(scell_to_release_list[i1]); + for (const auto& e1 : scell_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -27926,8 +27933,8 @@ void radio_bearer_cfg_s::to_json(json_writer& j) const j.start_obj(); if (srb_to_add_mod_list_present) { j.start_array("srb-ToAddModList"); - for (uint32_t i1 = 0; i1 < srb_to_add_mod_list.size(); ++i1) { - srb_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : srb_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } @@ -27936,15 +27943,15 @@ void radio_bearer_cfg_s::to_json(json_writer& j) const } if (drb_to_add_mod_list_present) { j.start_array("drb-ToAddModList"); - for (uint32_t i1 = 0; i1 < drb_to_add_mod_list.size(); ++i1) { - drb_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : drb_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (drb_to_release_list_present) { j.start_array("drb-ToReleaseList"); - for (uint32_t i1 = 0; i1 < drb_to_release_list.size(); ++i1) { - j.write_int(drb_to_release_list[i1]); + for (const auto& e1 : drb_to_release_list) { + j.write_int(e1); } j.end_array(); } @@ -28179,7 +28186,7 @@ SRSASN_CODE rrc_reject_s::crit_exts_c_::unpack(cbit_ref& bref) std::string rrc_reject_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcReject", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcReject", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_reject_s::crit_exts_c_::types"); } @@ -28318,7 +28325,7 @@ SRSASN_CODE rrc_setup_s::crit_exts_c_::unpack(cbit_ref& bref) std::string rrc_setup_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcSetup", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcSetup", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_setup_s::crit_exts_c_::types"); } @@ -28577,19 +28584,19 @@ SRSASN_CODE dl_ccch_msg_type_c::c1_c_::unpack(cbit_ref& bref) std::string dl_ccch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcReject", "rrcSetup", "spare2", "spare1"}; + static const char* options[] = {"rrcReject", "rrcSetup", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "dl_ccch_msg_type_c::c1_c_::types"); } std::string dl_ccch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "dl_ccch_msg_type_c::types"); } uint8_t dl_ccch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "dl_ccch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "dl_ccch_msg_type_c::types"); } // DL-CCCH-Message ::= SEQUENCE @@ -28816,13 +28823,13 @@ SRSASN_CODE csi_rs_res_mob_s::slot_cfg_c_::unpack(cbit_ref& bref) std::string csi_rs_res_mob_s::slot_cfg_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ms4", "ms5", "ms10", "ms20", "ms40"}; + static const char* options[] = {"ms4", "ms5", "ms10", "ms20", "ms40"}; return convert_enum_idx(options, 5, value, "csi_rs_res_mob_s::slot_cfg_c_::types"); } uint8_t csi_rs_res_mob_s::slot_cfg_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {4, 5, 10, 20, 40}; - return convert_enum_idx(options, 5, value, "csi_rs_res_mob_s::slot_cfg_c_::types"); + static const uint8_t options[] = {4, 5, 10, 20, 40}; + return map_enum_number(options, 5, value, "csi_rs_res_mob_s::slot_cfg_c_::types"); } void csi_rs_res_mob_s::freq_domain_alloc_c_::destroy_() @@ -28945,13 +28952,13 @@ SRSASN_CODE csi_rs_res_mob_s::freq_domain_alloc_c_::unpack(cbit_ref& bref) std::string csi_rs_res_mob_s::freq_domain_alloc_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"row1", "row2"}; + static const char* options[] = {"row1", "row2"}; return convert_enum_idx(options, 2, value, "csi_rs_res_mob_s::freq_domain_alloc_c_::types"); } uint8_t csi_rs_res_mob_s::freq_domain_alloc_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "csi_rs_res_mob_s::freq_domain_alloc_c_::types"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "csi_rs_res_mob_s::freq_domain_alloc_c_::types"); } // CSI-RS-CellMobility ::= SEQUENCE @@ -28996,8 +29003,8 @@ void csi_rs_cell_mob_s::to_json(json_writer& j) const j.write_str("density", density.to_string()); } j.start_array("csi-rs-ResourceList-Mobility"); - for (uint32_t i1 = 0; i1 < csi_rs_res_list_mob.size(); ++i1) { - csi_rs_res_list_mob[i1].to_json(j); + for (const auto& e1 : csi_rs_res_list_mob) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -29005,24 +29012,24 @@ void csi_rs_cell_mob_s::to_json(json_writer& j) const std::string csi_rs_cell_mob_s::csi_rs_meas_bw_s_::nrof_prbs_opts::to_string() const { - static constexpr const char* options[] = {"size24", "size48", "size96", "size192", "size264"}; + static const char* options[] = {"size24", "size48", "size96", "size192", "size264"}; return convert_enum_idx(options, 5, value, "csi_rs_cell_mob_s::csi_rs_meas_bw_s_::nrof_prbs_e_"); } uint16_t csi_rs_cell_mob_s::csi_rs_meas_bw_s_::nrof_prbs_opts::to_number() const { - static constexpr uint16_t options[] = {24, 48, 96, 192, 264}; - return convert_enum_idx(options, 5, value, "csi_rs_cell_mob_s::csi_rs_meas_bw_s_::nrof_prbs_e_"); + static const uint16_t options[] = {24, 48, 96, 192, 264}; + return map_enum_number(options, 5, value, "csi_rs_cell_mob_s::csi_rs_meas_bw_s_::nrof_prbs_e_"); } std::string csi_rs_cell_mob_s::density_opts::to_string() const { - static constexpr const char* options[] = {"d1", "d3"}; + static const char* options[] = {"d1", "d3"}; return convert_enum_idx(options, 2, value, "csi_rs_cell_mob_s::density_e_"); } uint8_t csi_rs_cell_mob_s::density_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3}; - return convert_enum_idx(options, 2, value, "csi_rs_cell_mob_s::density_e_"); + static const uint8_t options[] = {1, 3}; + return map_enum_number(options, 2, value, "csi_rs_cell_mob_s::density_e_"); } // Q-OffsetRangeList ::= SEQUENCE @@ -29159,8 +29166,8 @@ void csi_rs_res_cfg_mob_s::to_json(json_writer& j) const j.start_obj(); j.write_str("subcarrierSpacing", subcarrier_spacing.to_string()); j.start_array("csi-RS-CellList-Mobility"); - for (uint32_t i1 = 0; i1 < csi_rs_cell_list_mob.size(); ++i1) { - csi_rs_cell_list_mob[i1].to_json(j); + for (const auto& e1 : csi_rs_cell_list_mob) { + e1.to_json(j); } j.end_array(); if (ext) { @@ -29198,28 +29205,28 @@ void cells_to_add_mod_s::to_json(json_writer& j) const // FilterCoefficient ::= ENUMERATED std::string filt_coef_opts::to_string() const { - static constexpr const char* options[] = {"fc0", - "fc1", - "fc2", - "fc3", - "fc4", - "fc5", - "fc6", - "fc7", - "fc8", - "fc9", - "fc11", - "fc13", - "fc15", - "fc17", - "fc19", - "spare1"}; + static const char* options[] = {"fc0", + "fc1", + "fc2", + "fc3", + "fc4", + "fc5", + "fc6", + "fc7", + "fc8", + "fc9", + "fc11", + "fc13", + "fc15", + "fc17", + "fc19", + "spare1"}; return convert_enum_idx(options, 16, value, "filt_coef_e"); } uint8_t filt_coef_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19}; - return convert_enum_idx(options, 15, value, "filt_coef_e"); + static const uint8_t options[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19}; + return map_enum_number(options, 15, value, "filt_coef_e"); } // MeasReportQuantity ::= SEQUENCE @@ -29359,7 +29366,7 @@ SRSASN_CODE meas_trigger_quant_c::unpack(cbit_ref& bref) std::string meas_trigger_quant_c::types_opts::to_string() const { - static constexpr const char* options[] = {"rsrp", "rsrq", "sinr"}; + static const char* options[] = {"rsrp", "rsrq", "sinr"}; return convert_enum_idx(options, 3, value, "meas_trigger_quant_c::types"); } @@ -29474,7 +29481,7 @@ SRSASN_CODE meas_trigger_quant_eutra_c::unpack(cbit_ref& bref) std::string meas_trigger_quant_eutra_c::types_opts::to_string() const { - static constexpr const char* options[] = {"rsrp", "rsrq", "sinr"}; + static const char* options[] = {"rsrp", "rsrq", "sinr"}; return convert_enum_idx(options, 3, value, "meas_trigger_quant_eutra_c::types"); } @@ -29589,40 +29596,40 @@ SRSASN_CODE meas_trigger_quant_offset_c::unpack(cbit_ref& bref) std::string meas_trigger_quant_offset_c::types_opts::to_string() const { - static constexpr const char* options[] = {"rsrp", "rsrq", "sinr"}; + static const char* options[] = {"rsrp", "rsrq", "sinr"}; return convert_enum_idx(options, 3, value, "meas_trigger_quant_offset_c::types"); } // NR-RS-Type ::= ENUMERATED std::string nr_rs_type_opts::to_string() const { - static constexpr const char* options[] = {"ssb", "csi-rs"}; + static const char* options[] = {"ssb", "csi-rs"}; return convert_enum_idx(options, 2, value, "nr_rs_type_e"); } // ReportInterval ::= ENUMERATED std::string report_interv_opts::to_string() const { - static constexpr const char* options[] = {"ms120", - "ms240", - "ms480", - "ms640", - "ms1024", - "ms2048", - "ms5120", - "ms10240", - "ms20480", - "ms40960", - "min1", - "min6", - "min12", - "min30"}; + static const char* options[] = {"ms120", + "ms240", + "ms480", + "ms640", + "ms1024", + "ms2048", + "ms5120", + "ms10240", + "ms20480", + "ms40960", + "min1", + "min6", + "min12", + "min30"}; return convert_enum_idx(options, 14, value, "report_interv_e"); } uint16_t report_interv_opts::to_number() const { - static constexpr uint16_t options[] = {120, 240, 480, 640, 1024, 2048, 5120, 10240, 20480, 40960, 1, 6, 12, 30}; - return convert_enum_idx(options, 14, value, "report_interv_e"); + static const uint16_t options[] = {120, 240, 480, 640, 1024, 2048, 5120, 10240, 20480, 40960, 1, 6, 12, 30}; + return map_enum_number(options, 14, value, "report_interv_e"); } // SSB-ConfigMobility ::= SEQUENCE @@ -29676,28 +29683,28 @@ void ssb_cfg_mob_s::to_json(json_writer& j) const // TimeToTrigger ::= ENUMERATED std::string time_to_trigger_opts::to_string() const { - static constexpr const char* options[] = {"ms0", - "ms40", - "ms64", - "ms80", - "ms100", - "ms128", - "ms160", - "ms256", - "ms320", - "ms480", - "ms512", - "ms640", - "ms1024", - "ms1280", - "ms2560", - "ms5120"}; + static const char* options[] = {"ms0", + "ms40", + "ms64", + "ms80", + "ms100", + "ms128", + "ms160", + "ms256", + "ms320", + "ms480", + "ms512", + "ms640", + "ms1024", + "ms1280", + "ms2560", + "ms5120"}; return convert_enum_idx(options, 16, value, "time_to_trigger_e"); } uint16_t time_to_trigger_opts::to_number() const { - static constexpr uint16_t options[] = {0, 40, 64, 80, 100, 128, 160, 256, 320, 480, 512, 640, 1024, 1280, 2560, 5120}; - return convert_enum_idx(options, 16, value, "time_to_trigger_e"); + static const uint16_t options[] = {0, 40, 64, 80, 100, 128, 160, 256, 320, 480, 512, 640, 1024, 1280, 2560, 5120}; + return map_enum_number(options, 16, value, "time_to_trigger_e"); } // EUTRA-BlackCell ::= SEQUENCE @@ -30120,24 +30127,24 @@ SRSASN_CODE event_trigger_cfg_s::event_id_c_::unpack(cbit_ref& bref) std::string event_trigger_cfg_s::event_id_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"eventA1", "eventA2", "eventA3", "eventA4", "eventA5", "eventA6"}; + static const char* options[] = {"eventA1", "eventA2", "eventA3", "eventA4", "eventA5", "eventA6"}; return convert_enum_idx(options, 6, value, "event_trigger_cfg_s::event_id_c_::types"); } uint8_t event_trigger_cfg_s::event_id_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6}; - return convert_enum_idx(options, 6, value, "event_trigger_cfg_s::event_id_c_::types"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6}; + return map_enum_number(options, 6, value, "event_trigger_cfg_s::event_id_c_::types"); } std::string event_trigger_cfg_s::report_amount_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; return convert_enum_idx(options, 8, value, "event_trigger_cfg_s::report_amount_e_"); } int8_t event_trigger_cfg_s::report_amount_opts::to_number() const { - static constexpr int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return convert_enum_idx(options, 8, value, "event_trigger_cfg_s::report_amount_e_"); + static const int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(options, 8, value, "event_trigger_cfg_s::report_amount_e_"); } // EventTriggerConfigInterRAT ::= SEQUENCE @@ -30333,24 +30340,24 @@ SRSASN_CODE event_trigger_cfg_inter_rat_s::event_id_c_::unpack(cbit_ref& bref) std::string event_trigger_cfg_inter_rat_s::event_id_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"eventB1", "eventB2"}; + static const char* options[] = {"eventB1", "eventB2"}; return convert_enum_idx(options, 2, value, "event_trigger_cfg_inter_rat_s::event_id_c_::types"); } uint8_t event_trigger_cfg_inter_rat_s::event_id_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "event_trigger_cfg_inter_rat_s::event_id_c_::types"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "event_trigger_cfg_inter_rat_s::event_id_c_::types"); } std::string event_trigger_cfg_inter_rat_s::report_amount_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; return convert_enum_idx(options, 8, value, "event_trigger_cfg_inter_rat_s::report_amount_e_"); } int8_t event_trigger_cfg_inter_rat_s::report_amount_opts::to_number() const { - static constexpr int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return convert_enum_idx(options, 8, value, "event_trigger_cfg_inter_rat_s::report_amount_e_"); + static const int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(options, 8, value, "event_trigger_cfg_inter_rat_s::report_amount_e_"); } // FilterConfig ::= SEQUENCE @@ -30497,13 +30504,13 @@ void periodical_report_cfg_s::to_json(json_writer& j) const std::string periodical_report_cfg_s::report_amount_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; return convert_enum_idx(options, 8, value, "periodical_report_cfg_s::report_amount_e_"); } int8_t periodical_report_cfg_s::report_amount_opts::to_number() const { - static constexpr int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return convert_enum_idx(options, 8, value, "periodical_report_cfg_s::report_amount_e_"); + static const int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(options, 8, value, "periodical_report_cfg_s::report_amount_e_"); } // PeriodicalReportConfigInterRAT ::= SEQUENCE @@ -30540,13 +30547,13 @@ void periodical_report_cfg_inter_rat_s::to_json(json_writer& j) const std::string periodical_report_cfg_inter_rat_s::report_amount_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; return convert_enum_idx(options, 8, value, "periodical_report_cfg_inter_rat_s::report_amount_e_"); } int8_t periodical_report_cfg_inter_rat_s::report_amount_opts::to_number() const { - static constexpr int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return convert_enum_idx(options, 8, value, "periodical_report_cfg_inter_rat_s::report_amount_e_"); + static const int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(options, 8, value, "periodical_report_cfg_inter_rat_s::report_amount_e_"); } // RAN-AreaConfig ::= SEQUENCE @@ -30578,8 +30585,8 @@ void ran_area_cfg_s::to_json(json_writer& j) const j.write_str("trackingAreaCode", tac.to_string()); if (ran_area_code_list_present) { j.start_array("ran-AreaCodeList"); - for (uint32_t i1 = 0; i1 < ran_area_code_list.size(); ++i1) { - j.write_int(ran_area_code_list[i1]); + for (const auto& e1 : ran_area_code_list) { + j.write_int(e1); } j.end_array(); } @@ -30701,8 +30708,8 @@ void ssb_mtc2_s::to_json(json_writer& j) const j.start_obj(); if (pci_list_present) { j.start_array("pci-List"); - for (uint32_t i1 = 0; i1 < pci_list.size(); ++i1) { - j.write_int(pci_list[i1]); + for (const auto& e1 : pci_list) { + j.write_int(e1); } j.end_array(); } @@ -30712,13 +30719,13 @@ void ssb_mtc2_s::to_json(json_writer& j) const std::string ssb_mtc2_s::periodicity_opts::to_string() const { - static constexpr const char* options[] = {"sf5", "sf10", "sf20", "sf40", "sf80", "spare3", "spare2", "spare1"}; + static const char* options[] = {"sf5", "sf10", "sf20", "sf40", "sf80", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ssb_mtc2_s::periodicity_e_"); } uint8_t ssb_mtc2_s::periodicity_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 20, 40, 80}; - return convert_enum_idx(options, 5, value, "ssb_mtc2_s::periodicity_e_"); + static const uint8_t options[] = {5, 10, 20, 40, 80}; + return map_enum_number(options, 5, value, "ssb_mtc2_s::periodicity_e_"); } // MeasObjectEUTRA ::= SEQUENCE @@ -30791,29 +30798,29 @@ void meas_obj_eutra_s::to_json(json_writer& j) const j.write_str("allowedMeasBandwidth", allowed_meas_bw.to_string()); if (cells_to_rem_list_eutran_present) { j.start_array("cellsToRemoveListEUTRAN"); - for (uint32_t i1 = 0; i1 < cells_to_rem_list_eutran.size(); ++i1) { - j.write_int(cells_to_rem_list_eutran[i1]); + for (const auto& e1 : cells_to_rem_list_eutran) { + j.write_int(e1); } j.end_array(); } if (cells_to_add_mod_list_eutran_present) { j.start_array("cellsToAddModListEUTRAN"); - for (uint32_t i1 = 0; i1 < cells_to_add_mod_list_eutran.size(); ++i1) { - cells_to_add_mod_list_eutran[i1].to_json(j); + for (const auto& e1 : cells_to_add_mod_list_eutran) { + e1.to_json(j); } j.end_array(); } if (black_cells_to_rem_list_eutran_present) { j.start_array("blackCellsToRemoveListEUTRAN"); - for (uint32_t i1 = 0; i1 < black_cells_to_rem_list_eutran.size(); ++i1) { - j.write_int(black_cells_to_rem_list_eutran[i1]); + for (const auto& e1 : black_cells_to_rem_list_eutran) { + j.write_int(e1); } j.end_array(); } if (black_cells_to_add_mod_list_eutran_present) { j.start_array("blackCellsToAddModListEUTRAN"); - for (uint32_t i1 = 0; i1 < black_cells_to_add_mod_list_eutran.size(); ++i1) { - black_cells_to_add_mod_list_eutran[i1].to_json(j); + for (const auto& e1 : black_cells_to_add_mod_list_eutran) { + e1.to_json(j); } j.end_array(); } @@ -31043,43 +31050,43 @@ void meas_obj_nr_s::to_json(json_writer& j) const offset_mo.to_json(j); if (cells_to_rem_list_present) { j.start_array("cellsToRemoveList"); - for (uint32_t i1 = 0; i1 < cells_to_rem_list.size(); ++i1) { - j.write_int(cells_to_rem_list[i1]); + for (const auto& e1 : cells_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (cells_to_add_mod_list_present) { j.start_array("cellsToAddModList"); - for (uint32_t i1 = 0; i1 < cells_to_add_mod_list.size(); ++i1) { - cells_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : cells_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (black_cells_to_rem_list_present) { j.start_array("blackCellsToRemoveList"); - for (uint32_t i1 = 0; i1 < black_cells_to_rem_list.size(); ++i1) { - j.write_int(black_cells_to_rem_list[i1]); + for (const auto& e1 : black_cells_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (black_cells_to_add_mod_list_present) { j.start_array("blackCellsToAddModList"); - for (uint32_t i1 = 0; i1 < black_cells_to_add_mod_list.size(); ++i1) { - black_cells_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : black_cells_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (white_cells_to_rem_list_present) { j.start_array("whiteCellsToRemoveList"); - for (uint32_t i1 = 0; i1 < white_cells_to_rem_list.size(); ++i1) { - j.write_int(white_cells_to_rem_list[i1]); + for (const auto& e1 : white_cells_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (white_cells_to_add_mod_list_present) { j.start_array("whiteCellsToAddModList"); - for (uint32_t i1 = 0; i1 < white_cells_to_add_mod_list.size(); ++i1) { - white_cells_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : white_cells_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } @@ -31096,13 +31103,13 @@ void meas_obj_nr_s::to_json(json_writer& j) const std::string meas_obj_nr_s::meas_cycle_scell_v1530_opts::to_string() const { - static constexpr const char* options[] = {"sf160", "sf256", "sf320", "sf512", "sf640", "sf1024", "sf1280"}; + static const char* options[] = {"sf160", "sf256", "sf320", "sf512", "sf640", "sf1024", "sf1280"}; return convert_enum_idx(options, 7, value, "meas_obj_nr_s::meas_cycle_scell_v1530_e_"); } uint16_t meas_obj_nr_s::meas_cycle_scell_v1530_opts::to_number() const { - static constexpr uint16_t options[] = {160, 256, 320, 512, 640, 1024, 1280}; - return convert_enum_idx(options, 7, value, "meas_obj_nr_s::meas_cycle_scell_v1530_e_"); + static const uint16_t options[] = {160, 256, 320, 512, 640, 1024, 1280}; + return map_enum_number(options, 7, value, "meas_obj_nr_s::meas_cycle_scell_v1530_e_"); } // OverheatingAssistanceConfig ::= SEQUENCE @@ -31127,33 +31134,32 @@ void overheat_assist_cfg_s::to_json(json_writer& j) const std::string overheat_assist_cfg_s::overheat_ind_prohibit_timer_opts::to_string() const { - static constexpr const char* options[] = {"s0", - "s0dot5", - "s1", - "s2", - "s5", - "s10", - "s20", - "s30", - "s60", - "s90", - "s120", - "s300", - "s600", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"s0", + "s0dot5", + "s1", + "s2", + "s5", + "s10", + "s20", + "s30", + "s60", + "s90", + "s120", + "s300", + "s600", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "overheat_assist_cfg_s::overheat_ind_prohibit_timer_e_"); } float overheat_assist_cfg_s::overheat_ind_prohibit_timer_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; - return convert_enum_idx(options, 13, value, "overheat_assist_cfg_s::overheat_ind_prohibit_timer_e_"); + static const float options[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0, 60.0, 90.0, 120.0, 300.0, 600.0}; + return map_enum_number(options, 13, value, "overheat_assist_cfg_s::overheat_ind_prohibit_timer_e_"); } std::string overheat_assist_cfg_s::overheat_ind_prohibit_timer_opts::to_number_string() const { - static constexpr const char* options[] = { - "0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; + static const char* options[] = {"0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; return convert_enum_idx(options, 16, value, "overheat_assist_cfg_s::overheat_ind_prohibit_timer_e_"); } @@ -31188,8 +31194,8 @@ void plmn_ran_area_cell_s::to_json(json_writer& j) const plmn_id.to_json(j); } j.start_array("ran-AreaCells"); - for (uint32_t i1 = 0; i1 < ran_area_cells.size(); ++i1) { - j.write_str(ran_area_cells[i1].to_string()); + for (const auto& e1 : ran_area_cells) { + j.write_str(e1.to_string()); } j.end_array(); j.end_obj(); @@ -31226,8 +31232,8 @@ void plmn_ran_area_cfg_s::to_json(json_writer& j) const plmn_id.to_json(j); } j.start_array("ran-Area"); - for (uint32_t i1 = 0; i1 < ran_area.size(); ++i1) { - ran_area[i1].to_json(j); + for (const auto& e1 : ran_area) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -31423,7 +31429,7 @@ SRSASN_CODE report_cfg_inter_rat_s::report_type_c_::unpack(cbit_ref& bref) std::string report_cfg_inter_rat_s::report_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"periodical", "eventTriggered", "reportCGI"}; + static const char* options[] = {"periodical", "eventTriggered", "reportCGI"}; return convert_enum_idx(options, 3, value, "report_cfg_inter_rat_s::report_type_c_::types"); } @@ -31594,7 +31600,7 @@ SRSASN_CODE report_cfg_nr_s::report_type_c_::unpack(cbit_ref& bref) std::string report_cfg_nr_s::report_type_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"periodical", "eventTriggered", "reportCGI"}; + static const char* options[] = {"periodical", "eventTriggered", "reportCGI"}; return convert_enum_idx(options, 3, value, "report_cfg_nr_s::report_type_c_::types"); } @@ -31703,61 +31709,61 @@ void gap_cfg_s::to_json(json_writer& j) const std::string gap_cfg_s::mgl_opts::to_string() const { - static constexpr const char* options[] = {"ms1dot5", "ms3", "ms3dot5", "ms4", "ms5dot5", "ms6"}; + static const char* options[] = {"ms1dot5", "ms3", "ms3dot5", "ms4", "ms5dot5", "ms6"}; return convert_enum_idx(options, 6, value, "gap_cfg_s::mgl_e_"); } float gap_cfg_s::mgl_opts::to_number() const { - static constexpr float options[] = {1.5, 3.0, 3.5, 4.0, 5.5, 6.0}; - return convert_enum_idx(options, 6, value, "gap_cfg_s::mgl_e_"); + static const float options[] = {1.5, 3.0, 3.5, 4.0, 5.5, 6.0}; + return map_enum_number(options, 6, value, "gap_cfg_s::mgl_e_"); } std::string gap_cfg_s::mgl_opts::to_number_string() const { - static constexpr const char* options[] = {"1.5", "3", "3.5", "4", "5.5", "6"}; + static const char* options[] = {"1.5", "3", "3.5", "4", "5.5", "6"}; return convert_enum_idx(options, 6, value, "gap_cfg_s::mgl_e_"); } std::string gap_cfg_s::mgrp_opts::to_string() const { - static constexpr const char* options[] = {"ms20", "ms40", "ms80", "ms160"}; + static const char* options[] = {"ms20", "ms40", "ms80", "ms160"}; return convert_enum_idx(options, 4, value, "gap_cfg_s::mgrp_e_"); } uint8_t gap_cfg_s::mgrp_opts::to_number() const { - static constexpr uint8_t options[] = {20, 40, 80, 160}; - return convert_enum_idx(options, 4, value, "gap_cfg_s::mgrp_e_"); + static const uint8_t options[] = {20, 40, 80, 160}; + return map_enum_number(options, 4, value, "gap_cfg_s::mgrp_e_"); } std::string gap_cfg_s::mgta_opts::to_string() const { - static constexpr const char* options[] = {"ms0", "ms0dot25", "ms0dot5"}; + static const char* options[] = {"ms0", "ms0dot25", "ms0dot5"}; return convert_enum_idx(options, 3, value, "gap_cfg_s::mgta_e_"); } float gap_cfg_s::mgta_opts::to_number() const { - static constexpr float options[] = {0.0, 0.25, 0.5}; - return convert_enum_idx(options, 3, value, "gap_cfg_s::mgta_e_"); + static const float options[] = {0.0, 0.25, 0.5}; + return map_enum_number(options, 3, value, "gap_cfg_s::mgta_e_"); } std::string gap_cfg_s::mgta_opts::to_number_string() const { - static constexpr const char* options[] = {"0", "0.25", "0.5"}; + static const char* options[] = {"0", "0.25", "0.5"}; return convert_enum_idx(options, 3, value, "gap_cfg_s::mgta_e_"); } // MeasGapSharingScheme ::= ENUMERATED std::string meas_gap_sharing_scheme_opts::to_string() const { - static constexpr const char* options[] = {"scheme00", "scheme01", "scheme10", "scheme11"}; + static const char* options[] = {"scheme00", "scheme01", "scheme10", "scheme11"}; return convert_enum_idx(options, 4, value, "meas_gap_sharing_scheme_e"); } float meas_gap_sharing_scheme_opts::to_number() const { - static constexpr float options[] = {0.0, 0.1, 1.0, 1.1}; - return convert_enum_idx(options, 4, value, "meas_gap_sharing_scheme_e"); + static const float options[] = {0.0, 0.1, 1.0, 1.1}; + return map_enum_number(options, 4, value, "meas_gap_sharing_scheme_e"); } std::string meas_gap_sharing_scheme_opts::to_number_string() const { - static constexpr const char* options[] = {"0.0", "0.1", "1.0", "1.1"}; + static const char* options[] = {"0.0", "0.1", "1.0", "1.1"}; return convert_enum_idx(options, 4, value, "meas_gap_sharing_scheme_e"); } @@ -31935,7 +31941,7 @@ SRSASN_CODE meas_obj_to_add_mod_s::meas_obj_c_::unpack(cbit_ref& bref) std::string meas_obj_to_add_mod_s::meas_obj_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"measObjectNR", "measObjectEUTRA"}; + static const char* options[] = {"measObjectNR", "measObjectEUTRA"}; return convert_enum_idx(options, 2, value, "meas_obj_to_add_mod_s::meas_obj_c_::types"); } @@ -32010,7 +32016,7 @@ void quant_cfg_nr_s::to_json(json_writer& j) const // RAT-Type ::= ENUMERATED std::string rat_type_opts::to_string() const { - static constexpr const char* options[] = {"nr", "eutra-nr", "eutra", "spare1"}; + static const char* options[] = {"nr", "eutra-nr", "eutra", "spare1"}; return convert_enum_idx(options, 4, value, "rat_type_e"); } @@ -32162,7 +32168,7 @@ SRSASN_CODE report_cfg_to_add_mod_s::report_cfg_c_::unpack(cbit_ref& bref) std::string report_cfg_to_add_mod_s::report_cfg_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"reportConfigNR", "reportConfigInterRAT"}; + static const char* options[] = {"reportConfigNR", "reportConfigInterRAT"}; return convert_enum_idx(options, 2, value, "report_cfg_to_add_mod_s::report_cfg_c_::types"); } @@ -32523,40 +32529,40 @@ SRSASN_CODE other_cfg_s::delay_budget_report_cfg_c_::unpack(cbit_ref& bref) std::string other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_opts::to_string() const { - static constexpr const char* options[] = {"s0", "s0dot4", "s0dot8", "s1dot6", "s3", "s6", "s12", "s30"}; + static const char* options[] = {"s0", "s0dot4", "s0dot8", "s1dot6", "s3", "s6", "s12", "s30"}; return convert_enum_idx( options, 8, value, "other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_e_"); } float other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_opts::to_number() const { - static constexpr float options[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; - return convert_enum_idx( + static const float options[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; + return map_enum_number( options, 8, value, "other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_e_"); } std::string other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_opts::to_number_string() const { - static constexpr const char* options[] = {"0", "0.4", "0.8", "1.6", "3", "6", "12", "30"}; + static const char* options[] = {"0", "0.4", "0.8", "1.6", "3", "6", "12", "30"}; return convert_enum_idx( options, 8, value, "other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_e_"); } std::string other_cfg_s::delay_budget_report_cfg_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"release", "setup"}; + static const char* options[] = {"release", "setup"}; return convert_enum_idx(options, 2, value, "other_cfg_s::delay_budget_report_cfg_c_::types"); } // PeriodicRNAU-TimerValue ::= ENUMERATED std::string periodic_rnau_timer_value_opts::to_string() const { - static constexpr const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min360", "min720"}; + static const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min360", "min720"}; return convert_enum_idx(options, 8, value, "periodic_rnau_timer_value_e"); } uint16_t periodic_rnau_timer_value_opts::to_number() const { - static constexpr uint16_t options[] = {5, 10, 20, 30, 60, 120, 360, 720}; - return convert_enum_idx(options, 8, value, "periodic_rnau_timer_value_e"); + static const uint16_t options[] = {5, 10, 20, 30, 60, 120, 360, 720}; + return map_enum_number(options, 8, value, "periodic_rnau_timer_value_e"); } // QuantityConfig ::= SEQUENCE @@ -32616,8 +32622,8 @@ void quant_cfg_s::to_json(json_writer& j) const j.start_obj(); if (quant_cfg_nr_list_present) { j.start_array("quantityConfigNR-List"); - for (uint32_t i1 = 0; i1 < quant_cfg_nr_list.size(); ++i1) { - quant_cfg_nr_list[i1].to_json(j); + for (const auto& e1 : quant_cfg_nr_list) { + e1.to_json(j); } j.end_array(); } @@ -32704,15 +32710,15 @@ void ran_notif_area_info_c::to_json(json_writer& j) const switch (type_) { case types::cell_list: j.start_array("cellList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::ran_area_cfg_list: j.start_array("ran-AreaConfigList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -32758,7 +32764,7 @@ SRSASN_CODE ran_notif_area_info_c::unpack(cbit_ref& bref) std::string ran_notif_area_info_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellList", "ran-AreaConfigList"}; + static const char* options[] = {"cellList", "ran-AreaConfigList"}; return convert_enum_idx(options, 2, value, "ran_notif_area_info_c::types"); } @@ -32835,17 +32841,15 @@ void redirected_carrier_info_eutra_s::to_json(json_writer& j) const std::string redirected_carrier_info_eutra_s::cn_type_opts::to_string() const { - static constexpr const char* options[] = {"epc", "fiveGC"}; + static const char* options[] = {"epc", "fiveGC"}; return convert_enum_idx(options, 2, value, "redirected_carrier_info_eutra_s::cn_type_e_"); } uint8_t redirected_carrier_info_eutra_s::cn_type_opts::to_number() const { - switch (value) { - case five_gc: - return 5; - default: - invalid_enum_number(value, "redirected_carrier_info_eutra_s::cn_type_e_"); + if (value == five_gc) { + return 5; } + invalid_enum_number(value, "redirected_carrier_info_eutra_s::cn_type_e_"); return 0; } @@ -32928,15 +32932,15 @@ void cell_resel_priorities_s::to_json(json_writer& j) const j.start_obj(); if (freq_prio_list_eutra_present) { j.start_array("freqPriorityListEUTRA"); - for (uint32_t i1 = 0; i1 < freq_prio_list_eutra.size(); ++i1) { - freq_prio_list_eutra[i1].to_json(j); + for (const auto& e1 : freq_prio_list_eutra) { + e1.to_json(j); } j.end_array(); } if (freq_prio_list_nr_present) { j.start_array("freqPriorityListNR"); - for (uint32_t i1 = 0; i1 < freq_prio_list_nr.size(); ++i1) { - freq_prio_list_nr[i1].to_json(j); + for (const auto& e1 : freq_prio_list_nr) { + e1.to_json(j); } j.end_array(); } @@ -32948,13 +32952,13 @@ void cell_resel_priorities_s::to_json(json_writer& j) const std::string cell_resel_priorities_s::t320_opts::to_string() const { - static constexpr const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min180", "spare1"}; + static const char* options[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min180", "spare1"}; return convert_enum_idx(options, 8, value, "cell_resel_priorities_s::t320_e_"); } uint8_t cell_resel_priorities_s::t320_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 20, 30, 60, 120, 180}; - return convert_enum_idx(options, 7, value, "cell_resel_priorities_s::t320_e_"); + static const uint8_t options[] = {5, 10, 20, 30, 60, 120, 180}; + return map_enum_number(options, 7, value, "cell_resel_priorities_s::t320_e_"); } // MeasConfig ::= SEQUENCE @@ -33057,43 +33061,43 @@ void meas_cfg_s::to_json(json_writer& j) const j.start_obj(); if (meas_obj_to_rem_list_present) { j.start_array("measObjectToRemoveList"); - for (uint32_t i1 = 0; i1 < meas_obj_to_rem_list.size(); ++i1) { - j.write_int(meas_obj_to_rem_list[i1]); + for (const auto& e1 : meas_obj_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (meas_obj_to_add_mod_list_present) { j.start_array("measObjectToAddModList"); - for (uint32_t i1 = 0; i1 < meas_obj_to_add_mod_list.size(); ++i1) { - meas_obj_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : meas_obj_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (report_cfg_to_rem_list_present) { j.start_array("reportConfigToRemoveList"); - for (uint32_t i1 = 0; i1 < report_cfg_to_rem_list.size(); ++i1) { - j.write_int(report_cfg_to_rem_list[i1]); + for (const auto& e1 : report_cfg_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (report_cfg_to_add_mod_list_present) { j.start_array("reportConfigToAddModList"); - for (uint32_t i1 = 0; i1 < report_cfg_to_add_mod_list.size(); ++i1) { - report_cfg_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : report_cfg_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } if (meas_id_to_rem_list_present) { j.start_array("measIdToRemoveList"); - for (uint32_t i1 = 0; i1 < meas_id_to_rem_list.size(); ++i1) { - j.write_int(meas_id_to_rem_list[i1]); + for (const auto& e1 : meas_id_to_rem_list) { + j.write_int(e1); } j.end_array(); } if (meas_id_to_add_mod_list_present) { j.start_array("measIdToAddModList"); - for (uint32_t i1 = 0; i1 < meas_id_to_add_mod_list.size(); ++i1) { - meas_id_to_add_mod_list[i1].to_json(j); + for (const auto& e1 : meas_id_to_add_mod_list) { + e1.to_json(j); } j.end_array(); } @@ -33211,7 +33215,7 @@ SRSASN_CODE meas_cfg_s::s_measure_cfg_c_::unpack(cbit_ref& bref) std::string meas_cfg_s::s_measure_cfg_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ssb-RSRP", "csi-RSRP"}; + static const char* options[] = {"ssb-RSRP", "csi-RSRP"}; return convert_enum_idx(options, 2, value, "meas_cfg_s::s_measure_cfg_c_::types"); } @@ -33297,8 +33301,8 @@ void rrc_recfg_v1530_ies_s::to_json(json_writer& j) const } if (ded_nas_msg_list_present) { j.start_array("dedicatedNAS-MessageList"); - for (uint32_t i1 = 0; i1 < ded_nas_msg_list.size(); ++i1) { - j.write_str(ded_nas_msg_list[i1].to_string()); + for (const auto& e1 : ded_nas_msg_list) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -33482,7 +33486,7 @@ SRSASN_CODE redirected_carrier_info_c::unpack(cbit_ref& bref) std::string redirected_carrier_info_c::types_opts::to_string() const { - static constexpr const char* options[] = {"nr", "eutra"}; + static const char* options[] = {"nr", "eutra"}; return convert_enum_idx(options, 2, value, "redirected_carrier_info_c::types"); } @@ -33594,8 +33598,8 @@ void counter_check_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("drb-CountMSB-InfoList"); - for (uint32_t i1 = 0; i1 < drb_count_msb_info_list.size(); ++i1) { - drb_count_msb_info_list[i1].to_json(j); + for (const auto& e1 : drb_count_msb_info_list) { + e1.to_json(j); } j.end_array(); if (late_non_crit_ext_present) { @@ -33713,7 +33717,7 @@ void mob_from_nr_cmd_ies_s::to_json(json_writer& j) const std::string mob_from_nr_cmd_ies_s::target_rat_type_opts::to_string() const { - static constexpr const char* options[] = {"eutra", "spare3", "spare2", "spare1"}; + static const char* options[] = {"eutra", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "mob_from_nr_cmd_ies_s::target_rat_type_e_"); } @@ -33931,19 +33935,19 @@ void rrc_release_ies_s::to_json(json_writer& j) const std::string rrc_release_ies_s::depriorit_req_s_::depriorit_type_opts::to_string() const { - static constexpr const char* options[] = {"frequency", "nr"}; + static const char* options[] = {"frequency", "nr"}; return convert_enum_idx(options, 2, value, "rrc_release_ies_s::depriorit_req_s_::depriorit_type_e_"); } std::string rrc_release_ies_s::depriorit_req_s_::depriorit_timer_opts::to_string() const { - static constexpr const char* options[] = {"min5", "min10", "min15", "min30"}; + static const char* options[] = {"min5", "min10", "min15", "min30"}; return convert_enum_idx(options, 4, value, "rrc_release_ies_s::depriorit_req_s_::depriorit_timer_e_"); } uint8_t rrc_release_ies_s::depriorit_req_s_::depriorit_timer_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 15, 30}; - return convert_enum_idx(options, 4, value, "rrc_release_ies_s::depriorit_req_s_::depriorit_timer_e_"); + static const uint8_t options[] = {5, 10, 15, 30}; + return map_enum_number(options, 4, value, "rrc_release_ies_s::depriorit_req_s_::depriorit_timer_e_"); } // RRCResume-IEs ::= SEQUENCE @@ -34093,8 +34097,8 @@ void ue_cap_enquiry_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("ue-CapabilityRAT-RequestList"); - for (uint32_t i1 = 0; i1 < ue_cap_rat_request_list.size(); ++i1) { - ue_cap_rat_request_list[i1].to_json(j); + for (const auto& e1 : ue_cap_rat_request_list) { + e1.to_json(j); } j.end_array(); if (late_non_crit_ext_present) { @@ -34243,7 +34247,7 @@ SRSASN_CODE counter_check_s::crit_exts_c_::unpack(cbit_ref& bref) std::string counter_check_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"counterCheck", "criticalExtensionsFuture"}; + static const char* options[] = {"counterCheck", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "counter_check_s::crit_exts_c_::types"); } @@ -34383,7 +34387,7 @@ SRSASN_CODE dl_info_transfer_s::crit_exts_c_::unpack(cbit_ref& bref) std::string dl_info_transfer_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"dlInformationTransfer", "criticalExtensionsFuture"}; + static const char* options[] = {"dlInformationTransfer", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "dl_info_transfer_s::crit_exts_c_::types"); } @@ -34523,7 +34527,7 @@ SRSASN_CODE mob_from_nr_cmd_s::crit_exts_c_::unpack(cbit_ref& bref) std::string mob_from_nr_cmd_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"mobilityFromNRCommand", "criticalExtensionsFuture"}; + static const char* options[] = {"mobilityFromNRCommand", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "mob_from_nr_cmd_s::crit_exts_c_::types"); } @@ -34662,7 +34666,7 @@ SRSASN_CODE rrc_recfg_s::crit_exts_c_::unpack(cbit_ref& bref) std::string rrc_recfg_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcReconfiguration", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcReconfiguration", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_recfg_s::crit_exts_c_::types"); } @@ -34801,7 +34805,7 @@ SRSASN_CODE rrc_reest_s::crit_exts_c_::unpack(cbit_ref& bref) std::string rrc_reest_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcReestablishment", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcReestablishment", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_reest_s::crit_exts_c_::types"); } @@ -34940,7 +34944,7 @@ SRSASN_CODE rrc_release_s::crit_exts_c_::unpack(cbit_ref& bref) std::string rrc_release_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcRelease", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcRelease", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_release_s::crit_exts_c_::types"); } @@ -35079,7 +35083,7 @@ SRSASN_CODE rrc_resume_s::crit_exts_c_::unpack(cbit_ref& bref) std::string rrc_resume_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcResume", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcResume", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_resume_s::crit_exts_c_::types"); } @@ -35219,7 +35223,7 @@ SRSASN_CODE security_mode_cmd_s::crit_exts_c_::unpack(cbit_ref& bref) std::string security_mode_cmd_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"securityModeCommand", "criticalExtensionsFuture"}; + static const char* options[] = {"securityModeCommand", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "security_mode_cmd_s::crit_exts_c_::types"); } @@ -35358,7 +35362,7 @@ SRSASN_CODE ue_cap_enquiry_s::crit_exts_c_::unpack(cbit_ref& bref) std::string ue_cap_enquiry_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ueCapabilityEnquiry", "criticalExtensionsFuture"}; + static const char* options[] = {"ueCapabilityEnquiry", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "ue_cap_enquiry_s::crit_exts_c_::types"); } @@ -35831,34 +35835,34 @@ SRSASN_CODE dl_dcch_msg_type_c::c1_c_::unpack(cbit_ref& bref) std::string dl_dcch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcReconfiguration", - "rrcResume", - "rrcRelease", - "rrcReestablishment", - "securityModeCommand", - "dlInformationTransfer", - "ueCapabilityEnquiry", - "counterCheck", - "mobilityFromNRCommand", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"rrcReconfiguration", + "rrcResume", + "rrcRelease", + "rrcReestablishment", + "securityModeCommand", + "dlInformationTransfer", + "ueCapabilityEnquiry", + "counterCheck", + "mobilityFromNRCommand", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "dl_dcch_msg_type_c::c1_c_::types"); } std::string dl_dcch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "dl_dcch_msg_type_c::types"); } uint8_t dl_dcch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "dl_dcch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "dl_dcch_msg_type_c::types"); } // DL-DCCH-Message ::= SEQUENCE @@ -36010,13 +36014,13 @@ SRSASN_CODE paging_ue_id_c::unpack(cbit_ref& bref) std::string paging_ue_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"ng-5G-S-TMSI", "fullI-RNTI"}; + static const char* options[] = {"ng-5G-S-TMSI", "fullI-RNTI"}; return convert_enum_idx(options, 2, value, "paging_ue_id_c::types"); } int8_t paging_ue_id_c::types_opts::to_number() const { - static constexpr int8_t options[] = {-5}; - return convert_enum_idx(options, 1, value, "paging_ue_id_c::types"); + static const int8_t options[] = {-5}; + return map_enum_number(options, 1, value, "paging_ue_id_c::types"); } // PagingRecord ::= SEQUENCE @@ -36085,8 +36089,8 @@ void paging_s::to_json(json_writer& j) const j.start_obj(); if (paging_record_list_present) { j.start_array("pagingRecordList"); - for (uint32_t i1 = 0; i1 < paging_record_list.size(); ++i1) { - paging_record_list[i1].to_json(j); + for (const auto& e1 : paging_record_list) { + e1.to_json(j); } j.end_array(); } @@ -36265,19 +36269,19 @@ SRSASN_CODE pcch_msg_type_c::c1_c_::unpack(cbit_ref& bref) std::string pcch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"paging", "spare1"}; + static const char* options[] = {"paging", "spare1"}; return convert_enum_idx(options, 2, value, "pcch_msg_type_c::c1_c_::types"); } std::string pcch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "pcch_msg_type_c::types"); } uint8_t pcch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "pcch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "pcch_msg_type_c::types"); } // PCCH-Message ::= SEQUENCE @@ -36312,22 +36316,22 @@ void pcch_msg_s::to_json(json_writer& j) const // EstablishmentCause ::= ENUMERATED std::string establishment_cause_opts::to_string() const { - static constexpr const char* options[] = {"emergency", - "highPriorityAccess", - "mt-Access", - "mo-Signalling", - "mo-Data", - "mo-VoiceCall", - "mo-VideoCall", - "mo-SMS", - "mps-PriorityAccess", - "mcs-PriorityAccess", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"emergency", + "highPriorityAccess", + "mt-Access", + "mo-Signalling", + "mo-Data", + "mo-VoiceCall", + "mo-VideoCall", + "mo-SMS", + "mps-PriorityAccess", + "mcs-PriorityAccess", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "establishment_cause_e"); } @@ -36451,13 +36455,13 @@ SRSASN_CODE init_ue_id_c::unpack(cbit_ref& bref) std::string init_ue_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"ng-5G-S-TMSI-Part1", "randomValue"}; + static const char* options[] = {"ng-5G-S-TMSI-Part1", "randomValue"}; return convert_enum_idx(options, 2, value, "init_ue_id_c::types"); } int8_t init_ue_id_c::types_opts::to_number() const { - static constexpr int8_t options[] = {-5}; - return convert_enum_idx(options, 1, value, "init_ue_id_c::types"); + static const int8_t options[] = {-5}; + return map_enum_number(options, 1, value, "init_ue_id_c::types"); } // ReestabUE-Identity ::= SEQUENCE @@ -36489,29 +36493,29 @@ void reestab_ue_id_s::to_json(json_writer& j) const // ReestablishmentCause ::= ENUMERATED std::string reest_cause_opts::to_string() const { - static constexpr const char* options[] = {"reconfigurationFailure", "handoverFailure", "otherFailure", "spare1"}; + static const char* options[] = {"reconfigurationFailure", "handoverFailure", "otherFailure", "spare1"}; return convert_enum_idx(options, 4, value, "reest_cause_e"); } // ResumeCause ::= ENUMERATED std::string resume_cause_opts::to_string() const { - static constexpr const char* options[] = {"emergency", - "highPriorityAccess", - "mt-Access", - "mo-Signalling", - "mo-Data", - "mo-VoiceCall", - "mo-VideoCall", - "mo-SMS", - "rna-Update", - "mps-PriorityAccess", - "mcs-PriorityAccess", - "spare1", - "spare2", - "spare3", - "spare4", - "spare5"}; + static const char* options[] = {"emergency", + "highPriorityAccess", + "mt-Access", + "mo-Signalling", + "mo-Data", + "mo-VoiceCall", + "mo-VideoCall", + "mo-SMS", + "rna-Update", + "mps-PriorityAccess", + "mcs-PriorityAccess", + "spare1", + "spare2", + "spare3", + "spare4", + "spare5"}; return convert_enum_idx(options, 16, value, "resume_cause_e"); } @@ -36817,7 +36821,7 @@ SRSASN_CODE rrc_sys_info_request_s::crit_exts_c_::unpack(cbit_ref& bref) std::string rrc_sys_info_request_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcSystemInfoRequest-r15", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcSystemInfoRequest-r15", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_sys_info_request_s::crit_exts_c_::types"); } @@ -37096,20 +37100,20 @@ SRSASN_CODE ul_ccch_msg_type_c::c1_c_::unpack(cbit_ref& bref) std::string ul_ccch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "rrcSetupRequest", "rrcResumeRequest", "rrcReestablishmentRequest", "rrcSystemInfoRequest"}; return convert_enum_idx(options, 4, value, "ul_ccch_msg_type_c::c1_c_::types"); } std::string ul_ccch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "ul_ccch_msg_type_c::types"); } uint8_t ul_ccch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ul_ccch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ul_ccch_msg_type_c::types"); } // UL-CCCH-Message ::= SEQUENCE @@ -37367,24 +37371,24 @@ SRSASN_CODE ul_ccch1_msg_type_c::c1_c_::unpack(cbit_ref& bref) std::string ul_ccch1_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcResumeRequest1", "spare3", "spare2", "spare1"}; + static const char* options[] = {"rrcResumeRequest1", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ul_ccch1_msg_type_c::c1_c_::types"); } uint8_t ul_ccch1_msg_type_c::c1_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ul_ccch1_msg_type_c::c1_c_::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ul_ccch1_msg_type_c::c1_c_::types"); } std::string ul_ccch1_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "ul_ccch1_msg_type_c::types"); } uint8_t ul_ccch1_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ul_ccch1_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ul_ccch1_msg_type_c::types"); } // UL-CCCH1-Message ::= SEQUENCE @@ -37585,13 +37589,13 @@ SRSASN_CODE plmn_id_eutra_minus5_gc_c::unpack(cbit_ref& bref) std::string plmn_id_eutra_minus5_gc_c::types_opts::to_string() const { - static constexpr const char* options[] = {"plmn-Identity-EUTRA-5GC", "plmn-index"}; + static const char* options[] = {"plmn-Identity-EUTRA-5GC", "plmn-index"}; return convert_enum_idx(options, 2, value, "plmn_id_eutra_minus5_gc_c::types"); } int8_t plmn_id_eutra_minus5_gc_c::types_opts::to_number() const { - static constexpr int8_t options[] = {-5}; - return convert_enum_idx(options, 1, value, "plmn_id_eutra_minus5_gc_c::types"); + static const int8_t options[] = {-5}; + return map_enum_number(options, 1, value, "plmn_id_eutra_minus5_gc_c::types"); } // ResultsPerCSI-RS-Index ::= SEQUENCE @@ -37708,15 +37712,15 @@ void cgi_info_s::to_json(json_writer& j) const j.start_obj(); if (plmn_id_info_list_present) { j.start_array("plmn-IdentityInfoList"); - for (uint32_t i1 = 0; i1 < plmn_id_info_list.size(); ++i1) { - plmn_id_info_list[i1].to_json(j); + for (const auto& e1 : plmn_id_info_list) { + e1.to_json(j); } j.end_array(); } if (freq_band_list_present) { j.start_array("frequencyBandList"); - for (uint32_t i1 = 0; i1 < freq_band_list.size(); ++i1) { - j.write_int(freq_band_list[i1]); + for (const auto& e1 : freq_band_list) { + j.write_int(e1); } j.end_array(); } @@ -37847,7 +37851,7 @@ SRSASN_CODE cell_id_eutra_minus5_gc_c::unpack(cbit_ref& bref) std::string cell_id_eutra_minus5_gc_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellIdentity-EUTRA", "cellId-index"}; + static const char* options[] = {"cellIdentity-EUTRA", "cellId-index"}; return convert_enum_idx(options, 2, value, "cell_id_eutra_minus5_gc_c::types"); } @@ -37882,8 +37886,8 @@ void cell_access_related_info_eutra_minus5_gc_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("plmn-IdentityList-eutra-5gc"); - for (uint32_t i1 = 0; i1 < plmn_id_list_eutra_minus5gc.size(); ++i1) { - plmn_id_list_eutra_minus5gc[i1].to_json(j); + for (const auto& e1 : plmn_id_list_eutra_minus5gc) { + e1.to_json(j); } j.end_array(); j.write_str("trackingAreaCode-eutra-5gc", tac_eutra_minus5gc.to_string()); @@ -37916,8 +37920,8 @@ void cell_access_related_info_eutra_epc_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("plmn-IdentityList-eutra-epc"); - for (uint32_t i1 = 0; i1 < plmn_id_list_eutra_epc.size(); ++i1) { - plmn_id_list_eutra_epc[i1].to_json(j); + for (const auto& e1 : plmn_id_list_eutra_epc) { + e1.to_json(j); } j.end_array(); j.write_str("trackingAreaCode-eutra-epc", tac_eutra_epc.to_string()); @@ -38091,15 +38095,15 @@ void meas_result_nr_s::to_json(json_writer& j) const j.start_obj(); if (meas_result.rs_idx_results.results_ssb_idxes_present) { j.start_array("resultsSSB-Indexes"); - for (uint32_t i1 = 0; i1 < meas_result.rs_idx_results.results_ssb_idxes.size(); ++i1) { - meas_result.rs_idx_results.results_ssb_idxes[i1].to_json(j); + for (const auto& e1 : meas_result.rs_idx_results.results_ssb_idxes) { + e1.to_json(j); } j.end_array(); } if (meas_result.rs_idx_results.results_csi_rs_idxes_present) { j.start_array("resultsCSI-RS-Indexes"); - for (uint32_t i1 = 0; i1 < meas_result.rs_idx_results.results_csi_rs_idxes.size(); ++i1) { - meas_result.rs_idx_results.results_csi_rs_idxes[i1].to_json(j); + for (const auto& e1 : meas_result.rs_idx_results.results_csi_rs_idxes) { + e1.to_json(j); } j.end_array(); } @@ -38169,25 +38173,25 @@ void eutra_rstd_info_s::to_json(json_writer& j) const // MIMO-LayersDL ::= ENUMERATED std::string mimo_layers_dl_opts::to_string() const { - static constexpr const char* options[] = {"twoLayers", "fourLayers", "eightLayers"}; + static const char* options[] = {"twoLayers", "fourLayers", "eightLayers"}; return convert_enum_idx(options, 3, value, "mimo_layers_dl_e"); } uint8_t mimo_layers_dl_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8}; - return convert_enum_idx(options, 3, value, "mimo_layers_dl_e"); + static const uint8_t options[] = {2, 4, 8}; + return map_enum_number(options, 3, value, "mimo_layers_dl_e"); } // MIMO-LayersUL ::= ENUMERATED std::string mimo_layers_ul_opts::to_string() const { - static constexpr const char* options[] = {"oneLayer", "twoLayers", "fourLayers"}; + static const char* options[] = {"oneLayer", "twoLayers", "fourLayers"}; return convert_enum_idx(options, 3, value, "mimo_layers_ul_e"); } uint8_t mimo_layers_ul_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "mimo_layers_ul_e"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "mimo_layers_ul_e"); } // MeasResultEUTRA ::= SEQUENCE @@ -38267,8 +38271,8 @@ void meas_result_eutra_s::to_json(json_writer& j) const cgi_info.cgi_info_epc.cgi_info_epc_legacy.to_json(j); if (cgi_info.cgi_info_epc.cgi_info_epc_list_present) { j.start_array("cgi-info-EPC-list"); - for (uint32_t i1 = 0; i1 < cgi_info.cgi_info_epc.cgi_info_epc_list.size(); ++i1) { - cgi_info.cgi_info_epc.cgi_info_epc_list[i1].to_json(j); + for (const auto& e1 : cgi_info.cgi_info_epc.cgi_info_epc_list) { + e1.to_json(j); } j.end_array(); } @@ -38276,16 +38280,16 @@ void meas_result_eutra_s::to_json(json_writer& j) const } if (cgi_info.cgi_info_minus5_gc_present) { j.start_array("cgi-info-5GC"); - for (uint32_t i1 = 0; i1 < cgi_info.cgi_info_minus5_gc.size(); ++i1) { - cgi_info.cgi_info_minus5_gc[i1].to_json(j); + for (const auto& e1 : cgi_info.cgi_info_minus5_gc) { + e1.to_json(j); } j.end_array(); } j.write_int("freqBandIndicator", cgi_info.freq_band_ind); if (cgi_info.multi_band_info_list_present) { j.start_array("multiBandInfoList"); - for (uint32_t i1 = 0; i1 < cgi_info.multi_band_info_list.size(); ++i1) { - j.write_int(cgi_info.multi_band_info_list[i1]); + for (const auto& e1 : cgi_info.multi_band_info_list) { + j.write_int(e1); } j.end_array(); } @@ -38340,14 +38344,14 @@ void meas_result_serv_mo_s::to_json(json_writer& j) const // ReducedAggregatedBandwidth ::= ENUMERATED std::string reduced_aggregated_bw_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "mhz0", "mhz10", "mhz20", "mhz30", "mhz40", "mhz50", "mhz60", "mhz80", "mhz100", "mhz200", "mhz300", "mhz400"}; return convert_enum_idx(options, 12, value, "reduced_aggregated_bw_e"); } uint16_t reduced_aggregated_bw_opts::to_number() const { - static constexpr uint16_t options[] = {0, 10, 20, 30, 40, 50, 60, 80, 100, 200, 300, 400}; - return convert_enum_idx(options, 12, value, "reduced_aggregated_bw_e"); + static const uint16_t options[] = {0, 10, 20, 30, 40, 50, 60, 80, 100, 200, 300, 400}; + return map_enum_number(options, 12, value, "reduced_aggregated_bw_e"); } // UplinkTxDirectCurrentCell ::= SEQUENCE @@ -38372,8 +38376,8 @@ void ul_tx_direct_current_cell_s::to_json(json_writer& j) const j.start_obj(); j.write_int("servCellIndex", serv_cell_idx); j.start_array("uplinkDirectCurrentBWP"); - for (uint32_t i1 = 0; i1 < ul_direct_current_bwp.size(); ++i1) { - ul_direct_current_bwp[i1].to_json(j); + for (const auto& e1 : ul_direct_current_bwp) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -38559,41 +38563,41 @@ SRSASN_CODE delay_budget_report_c::unpack(cbit_ref& bref) std::string delay_budget_report_c::type1_opts::to_string() const { - static constexpr const char* options[] = {"msMinus1280", - "msMinus640", - "msMinus320", - "msMinus160", - "msMinus80", - "msMinus60", - "msMinus40", - "msMinus20", - "ms0", - "ms20", - "ms40", - "ms60", - "ms80", - "ms160", - "ms320", - "ms640", - "ms1280"}; + static const char* options[] = {"msMinus1280", + "msMinus640", + "msMinus320", + "msMinus160", + "msMinus80", + "msMinus60", + "msMinus40", + "msMinus20", + "ms0", + "ms20", + "ms40", + "ms60", + "ms80", + "ms160", + "ms320", + "ms640", + "ms1280"}; return convert_enum_idx(options, 17, value, "delay_budget_report_c::type1_e_"); } int16_t delay_budget_report_c::type1_opts::to_number() const { - static constexpr int16_t options[] = { + static const int16_t options[] = { -1280, -640, -320, -160, -80, -60, -40, -20, 0, 20, 40, 60, 80, 160, 320, 640, 1280}; - return convert_enum_idx(options, 17, value, "delay_budget_report_c::type1_e_"); + return map_enum_number(options, 17, value, "delay_budget_report_c::type1_e_"); } std::string delay_budget_report_c::types_opts::to_string() const { - static constexpr const char* options[] = {"type1"}; + static const char* options[] = {"type1"}; return convert_enum_idx(options, 1, value, "delay_budget_report_c::types"); } uint8_t delay_budget_report_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "delay_budget_report_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "delay_budget_report_c::types"); } // FailureInfoRLC-Bearer ::= SEQUENCE @@ -38624,7 +38628,7 @@ void fail_info_rlc_bearer_s::to_json(json_writer& j) const std::string fail_info_rlc_bearer_s::fail_type_opts::to_string() const { - static constexpr const char* options[] = {"duplication", "spare3", "spare2", "spare1"}; + static const char* options[] = {"duplication", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "fail_info_rlc_bearer_s::fail_type_e_"); } @@ -38639,8 +38643,8 @@ void location_meas_info_c::to_json(json_writer& j) const switch (type_) { case types::eutra_rstd: j.start_array("eutra-RSTD"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); break; @@ -38686,7 +38690,7 @@ SRSASN_CODE location_meas_info_c::unpack(cbit_ref& bref) std::string location_meas_info_c::types_opts::to_string() const { - static constexpr const char* options[] = {"eutra-RSTD", "eutra-FineTimingDetection"}; + static const char* options[] = {"eutra-RSTD", "eutra-FineTimingDetection"}; return convert_enum_idx(options, 2, value, "location_meas_info_c::types"); } @@ -38722,8 +38726,8 @@ void meas_results_s::to_json(json_writer& j) const j.start_obj(); j.write_int("measId", meas_id); j.start_array("measResultServingMOList"); - for (uint32_t i1 = 0; i1 < meas_result_serving_mo_list.size(); ++i1) { - meas_result_serving_mo_list[i1].to_json(j); + for (const auto& e1 : meas_result_serving_mo_list) { + e1.to_json(j); } j.end_array(); if (meas_result_neigh_cells_present) { @@ -38808,15 +38812,15 @@ void meas_results_s::meas_result_neigh_cells_c_::to_json(json_writer& j) const switch (type_) { case types::meas_result_list_nr: j.start_array("measResultListNR"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::meas_result_list_eutra: j.start_array("measResultListEUTRA"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -38864,7 +38868,7 @@ SRSASN_CODE meas_results_s::meas_result_neigh_cells_c_::unpack(cbit_ref& bref) std::string meas_results_s::meas_result_neigh_cells_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"measResultListNR", "measResultListEUTRA"}; + static const char* options[] = {"measResultListNR", "measResultListEUTRA"}; return convert_enum_idx(options, 2, value, "meas_results_s::meas_result_neigh_cells_c_::types"); } @@ -38896,8 +38900,8 @@ void rrc_recfg_complete_v1530_ies_s::to_json(json_writer& j) const j.start_obj(); if (ul_tx_direct_current_list_present) { j.start_array("uplinkTxDirectCurrentList"); - for (uint32_t i1 = 0; i1 < ul_tx_direct_current_list.size(); ++i1) { - ul_tx_direct_current_list[i1].to_json(j); + for (const auto& e1 : ul_tx_direct_current_list) { + e1.to_json(j); } j.end_array(); } @@ -39063,7 +39067,7 @@ SRSASN_CODE s_nssai_c::unpack(cbit_ref& bref) std::string s_nssai_c::types_opts::to_string() const { - static constexpr const char* options[] = {"sst", "sst-SD"}; + static const char* options[] = {"sst", "sst-SD"}; return convert_enum_idx(options, 2, value, "s_nssai_c::types"); } @@ -39134,8 +39138,8 @@ void counter_check_resp_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("drb-CountInfoList"); - for (uint32_t i1 = 0; i1 < drb_count_info_list.size(); ++i1) { - drb_count_info_list[i1].to_json(j); + for (const auto& e1 : drb_count_info_list) { + e1.to_json(j); } j.end_array(); if (late_non_crit_ext_present) { @@ -39417,8 +39421,8 @@ void rrc_resume_complete_ies_s::to_json(json_writer& j) const } if (ul_tx_direct_current_list_present) { j.start_array("uplinkTxDirectCurrentList"); - for (uint32_t i1 = 0; i1 < ul_tx_direct_current_list.size(); ++i1) { - ul_tx_direct_current_list[i1].to_json(j); + for (const auto& e1 : ul_tx_direct_current_list) { + e1.to_json(j); } j.end_array(); } @@ -39505,8 +39509,8 @@ void rrc_setup_complete_ies_s::to_json(json_writer& j) const } if (s_nssai_list_present) { j.start_array("s-NSSAI-List"); - for (uint32_t i1 = 0; i1 < s_nssai_list.size(); ++i1) { - s_nssai_list[i1].to_json(j); + for (const auto& e1 : s_nssai_list) { + e1.to_json(j); } j.end_array(); } @@ -39528,7 +39532,7 @@ void rrc_setup_complete_ies_s::to_json(json_writer& j) const std::string rrc_setup_complete_ies_s::guami_type_opts::to_string() const { - static constexpr const char* options[] = {"native", "mapped"}; + static const char* options[] = {"native", "mapped"}; return convert_enum_idx(options, 2, value, "rrc_setup_complete_ies_s::guami_type_e_"); } @@ -39653,7 +39657,7 @@ SRSASN_CODE rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::unpack(cbit_r std::string rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ng-5G-S-TMSI", "ng-5G-S-TMSI-Part2"}; + static const char* options[] = {"ng-5G-S-TMSI", "ng-5G-S-TMSI-Part2"}; return convert_enum_idx(options, 2, value, "rrc_setup_complete_ies_s::ng_minus5_g_s_tmsi_value_c_::types"); } @@ -39821,8 +39825,8 @@ void ue_cap_info_ies_s::to_json(json_writer& j) const j.start_obj(); if (ue_cap_rat_container_list_present) { j.start_array("ue-CapabilityRAT-ContainerList"); - for (uint32_t i1 = 0; i1 < ue_cap_rat_container_list.size(); ++i1) { - ue_cap_rat_container_list[i1].to_json(j); + for (const auto& e1 : ue_cap_rat_container_list) { + e1.to_json(j); } j.end_array(); } @@ -40021,7 +40025,7 @@ SRSASN_CODE counter_check_resp_s::crit_exts_c_::unpack(cbit_ref& bref) std::string counter_check_resp_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"counterCheckResponse", "criticalExtensionsFuture"}; + static const char* options[] = {"counterCheckResponse", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "counter_check_resp_s::crit_exts_c_::types"); } @@ -40157,7 +40161,7 @@ SRSASN_CODE fail_info_s::crit_exts_c_::unpack(cbit_ref& bref) std::string fail_info_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"failureInformation", "criticalExtensionsFuture"}; + static const char* options[] = {"failureInformation", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "fail_info_s::crit_exts_c_::types"); } @@ -40294,7 +40298,7 @@ SRSASN_CODE location_meas_ind_s::crit_exts_c_::unpack(cbit_ref& bref) std::string location_meas_ind_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"locationMeasurementIndication", "criticalExtensionsFuture"}; + static const char* options[] = {"locationMeasurementIndication", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "location_meas_ind_s::crit_exts_c_::types"); } @@ -40430,7 +40434,7 @@ SRSASN_CODE meas_report_s::crit_exts_c_::unpack(cbit_ref& bref) std::string meas_report_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"measurementReport", "criticalExtensionsFuture"}; + static const char* options[] = {"measurementReport", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "meas_report_s::crit_exts_c_::types"); } @@ -40570,7 +40574,7 @@ SRSASN_CODE rrc_recfg_complete_s::crit_exts_c_::unpack(cbit_ref& bref) std::string rrc_recfg_complete_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcReconfigurationComplete", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcReconfigurationComplete", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_recfg_complete_s::crit_exts_c_::types"); } @@ -40710,7 +40714,7 @@ SRSASN_CODE rrc_reest_complete_s::crit_exts_c_::unpack(cbit_ref& bref) std::string rrc_reest_complete_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcReestablishmentComplete", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcReestablishmentComplete", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_reest_complete_s::crit_exts_c_::types"); } @@ -40850,7 +40854,7 @@ SRSASN_CODE rrc_resume_complete_s::crit_exts_c_::unpack(cbit_ref& bref) std::string rrc_resume_complete_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcResumeComplete", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcResumeComplete", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_resume_complete_s::crit_exts_c_::types"); } @@ -40990,7 +40994,7 @@ SRSASN_CODE rrc_setup_complete_s::crit_exts_c_::unpack(cbit_ref& bref) std::string rrc_setup_complete_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"rrcSetupComplete", "criticalExtensionsFuture"}; + static const char* options[] = {"rrcSetupComplete", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "rrc_setup_complete_s::crit_exts_c_::types"); } @@ -41130,7 +41134,7 @@ SRSASN_CODE security_mode_complete_s::crit_exts_c_::unpack(cbit_ref& bref) std::string security_mode_complete_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"securityModeComplete", "criticalExtensionsFuture"}; + static const char* options[] = {"securityModeComplete", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "security_mode_complete_s::crit_exts_c_::types"); } @@ -41270,7 +41274,7 @@ SRSASN_CODE security_mode_fail_s::crit_exts_c_::unpack(cbit_ref& bref) std::string security_mode_fail_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"securityModeFailure", "criticalExtensionsFuture"}; + static const char* options[] = {"securityModeFailure", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "security_mode_fail_s::crit_exts_c_::types"); } @@ -41406,7 +41410,7 @@ SRSASN_CODE ueassist_info_s::crit_exts_c_::unpack(cbit_ref& bref) std::string ueassist_info_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ueAssistanceInformation", "criticalExtensionsFuture"}; + static const char* options[] = {"ueAssistanceInformation", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "ueassist_info_s::crit_exts_c_::types"); } @@ -41545,7 +41549,7 @@ SRSASN_CODE ue_cap_info_s::crit_exts_c_::unpack(cbit_ref& bref) std::string ue_cap_info_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ueCapabilityInformation", "criticalExtensionsFuture"}; + static const char* options[] = {"ueCapabilityInformation", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "ue_cap_info_s::crit_exts_c_::types"); } @@ -41682,7 +41686,7 @@ SRSASN_CODE ul_info_transfer_s::crit_exts_c_::unpack(cbit_ref& bref) std::string ul_info_transfer_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ulInformationTransfer", "criticalExtensionsFuture"}; + static const char* options[] = {"ulInformationTransfer", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "ul_info_transfer_s::crit_exts_c_::types"); } @@ -42195,34 +42199,34 @@ SRSASN_CODE ul_dcch_msg_type_c::c1_c_::unpack(cbit_ref& bref) std::string ul_dcch_msg_type_c::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"measurementReport", - "rrcReconfigurationComplete", - "rrcSetupComplete", - "rrcReestablishmentComplete", - "rrcResumeComplete", - "securityModeComplete", - "securityModeFailure", - "ulInformationTransfer", - "locationMeasurementIndication", - "ueCapabilityInformation", - "counterCheckResponse", - "ueAssistanceInformation", - "failureInformation", - "spare3", - "spare2", - "spare1"}; + static const char* options[] = {"measurementReport", + "rrcReconfigurationComplete", + "rrcSetupComplete", + "rrcReestablishmentComplete", + "rrcResumeComplete", + "securityModeComplete", + "securityModeFailure", + "ulInformationTransfer", + "locationMeasurementIndication", + "ueCapabilityInformation", + "counterCheckResponse", + "ueAssistanceInformation", + "failureInformation", + "spare3", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "ul_dcch_msg_type_c::c1_c_::types"); } std::string ul_dcch_msg_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "messageClassExtension"}; + static const char* options[] = {"c1", "messageClassExtension"}; return convert_enum_idx(options, 2, value, "ul_dcch_msg_type_c::types"); } uint8_t ul_dcch_msg_type_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ul_dcch_msg_type_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ul_dcch_msg_type_c::types"); } // UL-DCCH-Message ::= SEQUENCE @@ -42257,15 +42261,14 @@ void ul_dcch_msg_s::to_json(json_writer& j) const // CA-BandwidthClassEUTRA ::= ENUMERATED std::string ca_bw_class_eutra_opts::to_string() const { - static constexpr const char* options[] = {"a", "b", "c", "d", "e", "f"}; + static const char* options[] = {"a", "b", "c", "d", "e", "f"}; return convert_enum_idx(options, 6, value, "ca_bw_class_eutra_e"); } // CA-BandwidthClassNR ::= ENUMERATED std::string ca_bw_class_nr_opts::to_string() const { - static constexpr const char* options[] = { - "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q"}; + static const char* options[] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q"}; return convert_enum_idx(options, 17, value, "ca_bw_class_nr_e"); } @@ -42439,7 +42442,7 @@ SRSASN_CODE band_params_c::unpack(cbit_ref& bref) std::string band_params_c::types_opts::to_string() const { - static constexpr const char* options[] = {"eutra", "nr"}; + static const char* options[] = {"eutra", "nr"}; return convert_enum_idx(options, 2, value, "band_params_c::types"); } @@ -42575,13 +42578,13 @@ void ca_params_nr_s::to_json(json_writer& j) const std::string ca_params_nr_s::supported_num_tag_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n3", "n4"}; + static const char* options[] = {"n2", "n3", "n4"}; return convert_enum_idx(options, 3, value, "ca_params_nr_s::supported_num_tag_e_"); } uint8_t ca_params_nr_s::supported_num_tag_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4}; - return convert_enum_idx(options, 3, value, "ca_params_nr_s::supported_num_tag_e_"); + static const uint8_t options[] = {2, 3, 4}; + return map_enum_number(options, 3, value, "ca_params_nr_s::supported_num_tag_e_"); } // MRDC-Parameters ::= SEQUENCE @@ -42698,24 +42701,24 @@ void mrdc_params_s::to_json(json_writer& j) const std::string mrdc_params_s::ul_sharing_eutra_nr_opts::to_string() const { - static constexpr const char* options[] = {"tdm", "fdm", "both"}; + static const char* options[] = {"tdm", "fdm", "both"}; return convert_enum_idx(options, 3, value, "mrdc_params_s::ul_sharing_eutra_nr_e_"); } std::string mrdc_params_s::ul_switching_time_eutra_nr_opts::to_string() const { - static constexpr const char* options[] = {"type1", "type2"}; + static const char* options[] = {"type1", "type2"}; return convert_enum_idx(options, 2, value, "mrdc_params_s::ul_switching_time_eutra_nr_e_"); } uint8_t mrdc_params_s::ul_switching_time_eutra_nr_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "mrdc_params_s::ul_switching_time_eutra_nr_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "mrdc_params_s::ul_switching_time_eutra_nr_e_"); } std::string mrdc_params_s::intra_band_endc_support_v1540_opts::to_string() const { - static constexpr const char* options[] = {"non-contiguous", "both"}; + static const char* options[] = {"non-contiguous", "both"}; return convert_enum_idx(options, 2, value, "mrdc_params_s::intra_band_endc_support_v1540_e_"); } @@ -42774,8 +42777,8 @@ void band_combination_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("bandList"); - for (uint32_t i1 = 0; i1 < band_list.size(); ++i1) { - band_list[i1].to_json(j); + for (const auto& e1 : band_list) { + e1.to_json(j); } j.end_array(); j.write_int("featureSetCombination", feature_set_combination); @@ -42843,62 +42846,62 @@ void srs_switching_time_eutra_s::to_json(json_writer& j) const std::string srs_switching_time_eutra_s::switching_time_dl_opts::to_string() const { - static constexpr const char* options[] = {"n0", - "n0dot5", - "n1", - "n1dot5", - "n2", - "n2dot5", - "n3", - "n3dot5", - "n4", - "n4dot5", - "n5", - "n5dot5", - "n6", - "n6dot5", - "n7"}; + static const char* options[] = {"n0", + "n0dot5", + "n1", + "n1dot5", + "n2", + "n2dot5", + "n3", + "n3dot5", + "n4", + "n4dot5", + "n5", + "n5dot5", + "n6", + "n6dot5", + "n7"}; return convert_enum_idx(options, 15, value, "srs_switching_time_eutra_s::switching_time_dl_e_"); } float srs_switching_time_eutra_s::switching_time_dl_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0}; - return convert_enum_idx(options, 15, value, "srs_switching_time_eutra_s::switching_time_dl_e_"); + static const float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0}; + return map_enum_number(options, 15, value, "srs_switching_time_eutra_s::switching_time_dl_e_"); } std::string srs_switching_time_eutra_s::switching_time_dl_opts::to_number_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "0", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "4.5", "5", "5.5", "6", "6.5", "7"}; return convert_enum_idx(options, 15, value, "srs_switching_time_eutra_s::switching_time_dl_e_"); } std::string srs_switching_time_eutra_s::switching_time_ul_opts::to_string() const { - static constexpr const char* options[] = {"n0", - "n0dot5", - "n1", - "n1dot5", - "n2", - "n2dot5", - "n3", - "n3dot5", - "n4", - "n4dot5", - "n5", - "n5dot5", - "n6", - "n6dot5", - "n7"}; + static const char* options[] = {"n0", + "n0dot5", + "n1", + "n1dot5", + "n2", + "n2dot5", + "n3", + "n3dot5", + "n4", + "n4dot5", + "n5", + "n5dot5", + "n6", + "n6dot5", + "n7"}; return convert_enum_idx(options, 15, value, "srs_switching_time_eutra_s::switching_time_ul_e_"); } float srs_switching_time_eutra_s::switching_time_ul_opts::to_number() const { - static constexpr float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0}; - return convert_enum_idx(options, 15, value, "srs_switching_time_eutra_s::switching_time_ul_e_"); + static const float options[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0}; + return map_enum_number(options, 15, value, "srs_switching_time_eutra_s::switching_time_ul_e_"); } std::string srs_switching_time_eutra_s::switching_time_ul_opts::to_number_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "0", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "4.5", "5", "5.5", "6", "6.5", "7"}; return convert_enum_idx(options, 15, value, "srs_switching_time_eutra_s::switching_time_ul_e_"); } @@ -42946,26 +42949,24 @@ void srs_switching_time_nr_s::to_json(json_writer& j) const std::string srs_switching_time_nr_s::switching_time_dl_opts::to_string() const { - static constexpr const char* options[] = { - "n0us", "n30us", "n100us", "n140us", "n200us", "n300us", "n500us", "n900us"}; + static const char* options[] = {"n0us", "n30us", "n100us", "n140us", "n200us", "n300us", "n500us", "n900us"}; return convert_enum_idx(options, 8, value, "srs_switching_time_nr_s::switching_time_dl_e_"); } uint16_t srs_switching_time_nr_s::switching_time_dl_opts::to_number() const { - static constexpr uint16_t options[] = {0, 30, 100, 140, 200, 300, 500, 900}; - return convert_enum_idx(options, 8, value, "srs_switching_time_nr_s::switching_time_dl_e_"); + static const uint16_t options[] = {0, 30, 100, 140, 200, 300, 500, 900}; + return map_enum_number(options, 8, value, "srs_switching_time_nr_s::switching_time_dl_e_"); } std::string srs_switching_time_nr_s::switching_time_ul_opts::to_string() const { - static constexpr const char* options[] = { - "n0us", "n30us", "n100us", "n140us", "n200us", "n300us", "n500us", "n900us"}; + static const char* options[] = {"n0us", "n30us", "n100us", "n140us", "n200us", "n300us", "n500us", "n900us"}; return convert_enum_idx(options, 8, value, "srs_switching_time_nr_s::switching_time_ul_e_"); } uint16_t srs_switching_time_nr_s::switching_time_ul_opts::to_number() const { - static constexpr uint16_t options[] = {0, 30, 100, 140, 200, 300, 500, 900}; - return convert_enum_idx(options, 8, value, "srs_switching_time_nr_s::switching_time_ul_e_"); + static const uint16_t options[] = {0, 30, 100, 140, 200, 300, 500, 900}; + return map_enum_number(options, 8, value, "srs_switching_time_nr_s::switching_time_ul_e_"); } // BandParameters-v1540 ::= SEQUENCE @@ -43112,8 +43113,8 @@ void band_params_v1540_s::srs_carrier_switch_c_::to_json(json_writer& j) const j.write_fieldname("nr"); j.start_obj(); j.start_array("srs-SwitchingTimesListNR"); - for (uint32_t i1 = 0; i1 < c.get().srs_switching_times_list_nr.size(); ++i1) { - c.get().srs_switching_times_list_nr[i1].to_json(j); + for (const auto& e1 : c.get().srs_switching_times_list_nr) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -43122,8 +43123,8 @@ void band_params_v1540_s::srs_carrier_switch_c_::to_json(json_writer& j) const j.write_fieldname("eutra"); j.start_obj(); j.start_array("srs-SwitchingTimesListEUTRA"); - for (uint32_t i1 = 0; i1 < c.get().srs_switching_times_list_eutra.size(); ++i1) { - c.get().srs_switching_times_list_eutra[i1].to_json(j); + for (const auto& e1 : c.get().srs_switching_times_list_eutra) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -43170,14 +43171,13 @@ SRSASN_CODE band_params_v1540_s::srs_carrier_switch_c_::unpack(cbit_ref& bref) std::string band_params_v1540_s::srs_carrier_switch_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"nr", "eutra"}; + static const char* options[] = {"nr", "eutra"}; return convert_enum_idx(options, 2, value, "band_params_v1540_s::srs_carrier_switch_c_::types"); } std::string band_params_v1540_s::srs_tx_switch_v1540_s_::supported_srs_tx_port_switch_opts::to_string() const { - static constexpr const char* options[] = { - "t1r2", "t1r4", "t2r4", "t1r4-t2r4", "t1r1", "t2r2", "t4r4", "notSupported"}; + static const char* options[] = {"t1r2", "t1r4", "t2r4", "t1r4-t2r4", "t1r1", "t2r2", "t4r4", "notSupported"}; return convert_enum_idx( options, 8, value, "band_params_v1540_s::srs_tx_switch_v1540_s_::supported_srs_tx_port_switch_e_"); } @@ -43308,8 +43308,8 @@ void band_combination_v1540_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("bandList-v1540"); - for (uint32_t i1 = 0; i1 < band_list_v1540.size(); ++i1) { - band_list_v1540[i1].to_json(j); + for (const auto& e1 : band_list_v1540) { + e1.to_json(j); } j.end_array(); if (ca_params_nr_v1540_present) { @@ -43390,13 +43390,13 @@ void supported_csi_rs_res_s::to_json(json_writer& j) const std::string supported_csi_rs_res_s::max_num_tx_ports_per_res_opts::to_string() const { - static constexpr const char* options[] = {"p2", "p4", "p8", "p12", "p16", "p24", "p32"}; + static const char* options[] = {"p2", "p4", "p8", "p12", "p16", "p24", "p32"}; return convert_enum_idx(options, 7, value, "supported_csi_rs_res_s::max_num_tx_ports_per_res_e_"); } uint8_t supported_csi_rs_res_s::max_num_tx_ports_per_res_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8, 12, 16, 24, 32}; - return convert_enum_idx(options, 7, value, "supported_csi_rs_res_s::max_num_tx_ports_per_res_e_"); + static const uint8_t options[] = {2, 4, 8, 12, 16, 24, 32}; + return map_enum_number(options, 7, value, "supported_csi_rs_res_s::max_num_tx_ports_per_res_e_"); } // BeamManagementSSB-CSI-RS ::= SEQUENCE @@ -43443,52 +43443,52 @@ void beam_management_ssb_csi_rs_s::to_json(json_writer& j) const std::string beam_management_ssb_csi_rs_s::max_num_ssb_csi_rs_res_one_tx_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n8", "n16", "n32", "n64"}; + static const char* options[] = {"n0", "n8", "n16", "n32", "n64"}; return convert_enum_idx(options, 5, value, "beam_management_ssb_csi_rs_s::max_num_ssb_csi_rs_res_one_tx_e_"); } uint8_t beam_management_ssb_csi_rs_s::max_num_ssb_csi_rs_res_one_tx_opts::to_number() const { - static constexpr uint8_t options[] = {0, 8, 16, 32, 64}; - return convert_enum_idx(options, 5, value, "beam_management_ssb_csi_rs_s::max_num_ssb_csi_rs_res_one_tx_e_"); + static const uint8_t options[] = {0, 8, 16, 32, 64}; + return map_enum_number(options, 5, value, "beam_management_ssb_csi_rs_s::max_num_ssb_csi_rs_res_one_tx_e_"); } std::string beam_management_ssb_csi_rs_s::max_num_csi_rs_res_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n4", "n8", "n16", "n32", "n64"}; + static const char* options[] = {"n0", "n4", "n8", "n16", "n32", "n64"}; return convert_enum_idx(options, 6, value, "beam_management_ssb_csi_rs_s::max_num_csi_rs_res_e_"); } uint8_t beam_management_ssb_csi_rs_s::max_num_csi_rs_res_opts::to_number() const { - static constexpr uint8_t options[] = {0, 4, 8, 16, 32, 64}; - return convert_enum_idx(options, 6, value, "beam_management_ssb_csi_rs_s::max_num_csi_rs_res_e_"); + static const uint8_t options[] = {0, 4, 8, 16, 32, 64}; + return map_enum_number(options, 6, value, "beam_management_ssb_csi_rs_s::max_num_csi_rs_res_e_"); } std::string beam_management_ssb_csi_rs_s::max_num_csi_rs_res_two_tx_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n4", "n8", "n16", "n32", "n64"}; + static const char* options[] = {"n0", "n4", "n8", "n16", "n32", "n64"}; return convert_enum_idx(options, 6, value, "beam_management_ssb_csi_rs_s::max_num_csi_rs_res_two_tx_e_"); } uint8_t beam_management_ssb_csi_rs_s::max_num_csi_rs_res_two_tx_opts::to_number() const { - static constexpr uint8_t options[] = {0, 4, 8, 16, 32, 64}; - return convert_enum_idx(options, 6, value, "beam_management_ssb_csi_rs_s::max_num_csi_rs_res_two_tx_e_"); + static const uint8_t options[] = {0, 4, 8, 16, 32, 64}; + return map_enum_number(options, 6, value, "beam_management_ssb_csi_rs_s::max_num_csi_rs_res_two_tx_e_"); } std::string beam_management_ssb_csi_rs_s::supported_csi_rs_density_opts::to_string() const { - static constexpr const char* options[] = {"one", "three", "oneAndThree"}; + static const char* options[] = {"one", "three", "oneAndThree"}; return convert_enum_idx(options, 3, value, "beam_management_ssb_csi_rs_s::supported_csi_rs_density_e_"); } std::string beam_management_ssb_csi_rs_s::max_num_aperiodic_csi_rs_res_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n1", "n4", "n8", "n16", "n32", "n64"}; + static const char* options[] = {"n0", "n1", "n4", "n8", "n16", "n32", "n64"}; return convert_enum_idx(options, 7, value, "beam_management_ssb_csi_rs_s::max_num_aperiodic_csi_rs_res_e_"); } uint8_t beam_management_ssb_csi_rs_s::max_num_aperiodic_csi_rs_res_opts::to_number() const { - static constexpr uint8_t options[] = {0, 1, 4, 8, 16, 32, 64}; - return convert_enum_idx(options, 7, value, "beam_management_ssb_csi_rs_s::max_num_aperiodic_csi_rs_res_e_"); + static const uint8_t options[] = {0, 1, 4, 8, 16, 32, 64}; + return map_enum_number(options, 7, value, "beam_management_ssb_csi_rs_s::max_num_aperiodic_csi_rs_res_e_"); } // CSI-RS-ForTracking ::= SEQUENCE @@ -43554,13 +43554,13 @@ void csi_rs_im_reception_for_feedback_s::to_json(json_writer& j) const std::string csi_rs_im_reception_for_feedback_s::max_cfg_num_csi_im_per_cc_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32"}; + static const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32"}; return convert_enum_idx(options, 6, value, "csi_rs_im_reception_for_feedback_s::max_cfg_num_csi_im_per_cc_e_"); } uint8_t csi_rs_im_reception_for_feedback_s::max_cfg_num_csi_im_per_cc_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 16, 32}; - return convert_enum_idx(options, 6, value, "csi_rs_im_reception_for_feedback_s::max_cfg_num_csi_im_per_cc_e_"); + static const uint8_t options[] = {1, 2, 4, 8, 16, 32}; + return map_enum_number(options, 6, value, "csi_rs_im_reception_for_feedback_s::max_cfg_num_csi_im_per_cc_e_"); } // CSI-RS-ProcFrameworkForSRS ::= SEQUENCE @@ -43635,13 +43635,13 @@ void csi_report_framework_s::to_json(json_writer& j) const std::string csi_report_framework_s::max_num_aperiodic_csi_trigger_state_per_cc_opts::to_string() const { - static constexpr const char* options[] = {"n3", "n7", "n15", "n31", "n63", "n128"}; + static const char* options[] = {"n3", "n7", "n15", "n31", "n63", "n128"}; return convert_enum_idx(options, 6, value, "csi_report_framework_s::max_num_aperiodic_csi_trigger_state_per_cc_e_"); } uint8_t csi_report_framework_s::max_num_aperiodic_csi_trigger_state_per_cc_opts::to_number() const { - static constexpr uint8_t options[] = {3, 7, 15, 31, 63, 128}; - return convert_enum_idx(options, 6, value, "csi_report_framework_s::max_num_aperiodic_csi_trigger_state_per_cc_e_"); + static const uint8_t options[] = {3, 7, 15, 31, 63, 128}; + return map_enum_number(options, 6, value, "csi_report_framework_s::max_num_aperiodic_csi_trigger_state_per_cc_e_"); } // CodebookParameters ::= SEQUENCE @@ -43711,8 +43711,8 @@ void codebook_params_s::to_json(json_writer& j) const j.write_fieldname("singlePanel"); j.start_obj(); j.start_array("supportedCSI-RS-ResourceList"); - for (uint32_t i1 = 0; i1 < type1.single_panel.supported_csi_rs_res_list.size(); ++i1) { - type1.single_panel.supported_csi_rs_res_list[i1].to_json(j); + for (const auto& e1 : type1.single_panel.supported_csi_rs_res_list) { + e1.to_json(j); } j.end_array(); j.write_str("modes", type1.single_panel.modes.to_string()); @@ -43722,8 +43722,8 @@ void codebook_params_s::to_json(json_writer& j) const j.write_fieldname("multiPanel"); j.start_obj(); j.start_array("supportedCSI-RS-ResourceList"); - for (uint32_t i1 = 0; i1 < type1.multi_panel.supported_csi_rs_res_list.size(); ++i1) { - type1.multi_panel.supported_csi_rs_res_list[i1].to_json(j); + for (const auto& e1 : type1.multi_panel.supported_csi_rs_res_list) { + e1.to_json(j); } j.end_array(); j.write_str("modes", type1.multi_panel.modes.to_string()); @@ -43736,8 +43736,8 @@ void codebook_params_s::to_json(json_writer& j) const j.write_fieldname("type2"); j.start_obj(); j.start_array("supportedCSI-RS-ResourceList"); - for (uint32_t i1 = 0; i1 < type2.supported_csi_rs_res_list.size(); ++i1) { - type2.supported_csi_rs_res_list[i1].to_json(j); + for (const auto& e1 : type2.supported_csi_rs_res_list) { + e1.to_json(j); } j.end_array(); j.write_int("parameterLx", type2.param_lx); @@ -43751,8 +43751,8 @@ void codebook_params_s::to_json(json_writer& j) const j.write_fieldname("type2-PortSelection"); j.start_obj(); j.start_array("supportedCSI-RS-ResourceList"); - for (uint32_t i1 = 0; i1 < type2_port_sel.supported_csi_rs_res_list.size(); ++i1) { - type2_port_sel.supported_csi_rs_res_list[i1].to_json(j); + for (const auto& e1 : type2_port_sel.supported_csi_rs_res_list) { + e1.to_json(j); } j.end_array(); j.write_int("parameterLx", type2_port_sel.param_lx); @@ -43764,41 +43764,41 @@ void codebook_params_s::to_json(json_writer& j) const std::string codebook_params_s::type1_s_::single_panel_s_::modes_opts::to_string() const { - static constexpr const char* options[] = {"mode1", "mode1andMode2"}; + static const char* options[] = {"mode1", "mode1andMode2"}; return convert_enum_idx(options, 2, value, "codebook_params_s::type1_s_::single_panel_s_::modes_e_"); } std::string codebook_params_s::type1_s_::multi_panel_s_::modes_opts::to_string() const { - static constexpr const char* options[] = {"mode1", "mode2", "both"}; + static const char* options[] = {"mode1", "mode2", "both"}; return convert_enum_idx(options, 3, value, "codebook_params_s::type1_s_::multi_panel_s_::modes_e_"); } uint8_t codebook_params_s::type1_s_::multi_panel_s_::modes_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "codebook_params_s::type1_s_::multi_panel_s_::modes_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "codebook_params_s::type1_s_::multi_panel_s_::modes_e_"); } std::string codebook_params_s::type1_s_::multi_panel_s_::nrof_panels_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "codebook_params_s::type1_s_::multi_panel_s_::nrof_panels_e_"); } uint8_t codebook_params_s::type1_s_::multi_panel_s_::nrof_panels_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "codebook_params_s::type1_s_::multi_panel_s_::nrof_panels_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "codebook_params_s::type1_s_::multi_panel_s_::nrof_panels_e_"); } std::string codebook_params_s::type2_s_::amplitude_scaling_type_opts::to_string() const { - static constexpr const char* options[] = {"wideband", "widebandAndSubband"}; + static const char* options[] = {"wideband", "widebandAndSubband"}; return convert_enum_idx(options, 2, value, "codebook_params_s::type2_s_::amplitude_scaling_type_e_"); } std::string codebook_params_s::type2_port_sel_s_::amplitude_scaling_type_opts::to_string() const { - static constexpr const char* options[] = {"wideband", "widebandAndSubband"}; + static const char* options[] = {"wideband", "widebandAndSubband"}; return convert_enum_idx(options, 2, value, "codebook_params_s::type2_port_sel_s_::amplitude_scaling_type_e_"); } @@ -43830,29 +43830,29 @@ void dummy_g_s::to_json(json_writer& j) const std::string dummy_g_s::max_num_ssb_csi_rs_res_one_tx_opts::to_string() const { - static constexpr const char* options[] = {"n8", "n16", "n32", "n64"}; + static const char* options[] = {"n8", "n16", "n32", "n64"}; return convert_enum_idx(options, 4, value, "dummy_g_s::max_num_ssb_csi_rs_res_one_tx_e_"); } uint8_t dummy_g_s::max_num_ssb_csi_rs_res_one_tx_opts::to_number() const { - static constexpr uint8_t options[] = {8, 16, 32, 64}; - return convert_enum_idx(options, 4, value, "dummy_g_s::max_num_ssb_csi_rs_res_one_tx_e_"); + static const uint8_t options[] = {8, 16, 32, 64}; + return map_enum_number(options, 4, value, "dummy_g_s::max_num_ssb_csi_rs_res_one_tx_e_"); } std::string dummy_g_s::max_num_ssb_csi_rs_res_two_tx_opts::to_string() const { - static constexpr const char* options[] = {"n0", "n4", "n8", "n16", "n32", "n64"}; + static const char* options[] = {"n0", "n4", "n8", "n16", "n32", "n64"}; return convert_enum_idx(options, 6, value, "dummy_g_s::max_num_ssb_csi_rs_res_two_tx_e_"); } uint8_t dummy_g_s::max_num_ssb_csi_rs_res_two_tx_opts::to_number() const { - static constexpr uint8_t options[] = {0, 4, 8, 16, 32, 64}; - return convert_enum_idx(options, 6, value, "dummy_g_s::max_num_ssb_csi_rs_res_two_tx_e_"); + static const uint8_t options[] = {0, 4, 8, 16, 32, 64}; + return map_enum_number(options, 6, value, "dummy_g_s::max_num_ssb_csi_rs_res_two_tx_e_"); } std::string dummy_g_s::supported_csi_rs_density_opts::to_string() const { - static constexpr const char* options[] = {"one", "three", "oneAndThree"}; + static const char* options[] = {"one", "three", "oneAndThree"}; return convert_enum_idx(options, 3, value, "dummy_g_s::supported_csi_rs_density_e_"); } @@ -43999,35 +43999,35 @@ void spatial_relations_s::to_json(json_writer& j) const std::string spatial_relations_s::max_num_cfgured_spatial_relations_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8", "n16", "n32", "n64", "n96"}; + static const char* options[] = {"n4", "n8", "n16", "n32", "n64", "n96"}; return convert_enum_idx(options, 6, value, "spatial_relations_s::max_num_cfgured_spatial_relations_e_"); } uint8_t spatial_relations_s::max_num_cfgured_spatial_relations_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16, 32, 64, 96}; - return convert_enum_idx(options, 6, value, "spatial_relations_s::max_num_cfgured_spatial_relations_e_"); + static const uint8_t options[] = {4, 8, 16, 32, 64, 96}; + return map_enum_number(options, 6, value, "spatial_relations_s::max_num_cfgured_spatial_relations_e_"); } std::string spatial_relations_s::max_num_active_spatial_relations_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "n8", "n14"}; + static const char* options[] = {"n1", "n2", "n4", "n8", "n14"}; return convert_enum_idx(options, 5, value, "spatial_relations_s::max_num_active_spatial_relations_e_"); } uint8_t spatial_relations_s::max_num_active_spatial_relations_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 14}; - return convert_enum_idx(options, 5, value, "spatial_relations_s::max_num_active_spatial_relations_e_"); + static const uint8_t options[] = {1, 2, 4, 8, 14}; + return map_enum_number(options, 5, value, "spatial_relations_s::max_num_active_spatial_relations_e_"); } std::string spatial_relations_s::max_num_dl_rs_qcl_type_d_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "n8", "n14"}; + static const char* options[] = {"n1", "n2", "n4", "n8", "n14"}; return convert_enum_idx(options, 5, value, "spatial_relations_s::max_num_dl_rs_qcl_type_d_e_"); } uint8_t spatial_relations_s::max_num_dl_rs_qcl_type_d_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 14}; - return convert_enum_idx(options, 5, value, "spatial_relations_s::max_num_dl_rs_qcl_type_d_e_"); + static const uint8_t options[] = {1, 2, 4, 8, 14}; + return map_enum_number(options, 5, value, "spatial_relations_s::max_num_dl_rs_qcl_type_d_e_"); } // MIMO-ParametersPerBand ::= SEQUENCE @@ -44675,8 +44675,8 @@ void mimo_params_per_band_s::to_json(json_writer& j) const } if (srs_assoc_csi_rs.is_present()) { j.start_array("srs-AssocCSI-RS"); - for (uint32_t i1 = 0; i1 < srs_assoc_csi_rs->size(); ++i1) { - ((*srs_assoc_csi_rs)[i1]).to_json(j); + for (const auto& e1 : *srs_assoc_csi_rs) { + e1.to_json(j); } j.end_array(); } @@ -44690,189 +44690,189 @@ void mimo_params_per_band_s::to_json(json_writer& j) const std::string mimo_params_per_band_s::tci_state_pdsch_s_::max_num_cfgured_tcistates_per_cc_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8", "n16", "n32", "n64", "n128"}; + static const char* options[] = {"n4", "n8", "n16", "n32", "n64", "n128"}; return convert_enum_idx( options, 6, value, "mimo_params_per_band_s::tci_state_pdsch_s_::max_num_cfgured_tcistates_per_cc_e_"); } uint8_t mimo_params_per_band_s::tci_state_pdsch_s_::max_num_cfgured_tcistates_per_cc_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16, 32, 64, 128}; - return convert_enum_idx( + static const uint8_t options[] = {4, 8, 16, 32, 64, 128}; + return map_enum_number( options, 6, value, "mimo_params_per_band_s::tci_state_pdsch_s_::max_num_cfgured_tcistates_per_cc_e_"); } std::string mimo_params_per_band_s::tci_state_pdsch_s_::max_num_active_tci_per_bwp_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "n8"}; + static const char* options[] = {"n1", "n2", "n4", "n8"}; return convert_enum_idx( options, 4, value, "mimo_params_per_band_s::tci_state_pdsch_s_::max_num_active_tci_per_bwp_e_"); } uint8_t mimo_params_per_band_s::tci_state_pdsch_s_::max_num_active_tci_per_bwp_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4, 8}; + return map_enum_number( options, 4, value, "mimo_params_per_band_s::tci_state_pdsch_s_::max_num_active_tci_per_bwp_e_"); } std::string mimo_params_per_band_s::pusch_trans_coherence_opts::to_string() const { - static constexpr const char* options[] = {"nonCoherent", "partialCoherent", "fullCoherent"}; + static const char* options[] = {"nonCoherent", "partialCoherent", "fullCoherent"}; return convert_enum_idx(options, 3, value, "mimo_params_per_band_s::pusch_trans_coherence_e_"); } std::string mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus15k_hz_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n7", "n14"}; + static const char* options[] = {"n4", "n7", "n14"}; return convert_enum_idx( options, 3, value, "mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus15k_hz_e_"); } uint8_t mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus15k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {4, 7, 14}; - return convert_enum_idx( + static const uint8_t options[] = {4, 7, 14}; + return map_enum_number( options, 3, value, "mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus15k_hz_e_"); } std::string mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus30k_hz_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n7", "n14"}; + static const char* options[] = {"n4", "n7", "n14"}; return convert_enum_idx( options, 3, value, "mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus30k_hz_e_"); } uint8_t mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus30k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {4, 7, 14}; - return convert_enum_idx( + static const uint8_t options[] = {4, 7, 14}; + return map_enum_number( options, 3, value, "mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus30k_hz_e_"); } std::string mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus60k_hz_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n7", "n14"}; + static const char* options[] = {"n4", "n7", "n14"}; return convert_enum_idx( options, 3, value, "mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus60k_hz_e_"); } uint8_t mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus60k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {4, 7, 14}; - return convert_enum_idx( + static const uint8_t options[] = {4, 7, 14}; + return map_enum_number( options, 3, value, "mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus60k_hz_e_"); } std::string mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus120k_hz_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n7", "n14"}; + static const char* options[] = {"n4", "n7", "n14"}; return convert_enum_idx( options, 3, value, "mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus120k_hz_e_"); } uint8_t mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus120k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {4, 7, 14}; - return convert_enum_idx( + static const uint8_t options[] = {4, 7, 14}; + return map_enum_number( options, 3, value, "mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus120k_hz_e_"); } std::string mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus240k_hz_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n7", "n14"}; + static const char* options[] = {"n4", "n7", "n14"}; return convert_enum_idx( options, 3, value, "mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus240k_hz_e_"); } uint8_t mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus240k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {4, 7, 14}; - return convert_enum_idx( + static const uint8_t options[] = {4, 7, 14}; + return map_enum_number( options, 3, value, "mimo_params_per_band_s::max_num_rx_tx_beam_switch_dl_s_::scs_minus240k_hz_e_"); } std::string mimo_params_per_band_s::max_num_non_group_beam_report_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4"}; + static const char* options[] = {"n1", "n2", "n4"}; return convert_enum_idx(options, 3, value, "mimo_params_per_band_s::max_num_non_group_beam_report_e_"); } uint8_t mimo_params_per_band_s::max_num_non_group_beam_report_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4}; - return convert_enum_idx(options, 3, value, "mimo_params_per_band_s::max_num_non_group_beam_report_e_"); + static const uint8_t options[] = {1, 2, 4}; + return map_enum_number(options, 3, value, "mimo_params_per_band_s::max_num_non_group_beam_report_e_"); } std::string mimo_params_per_band_s::ul_beam_management_s_::max_num_srs_res_per_set_bm_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n8", "n16"}; + static const char* options[] = {"n2", "n4", "n8", "n16"}; return convert_enum_idx( options, 4, value, "mimo_params_per_band_s::ul_beam_management_s_::max_num_srs_res_per_set_bm_e_"); } uint8_t mimo_params_per_band_s::ul_beam_management_s_::max_num_srs_res_per_set_bm_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8, 16}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 8, 16}; + return map_enum_number( options, 4, value, "mimo_params_per_band_s::ul_beam_management_s_::max_num_srs_res_per_set_bm_e_"); } std::string mimo_params_per_band_s::beam_report_timing_s_::scs_minus15k_hz_opts::to_string() const { - static constexpr const char* options[] = {"sym2", "sym4", "sym8"}; + static const char* options[] = {"sym2", "sym4", "sym8"}; return convert_enum_idx(options, 3, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus15k_hz_e_"); } uint8_t mimo_params_per_band_s::beam_report_timing_s_::scs_minus15k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8}; - return convert_enum_idx(options, 3, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus15k_hz_e_"); + static const uint8_t options[] = {2, 4, 8}; + return map_enum_number(options, 3, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus15k_hz_e_"); } std::string mimo_params_per_band_s::beam_report_timing_s_::scs_minus30k_hz_opts::to_string() const { - static constexpr const char* options[] = {"sym4", "sym8", "sym14", "sym28"}; + static const char* options[] = {"sym4", "sym8", "sym14", "sym28"}; return convert_enum_idx(options, 4, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus30k_hz_e_"); } uint8_t mimo_params_per_band_s::beam_report_timing_s_::scs_minus30k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 14, 28}; - return convert_enum_idx(options, 4, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus30k_hz_e_"); + static const uint8_t options[] = {4, 8, 14, 28}; + return map_enum_number(options, 4, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus30k_hz_e_"); } std::string mimo_params_per_band_s::beam_report_timing_s_::scs_minus60k_hz_opts::to_string() const { - static constexpr const char* options[] = {"sym8", "sym14", "sym28"}; + static const char* options[] = {"sym8", "sym14", "sym28"}; return convert_enum_idx(options, 3, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus60k_hz_e_"); } uint8_t mimo_params_per_band_s::beam_report_timing_s_::scs_minus60k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {8, 14, 28}; - return convert_enum_idx(options, 3, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus60k_hz_e_"); + static const uint8_t options[] = {8, 14, 28}; + return map_enum_number(options, 3, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus60k_hz_e_"); } std::string mimo_params_per_band_s::beam_report_timing_s_::scs_minus120k_hz_opts::to_string() const { - static constexpr const char* options[] = {"sym14", "sym28", "sym56"}; + static const char* options[] = {"sym14", "sym28", "sym56"}; return convert_enum_idx(options, 3, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus120k_hz_e_"); } uint8_t mimo_params_per_band_s::beam_report_timing_s_::scs_minus120k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {14, 28, 56}; - return convert_enum_idx(options, 3, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus120k_hz_e_"); + static const uint8_t options[] = {14, 28, 56}; + return map_enum_number(options, 3, value, "mimo_params_per_band_s::beam_report_timing_s_::scs_minus120k_hz_e_"); } std::string mimo_params_per_band_s::beam_switch_timing_s_::scs_minus60k_hz_opts::to_string() const { - static constexpr const char* options[] = {"sym14", "sym28", "sym48", "sym224", "sym336"}; + static const char* options[] = {"sym14", "sym28", "sym48", "sym224", "sym336"}; return convert_enum_idx(options, 5, value, "mimo_params_per_band_s::beam_switch_timing_s_::scs_minus60k_hz_e_"); } uint16_t mimo_params_per_band_s::beam_switch_timing_s_::scs_minus60k_hz_opts::to_number() const { - static constexpr uint16_t options[] = {14, 28, 48, 224, 336}; - return convert_enum_idx(options, 5, value, "mimo_params_per_band_s::beam_switch_timing_s_::scs_minus60k_hz_e_"); + static const uint16_t options[] = {14, 28, 48, 224, 336}; + return map_enum_number(options, 5, value, "mimo_params_per_band_s::beam_switch_timing_s_::scs_minus60k_hz_e_"); } std::string mimo_params_per_band_s::beam_switch_timing_s_::scs_minus120k_hz_opts::to_string() const { - static constexpr const char* options[] = {"sym14", "sym28", "sym48", "sym224", "sym336"}; + static const char* options[] = {"sym14", "sym28", "sym48", "sym224", "sym336"}; return convert_enum_idx(options, 5, value, "mimo_params_per_band_s::beam_switch_timing_s_::scs_minus120k_hz_e_"); } uint16_t mimo_params_per_band_s::beam_switch_timing_s_::scs_minus120k_hz_opts::to_number() const { - static constexpr uint16_t options[] = {14, 28, 48, 224, 336}; - return convert_enum_idx(options, 5, value, "mimo_params_per_band_s::beam_switch_timing_s_::scs_minus120k_hz_e_"); + static const uint16_t options[] = {14, 28, 48, 224, 336}; + return map_enum_number(options, 5, value, "mimo_params_per_band_s::beam_switch_timing_s_::scs_minus120k_hz_e_"); } // BandNR ::= SEQUENCE @@ -45062,24 +45062,24 @@ void band_nr_s::to_json(json_writer& j) const std::string band_nr_s::bwp_same_numerology_opts::to_string() const { - static constexpr const char* options[] = {"upto2", "upto4"}; + static const char* options[] = {"upto2", "upto4"}; return convert_enum_idx(options, 2, value, "band_nr_s::bwp_same_numerology_e_"); } uint8_t band_nr_s::bwp_same_numerology_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "band_nr_s::bwp_same_numerology_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "band_nr_s::bwp_same_numerology_e_"); } std::string band_nr_s::ue_pwr_class_opts::to_string() const { - static constexpr const char* options[] = {"pc1", "pc2", "pc3", "pc4"}; + static const char* options[] = {"pc1", "pc2", "pc3", "pc4"}; return convert_enum_idx(options, 4, value, "band_nr_s::ue_pwr_class_e_"); } uint8_t band_nr_s::ue_pwr_class_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4}; - return convert_enum_idx(options, 4, value, "band_nr_s::ue_pwr_class_e_"); + static const uint8_t options[] = {1, 2, 3, 4}; + return map_enum_number(options, 4, value, "band_nr_s::ue_pwr_class_e_"); } void band_nr_s::ch_bws_dl_v1530_c_::destroy_() @@ -45256,13 +45256,13 @@ SRSASN_CODE band_nr_s::ch_bws_dl_v1530_c_::unpack(cbit_ref& bref) std::string band_nr_s::ch_bws_dl_v1530_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fr1", "fr2"}; + static const char* options[] = {"fr1", "fr2"}; return convert_enum_idx(options, 2, value, "band_nr_s::ch_bws_dl_v1530_c_::types"); } uint8_t band_nr_s::ch_bws_dl_v1530_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "band_nr_s::ch_bws_dl_v1530_c_::types"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "band_nr_s::ch_bws_dl_v1530_c_::types"); } void band_nr_s::ch_bws_ul_v1530_c_::destroy_() @@ -45439,24 +45439,24 @@ SRSASN_CODE band_nr_s::ch_bws_ul_v1530_c_::unpack(cbit_ref& bref) std::string band_nr_s::ch_bws_ul_v1530_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"fr1", "fr2"}; + static const char* options[] = {"fr1", "fr2"}; return convert_enum_idx(options, 2, value, "band_nr_s::ch_bws_ul_v1530_c_::types"); } uint8_t band_nr_s::ch_bws_ul_v1530_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "band_nr_s::ch_bws_ul_v1530_c_::types"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "band_nr_s::ch_bws_ul_v1530_c_::types"); } std::string band_nr_s::max_ul_duty_cycle_pc2_fr1_opts::to_string() const { - static constexpr const char* options[] = {"n60", "n70", "n80", "n90", "n100"}; + static const char* options[] = {"n60", "n70", "n80", "n90", "n100"}; return convert_enum_idx(options, 5, value, "band_nr_s::max_ul_duty_cycle_pc2_fr1_e_"); } uint8_t band_nr_s::max_ul_duty_cycle_pc2_fr1_opts::to_number() const { - static constexpr uint8_t options[] = {60, 70, 80, 90, 100}; - return convert_enum_idx(options, 5, value, "band_nr_s::max_ul_duty_cycle_pc2_fr1_e_"); + static const uint8_t options[] = {60, 70, 80, 90, 100}; + return map_enum_number(options, 5, value, "band_nr_s::max_ul_duty_cycle_pc2_fr1_e_"); } // EUTRA-ParametersCommon ::= SEQUENCE @@ -45567,8 +45567,8 @@ void eutra_params_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandListEUTRA"); - for (uint32_t i1 = 0; i1 < supported_band_list_eutra.size(); ++i1) { - j.write_int(supported_band_list_eutra[i1]); + for (const auto& e1 : supported_band_list_eutra) { + j.write_int(e1); } j.end_array(); if (eutra_params_common_present) { @@ -45714,7 +45714,7 @@ SRSASN_CODE feature_set_c::unpack(cbit_ref& bref) std::string feature_set_c::types_opts::to_string() const { - static constexpr const char* options[] = {"eutra", "nr"}; + static const char* options[] = {"eutra", "nr"}; return convert_enum_idx(options, 2, value, "feature_set_c::types"); } @@ -45753,60 +45753,59 @@ void dummy_a_s::to_json(json_writer& j) const std::string dummy_a_s::max_num_ports_across_nzp_csi_rs_per_cc_opts::to_string() const { - static constexpr const char* options[] = {"p2", "p4", "p8", "p12", "p16", "p24", "p32", "p40", "p48", - "p56", "p64", "p72", "p80", "p88", "p96", "p104", "p112", "p120", - "p128", "p136", "p144", "p152", "p160", "p168", "p176", "p184", "p192", - "p200", "p208", "p216", "p224", "p232", "p240", "p248", "p256"}; + static const char* options[] = {"p2", "p4", "p8", "p12", "p16", "p24", "p32", "p40", "p48", + "p56", "p64", "p72", "p80", "p88", "p96", "p104", "p112", "p120", + "p128", "p136", "p144", "p152", "p160", "p168", "p176", "p184", "p192", + "p200", "p208", "p216", "p224", "p232", "p240", "p248", "p256"}; return convert_enum_idx(options, 35, value, "dummy_a_s::max_num_ports_across_nzp_csi_rs_per_cc_e_"); } uint16_t dummy_a_s::max_num_ports_across_nzp_csi_rs_per_cc_opts::to_number() const { - static constexpr uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 40, 48, 56, 64, 72, - 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, - 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256}; - return convert_enum_idx(options, 35, value, "dummy_a_s::max_num_ports_across_nzp_csi_rs_per_cc_e_"); + static const uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 40, 48, 56, 64, 72, + 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, + 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256}; + return map_enum_number(options, 35, value, "dummy_a_s::max_num_ports_across_nzp_csi_rs_per_cc_e_"); } std::string dummy_a_s::max_num_cs_im_per_cc_opts::to_string() const { - static constexpr const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32"}; + static const char* options[] = {"n1", "n2", "n4", "n8", "n16", "n32"}; return convert_enum_idx(options, 6, value, "dummy_a_s::max_num_cs_im_per_cc_e_"); } uint8_t dummy_a_s::max_num_cs_im_per_cc_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 8, 16, 32}; - return convert_enum_idx(options, 6, value, "dummy_a_s::max_num_cs_im_per_cc_e_"); + static const uint8_t options[] = {1, 2, 4, 8, 16, 32}; + return map_enum_number(options, 6, value, "dummy_a_s::max_num_cs_im_per_cc_e_"); } std::string dummy_a_s::max_num_simul_csi_rs_act_bwp_all_cc_opts::to_string() const { - static constexpr const char* options[] = {"n5", "n6", "n7", "n8", "n9", "n10", "n12", "n14", "n16", - "n18", "n20", "n22", "n24", "n26", "n28", "n30", "n32", "n34", - "n36", "n38", "n40", "n42", "n44", "n46", "n48", "n50", "n52", - "n54", "n56", "n58", "n60", "n62", "n64"}; + static const char* options[] = {"n5", "n6", "n7", "n8", "n9", "n10", "n12", "n14", "n16", "n18", "n20", + "n22", "n24", "n26", "n28", "n30", "n32", "n34", "n36", "n38", "n40", "n42", + "n44", "n46", "n48", "n50", "n52", "n54", "n56", "n58", "n60", "n62", "n64"}; return convert_enum_idx(options, 33, value, "dummy_a_s::max_num_simul_csi_rs_act_bwp_all_cc_e_"); } uint8_t dummy_a_s::max_num_simul_csi_rs_act_bwp_all_cc_opts::to_number() const { - static constexpr uint8_t options[] = {5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, - 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64}; - return convert_enum_idx(options, 33, value, "dummy_a_s::max_num_simul_csi_rs_act_bwp_all_cc_e_"); + static const uint8_t options[] = {5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, + 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64}; + return map_enum_number(options, 33, value, "dummy_a_s::max_num_simul_csi_rs_act_bwp_all_cc_e_"); } std::string dummy_a_s::total_num_ports_simul_csi_rs_act_bwp_all_cc_opts::to_string() const { - static constexpr const char* options[] = {"p8", "p12", "p16", "p24", "p32", "p40", "p48", "p56", "p64", - "p72", "p80", "p88", "p96", "p104", "p112", "p120", "p128", "p136", - "p144", "p152", "p160", "p168", "p176", "p184", "p192", "p200", "p208", - "p216", "p224", "p232", "p240", "p248", "p256"}; + static const char* options[] = {"p8", "p12", "p16", "p24", "p32", "p40", "p48", "p56", "p64", + "p72", "p80", "p88", "p96", "p104", "p112", "p120", "p128", "p136", + "p144", "p152", "p160", "p168", "p176", "p184", "p192", "p200", "p208", + "p216", "p224", "p232", "p240", "p248", "p256"}; return convert_enum_idx(options, 33, value, "dummy_a_s::total_num_ports_simul_csi_rs_act_bwp_all_cc_e_"); } uint16_t dummy_a_s::total_num_ports_simul_csi_rs_act_bwp_all_cc_opts::to_number() const { - static constexpr uint16_t options[] = {8, 12, 16, 24, 32, 40, 48, 56, 64, 72, 80, - 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, - 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256}; - return convert_enum_idx(options, 33, value, "dummy_a_s::total_num_ports_simul_csi_rs_act_bwp_all_cc_e_"); + static const uint16_t options[] = {8, 12, 16, 24, 32, 40, 48, 56, 64, 72, 80, + 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, + 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256}; + return map_enum_number(options, 33, value, "dummy_a_s::total_num_ports_simul_csi_rs_act_bwp_all_cc_e_"); } // DummyB ::= SEQUENCE @@ -45843,18 +45842,18 @@ void dummy_b_s::to_json(json_writer& j) const std::string dummy_b_s::max_num_tx_ports_per_res_opts::to_string() const { - static constexpr const char* options[] = {"p2", "p4", "p8", "p12", "p16", "p24", "p32"}; + static const char* options[] = {"p2", "p4", "p8", "p12", "p16", "p24", "p32"}; return convert_enum_idx(options, 7, value, "dummy_b_s::max_num_tx_ports_per_res_e_"); } uint8_t dummy_b_s::max_num_tx_ports_per_res_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 8, 12, 16, 24, 32}; - return convert_enum_idx(options, 7, value, "dummy_b_s::max_num_tx_ports_per_res_e_"); + static const uint8_t options[] = {2, 4, 8, 12, 16, 24, 32}; + return map_enum_number(options, 7, value, "dummy_b_s::max_num_tx_ports_per_res_e_"); } std::string dummy_b_s::supported_codebook_mode_opts::to_string() const { - static constexpr const char* options[] = {"mode1", "mode1AndMode2"}; + static const char* options[] = {"mode1", "mode1AndMode2"}; return convert_enum_idx(options, 2, value, "dummy_b_s::supported_codebook_mode_e_"); } @@ -45895,35 +45894,35 @@ void dummy_c_s::to_json(json_writer& j) const std::string dummy_c_s::max_num_tx_ports_per_res_opts::to_string() const { - static constexpr const char* options[] = {"p8", "p16", "p32"}; + static const char* options[] = {"p8", "p16", "p32"}; return convert_enum_idx(options, 3, value, "dummy_c_s::max_num_tx_ports_per_res_e_"); } uint8_t dummy_c_s::max_num_tx_ports_per_res_opts::to_number() const { - static constexpr uint8_t options[] = {8, 16, 32}; - return convert_enum_idx(options, 3, value, "dummy_c_s::max_num_tx_ports_per_res_e_"); + static const uint8_t options[] = {8, 16, 32}; + return map_enum_number(options, 3, value, "dummy_c_s::max_num_tx_ports_per_res_e_"); } std::string dummy_c_s::supported_codebook_mode_opts::to_string() const { - static constexpr const char* options[] = {"mode1", "mode2", "both"}; + static const char* options[] = {"mode1", "mode2", "both"}; return convert_enum_idx(options, 3, value, "dummy_c_s::supported_codebook_mode_e_"); } uint8_t dummy_c_s::supported_codebook_mode_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "dummy_c_s::supported_codebook_mode_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "dummy_c_s::supported_codebook_mode_e_"); } std::string dummy_c_s::supported_num_panels_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4"}; + static const char* options[] = {"n2", "n4"}; return convert_enum_idx(options, 2, value, "dummy_c_s::supported_num_panels_e_"); } uint8_t dummy_c_s::supported_num_panels_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4}; - return convert_enum_idx(options, 2, value, "dummy_c_s::supported_num_panels_e_"); + static const uint8_t options[] = {2, 4}; + return map_enum_number(options, 2, value, "dummy_c_s::supported_num_panels_e_"); } // DummyD ::= SEQUENCE @@ -45970,18 +45969,18 @@ void dummy_d_s::to_json(json_writer& j) const std::string dummy_d_s::max_num_tx_ports_per_res_opts::to_string() const { - static constexpr const char* options[] = {"p4", "p8", "p12", "p16", "p24", "p32"}; + static const char* options[] = {"p4", "p8", "p12", "p16", "p24", "p32"}; return convert_enum_idx(options, 6, value, "dummy_d_s::max_num_tx_ports_per_res_e_"); } uint8_t dummy_d_s::max_num_tx_ports_per_res_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 12, 16, 24, 32}; - return convert_enum_idx(options, 6, value, "dummy_d_s::max_num_tx_ports_per_res_e_"); + static const uint8_t options[] = {4, 8, 12, 16, 24, 32}; + return map_enum_number(options, 6, value, "dummy_d_s::max_num_tx_ports_per_res_e_"); } std::string dummy_d_s::amplitude_scaling_type_opts::to_string() const { - static constexpr const char* options[] = {"wideband", "widebandAndSubband"}; + static const char* options[] = {"wideband", "widebandAndSubband"}; return convert_enum_idx(options, 2, value, "dummy_d_s::amplitude_scaling_type_e_"); } @@ -46022,31 +46021,31 @@ void dummy_e_s::to_json(json_writer& j) const std::string dummy_e_s::max_num_tx_ports_per_res_opts::to_string() const { - static constexpr const char* options[] = {"p4", "p8", "p12", "p16", "p24", "p32"}; + static const char* options[] = {"p4", "p8", "p12", "p16", "p24", "p32"}; return convert_enum_idx(options, 6, value, "dummy_e_s::max_num_tx_ports_per_res_e_"); } uint8_t dummy_e_s::max_num_tx_ports_per_res_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 12, 16, 24, 32}; - return convert_enum_idx(options, 6, value, "dummy_e_s::max_num_tx_ports_per_res_e_"); + static const uint8_t options[] = {4, 8, 12, 16, 24, 32}; + return map_enum_number(options, 6, value, "dummy_e_s::max_num_tx_ports_per_res_e_"); } std::string dummy_e_s::amplitude_scaling_type_opts::to_string() const { - static constexpr const char* options[] = {"wideband", "widebandAndSubband"}; + static const char* options[] = {"wideband", "widebandAndSubband"}; return convert_enum_idx(options, 2, value, "dummy_e_s::amplitude_scaling_type_e_"); } // FreqSeparationClass ::= ENUMERATED std::string freq_separation_class_opts::to_string() const { - static constexpr const char* options[] = {"c1", "c2", "c3"}; + static const char* options[] = {"c1", "c2", "c3"}; return convert_enum_idx(options, 3, value, "freq_separation_class_e"); } uint8_t freq_separation_class_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx(options, 3, value, "freq_separation_class_e"); + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number(options, 3, value, "freq_separation_class_e"); } // FeatureSetDownlink ::= SEQUENCE @@ -46208,8 +46207,8 @@ void feature_set_dl_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("featureSetListPerDownlinkCC"); - for (uint32_t i1 = 0; i1 < feature_set_list_per_dl_cc.size(); ++i1) { - j.write_int(feature_set_list_per_dl_cc[i1]); + for (const auto& e1 : feature_set_list_per_dl_cc) { + j.write_int(e1); } j.end_array(); if (intra_band_freq_separation_dl_present) { @@ -46279,29 +46278,29 @@ void feature_set_dl_s::to_json(json_writer& j) const } if (dummy4_present) { j.start_array("dummy4"); - for (uint32_t i1 = 0; i1 < dummy4.size(); ++i1) { - dummy4[i1].to_json(j); + for (const auto& e1 : dummy4) { + e1.to_json(j); } j.end_array(); } if (dummy5_present) { j.start_array("dummy5"); - for (uint32_t i1 = 0; i1 < dummy5.size(); ++i1) { - dummy5[i1].to_json(j); + for (const auto& e1 : dummy5) { + e1.to_json(j); } j.end_array(); } if (dummy6_present) { j.start_array("dummy6"); - for (uint32_t i1 = 0; i1 < dummy6.size(); ++i1) { - dummy6[i1].to_json(j); + for (const auto& e1 : dummy6) { + e1.to_json(j); } j.end_array(); } if (dummy7_present) { j.start_array("dummy7"); - for (uint32_t i1 = 0; i1 < dummy7.size(); ++i1) { - dummy7[i1].to_json(j); + for (const auto& e1 : dummy7) { + e1.to_json(j); } j.end_array(); } @@ -46310,87 +46309,87 @@ void feature_set_dl_s::to_json(json_writer& j) const std::string feature_set_dl_s::scaling_factor_opts::to_string() const { - static constexpr const char* options[] = {"f0p4", "f0p75", "f0p8"}; + static const char* options[] = {"f0p4", "f0p75", "f0p8"}; return convert_enum_idx(options, 3, value, "feature_set_dl_s::scaling_factor_e_"); } std::string feature_set_dl_s::pdcch_monitoring_any_occasions_opts::to_string() const { - static constexpr const char* options[] = {"withoutDCI-Gap", "withDCI-Gap"}; + static const char* options[] = {"withoutDCI-Gap", "withDCI-Gap"}; return convert_enum_idx(options, 2, value, "feature_set_dl_s::pdcch_monitoring_any_occasions_e_"); } std::string feature_set_dl_s::time_dur_for_qcl_s_::scs_minus60k_hz_opts::to_string() const { - static constexpr const char* options[] = {"s7", "s14", "s28"}; + static const char* options[] = {"s7", "s14", "s28"}; return convert_enum_idx(options, 3, value, "feature_set_dl_s::time_dur_for_qcl_s_::scs_minus60k_hz_e_"); } uint8_t feature_set_dl_s::time_dur_for_qcl_s_::scs_minus60k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {7, 14, 28}; - return convert_enum_idx(options, 3, value, "feature_set_dl_s::time_dur_for_qcl_s_::scs_minus60k_hz_e_"); + static const uint8_t options[] = {7, 14, 28}; + return map_enum_number(options, 3, value, "feature_set_dl_s::time_dur_for_qcl_s_::scs_minus60k_hz_e_"); } std::string feature_set_dl_s::time_dur_for_qcl_s_::scs_minus120k_hz_opts::to_string() const { - static constexpr const char* options[] = {"s14", "s28"}; + static const char* options[] = {"s14", "s28"}; return convert_enum_idx(options, 2, value, "feature_set_dl_s::time_dur_for_qcl_s_::scs_minus120k_hz_e_"); } uint8_t feature_set_dl_s::time_dur_for_qcl_s_::scs_minus120k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {14, 28}; - return convert_enum_idx(options, 2, value, "feature_set_dl_s::time_dur_for_qcl_s_::scs_minus120k_hz_e_"); + static const uint8_t options[] = {14, 28}; + return map_enum_number(options, 2, value, "feature_set_dl_s::time_dur_for_qcl_s_::scs_minus120k_hz_e_"); } std::string feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus15k_hz_opts::to_string() const { - static constexpr const char* options[] = {"upto2", "upto4", "upto7"}; + static const char* options[] = {"upto2", "upto4", "upto7"}; return convert_enum_idx( options, 3, value, "feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus15k_hz_e_"); } uint8_t feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus15k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 7}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 7}; + return map_enum_number( options, 3, value, "feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus15k_hz_e_"); } std::string feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus30k_hz_opts::to_string() const { - static constexpr const char* options[] = {"upto2", "upto4", "upto7"}; + static const char* options[] = {"upto2", "upto4", "upto7"}; return convert_enum_idx( options, 3, value, "feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus30k_hz_e_"); } uint8_t feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus30k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 7}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 7}; + return map_enum_number( options, 3, value, "feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus30k_hz_e_"); } std::string feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus60k_hz_opts::to_string() const { - static constexpr const char* options[] = {"upto2", "upto4", "upto7"}; + static const char* options[] = {"upto2", "upto4", "upto7"}; return convert_enum_idx( options, 3, value, "feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus60k_hz_e_"); } uint8_t feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus60k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 7}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 7}; + return map_enum_number( options, 3, value, "feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus60k_hz_e_"); } std::string feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus120k_hz_opts::to_string() const { - static constexpr const char* options[] = {"upto2", "upto4", "upto7"}; + static const char* options[] = {"upto2", "upto4", "upto7"}; return convert_enum_idx( options, 3, value, "feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus120k_hz_e_"); } uint8_t feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus120k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 7}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 7}; + return map_enum_number( options, 3, value, "feature_set_dl_s::pdsch_processing_type1_different_tb_per_slot_s_::scs_minus120k_hz_e_"); } @@ -46473,17 +46472,15 @@ void processing_params_s::to_json(json_writer& j) const std::string processing_params_s::fallback_opts::to_string() const { - static constexpr const char* options[] = {"sc", "cap1-only"}; + static const char* options[] = {"sc", "cap1-only"}; return convert_enum_idx(options, 2, value, "processing_params_s::fallback_e_"); } uint8_t processing_params_s::fallback_opts::to_number() const { - switch (value) { - case cap1_only: - return 1; - default: - invalid_enum_number(value, "processing_params_s::fallback_e_"); + if (value == cap1_only) { + return 1; } + invalid_enum_number(value, "processing_params_s::fallback_e_"); return 0; } @@ -46656,49 +46653,49 @@ void feature_set_dl_v1540_s::to_json(json_writer& j) const std::string feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus15k_hz_opts::to_string() const { - static constexpr const char* options[] = {"set1", "set2", "set3"}; + static const char* options[] = {"set1", "set2", "set3"}; return convert_enum_idx( options, 3, value, "feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus15k_hz_e_"); } uint8_t feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus15k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number( options, 3, value, "feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus15k_hz_e_"); } std::string feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus30k_hz_opts::to_string() const { - static constexpr const char* options[] = {"set1", "set2", "set3"}; + static const char* options[] = {"set1", "set2", "set3"}; return convert_enum_idx( options, 3, value, "feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus30k_hz_e_"); } uint8_t feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus30k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number( options, 3, value, "feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus30k_hz_e_"); } std::string feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus60k_hz_opts::to_string() const { - static constexpr const char* options[] = {"set1", "set2", "set3"}; + static const char* options[] = {"set1", "set2", "set3"}; return convert_enum_idx( options, 3, value, "feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus60k_hz_e_"); } uint8_t feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus60k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number( options, 3, value, "feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus60k_hz_e_"); } std::string feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus120k_hz_opts::to_string() const { - static constexpr const char* options[] = {"set1", "set2", "set3"}; + static const char* options[] = {"set1", "set2", "set3"}; return convert_enum_idx( options, 3, @@ -46708,8 +46705,8 @@ feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_min uint8_t feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_minus120k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 3}; + return map_enum_number( options, 3, value, @@ -46719,7 +46716,7 @@ feature_set_dl_v1540_s::pdcch_monitoring_any_occasions_with_span_gap_s_::scs_min std::string feature_set_dl_v1540_s::pdsch_processing_type2_limited_s_::different_tb_per_slot_scs_minus30k_hz_opts::to_string() const { - static constexpr const char* options[] = {"upto1", "upto2", "upto4", "upto7"}; + static const char* options[] = {"upto1", "upto2", "upto4", "upto7"}; return convert_enum_idx( options, 4, @@ -46729,8 +46726,8 @@ feature_set_dl_v1540_s::pdsch_processing_type2_limited_s_::different_tb_per_slot uint8_t feature_set_dl_v1540_s::pdsch_processing_type2_limited_s_::different_tb_per_slot_scs_minus30k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 4, 7}; - return convert_enum_idx( + static const uint8_t options[] = {1, 2, 4, 7}; + return map_enum_number( options, 4, value, @@ -46740,7 +46737,7 @@ feature_set_dl_v1540_s::pdsch_processing_type2_limited_s_::different_tb_per_slot // ModulationOrder ::= ENUMERATED std::string mod_order_opts::to_string() const { - static constexpr const char* options[] = {"bpsk-halfpi", "bpsk", "qpsk", "qam16", "qam64", "qam256"}; + static const char* options[] = {"bpsk-halfpi", "bpsk", "qpsk", "qam16", "qam64", "qam256"}; return convert_enum_idx(options, 6, value, "mod_order_e"); } float mod_order_opts::to_number() const @@ -46761,7 +46758,7 @@ float mod_order_opts::to_number() const } std::string mod_order_opts::to_number_string() const { - static constexpr const char* options[] = {"0.5", "16", "64", "256"}; + static const char* options[] = {"0.5", "16", "64", "256"}; return convert_enum_idx(options, 6, value, "mod_order_e"); } @@ -46861,36 +46858,36 @@ SRSASN_CODE supported_bw_c::unpack(cbit_ref& bref) std::string supported_bw_c::fr1_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "mhz5", "mhz10", "mhz15", "mhz20", "mhz25", "mhz30", "mhz40", "mhz50", "mhz60", "mhz80", "mhz100"}; return convert_enum_idx(options, 11, value, "supported_bw_c::fr1_e_"); } uint8_t supported_bw_c::fr1_opts::to_number() const { - static constexpr uint8_t options[] = {5, 10, 15, 20, 25, 30, 40, 50, 60, 80, 100}; - return convert_enum_idx(options, 11, value, "supported_bw_c::fr1_e_"); + static const uint8_t options[] = {5, 10, 15, 20, 25, 30, 40, 50, 60, 80, 100}; + return map_enum_number(options, 11, value, "supported_bw_c::fr1_e_"); } std::string supported_bw_c::fr2_opts::to_string() const { - static constexpr const char* options[] = {"mhz50", "mhz100", "mhz200", "mhz400"}; + static const char* options[] = {"mhz50", "mhz100", "mhz200", "mhz400"}; return convert_enum_idx(options, 4, value, "supported_bw_c::fr2_e_"); } uint16_t supported_bw_c::fr2_opts::to_number() const { - static constexpr uint16_t options[] = {50, 100, 200, 400}; - return convert_enum_idx(options, 4, value, "supported_bw_c::fr2_e_"); + static const uint16_t options[] = {50, 100, 200, 400}; + return map_enum_number(options, 4, value, "supported_bw_c::fr2_e_"); } std::string supported_bw_c::types_opts::to_string() const { - static constexpr const char* options[] = {"fr1", "fr2"}; + static const char* options[] = {"fr1", "fr2"}; return convert_enum_idx(options, 2, value, "supported_bw_c::types"); } uint8_t supported_bw_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "supported_bw_c::types"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "supported_bw_c::types"); } // FeatureSetDownlinkPerCC ::= SEQUENCE @@ -47004,7 +47001,7 @@ void dummy_i_s::to_json(json_writer& j) const std::string dummy_i_s::supported_srs_tx_port_switch_opts::to_string() const { - static constexpr const char* options[] = {"t1r2", "t1r4", "t2r4", "t1r4-t2r4", "tr-equal"}; + static const char* options[] = {"t1r2", "t1r4", "t2r4", "t1r4-t2r4", "tr-equal"}; return convert_enum_idx(options, 5, value, "dummy_i_s::supported_srs_tx_port_switch_e_"); } @@ -47115,8 +47112,8 @@ void feature_set_ul_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("featureSetListPerUplinkCC"); - for (uint32_t i1 = 0; i1 < feature_set_list_per_ul_cc.size(); ++i1) { - j.write_int(feature_set_list_per_ul_cc[i1]); + for (const auto& e1 : feature_set_list_per_ul_cc) { + j.write_int(e1); } j.end_array(); if (scaling_factor_present) { @@ -47174,59 +47171,59 @@ void feature_set_ul_s::to_json(json_writer& j) const std::string feature_set_ul_s::scaling_factor_opts::to_string() const { - static constexpr const char* options[] = {"f0p4", "f0p75", "f0p8"}; + static const char* options[] = {"f0p4", "f0p75", "f0p8"}; return convert_enum_idx(options, 3, value, "feature_set_ul_s::scaling_factor_e_"); } std::string feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus15k_hz_opts::to_string() const { - static constexpr const char* options[] = {"upto2", "upto4", "upto7"}; + static const char* options[] = {"upto2", "upto4", "upto7"}; return convert_enum_idx( options, 3, value, "feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus15k_hz_e_"); } uint8_t feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus15k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 7}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 7}; + return map_enum_number( options, 3, value, "feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus15k_hz_e_"); } std::string feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus30k_hz_opts::to_string() const { - static constexpr const char* options[] = {"upto2", "upto4", "upto7"}; + static const char* options[] = {"upto2", "upto4", "upto7"}; return convert_enum_idx( options, 3, value, "feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus30k_hz_e_"); } uint8_t feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus30k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 7}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 7}; + return map_enum_number( options, 3, value, "feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus30k_hz_e_"); } std::string feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus60k_hz_opts::to_string() const { - static constexpr const char* options[] = {"upto2", "upto4", "upto7"}; + static const char* options[] = {"upto2", "upto4", "upto7"}; return convert_enum_idx( options, 3, value, "feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus60k_hz_e_"); } uint8_t feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus60k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 7}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 7}; + return map_enum_number( options, 3, value, "feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus60k_hz_e_"); } std::string feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus120k_hz_opts::to_string() const { - static constexpr const char* options[] = {"upto2", "upto4", "upto7"}; + static const char* options[] = {"upto2", "upto4", "upto7"}; return convert_enum_idx( options, 3, value, "feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus120k_hz_e_"); } uint8_t feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus120k_hz_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 7}; - return convert_enum_idx( + static const uint8_t options[] = {2, 4, 7}; + return map_enum_number( options, 3, value, "feature_set_ul_s::pusch_processing_type1_different_tb_per_slot_s_::scs_minus120k_hz_e_"); } @@ -47533,51 +47530,51 @@ void feature_sets_s::to_json(json_writer& j) const j.start_obj(); if (feature_sets_dl_present) { j.start_array("featureSetsDownlink"); - for (uint32_t i1 = 0; i1 < feature_sets_dl.size(); ++i1) { - feature_sets_dl[i1].to_json(j); + for (const auto& e1 : feature_sets_dl) { + e1.to_json(j); } j.end_array(); } if (feature_sets_dl_per_cc_present) { j.start_array("featureSetsDownlinkPerCC"); - for (uint32_t i1 = 0; i1 < feature_sets_dl_per_cc.size(); ++i1) { - feature_sets_dl_per_cc[i1].to_json(j); + for (const auto& e1 : feature_sets_dl_per_cc) { + e1.to_json(j); } j.end_array(); } if (feature_sets_ul_present) { j.start_array("featureSetsUplink"); - for (uint32_t i1 = 0; i1 < feature_sets_ul.size(); ++i1) { - feature_sets_ul[i1].to_json(j); + for (const auto& e1 : feature_sets_ul) { + e1.to_json(j); } j.end_array(); } if (feature_sets_ul_per_cc_present) { j.start_array("featureSetsUplinkPerCC"); - for (uint32_t i1 = 0; i1 < feature_sets_ul_per_cc.size(); ++i1) { - feature_sets_ul_per_cc[i1].to_json(j); + for (const auto& e1 : feature_sets_ul_per_cc) { + e1.to_json(j); } j.end_array(); } if (ext) { if (feature_sets_dl_v1540.is_present()) { j.start_array("featureSetsDownlink-v1540"); - for (uint32_t i1 = 0; i1 < feature_sets_dl_v1540->size(); ++i1) { - ((*feature_sets_dl_v1540)[i1]).to_json(j); + for (const auto& e1 : *feature_sets_dl_v1540) { + e1.to_json(j); } j.end_array(); } if (feature_sets_ul_v1540.is_present()) { j.start_array("featureSetsUplink-v1540"); - for (uint32_t i1 = 0; i1 < feature_sets_ul_v1540->size(); ++i1) { - ((*feature_sets_ul_v1540)[i1]).to_json(j); + for (const auto& e1 : *feature_sets_ul_v1540) { + e1.to_json(j); } j.end_array(); } if (feature_sets_ul_per_cc_v1540.is_present()) { j.start_array("featureSetsUplinkPerCC-v1540"); - for (uint32_t i1 = 0; i1 < feature_sets_ul_per_cc_v1540->size(); ++i1) { - ((*feature_sets_ul_per_cc_v1540)[i1]).to_json(j); + for (const auto& e1 : *feature_sets_ul_per_cc_v1540) { + e1.to_json(j); } j.end_array(); } @@ -47588,28 +47585,28 @@ void feature_sets_s::to_json(json_writer& j) const // AggregatedBandwidth ::= ENUMERATED std::string aggregated_bw_opts::to_string() const { - static constexpr const char* options[] = {"mhz50", - "mhz100", - "mhz150", - "mhz200", - "mhz250", - "mhz300", - "mhz350", - "mhz400", - "mhz450", - "mhz500", - "mhz550", - "mhz600", - "mhz650", - "mhz700", - "mhz750", - "mhz800"}; + static const char* options[] = {"mhz50", + "mhz100", + "mhz150", + "mhz200", + "mhz250", + "mhz300", + "mhz350", + "mhz400", + "mhz450", + "mhz500", + "mhz550", + "mhz600", + "mhz650", + "mhz700", + "mhz750", + "mhz800"}; return convert_enum_idx(options, 16, value, "aggregated_bw_e"); } uint16_t aggregated_bw_opts::to_number() const { - static constexpr uint16_t options[] = {50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800}; - return convert_enum_idx(options, 16, value, "aggregated_bw_e"); + static const uint16_t options[] = {50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800}; + return map_enum_number(options, 16, value, "aggregated_bw_e"); } // FreqBandInformationEUTRA ::= SEQUENCE @@ -47844,7 +47841,7 @@ SRSASN_CODE freq_band_info_c::unpack(cbit_ref& bref) std::string freq_band_info_c::types_opts::to_string() const { - static constexpr const char* options[] = {"bandInformationEUTRA", "bandInformationNR"}; + static const char* options[] = {"bandInformationEUTRA", "bandInformationNR"}; return convert_enum_idx(options, 2, value, "freq_band_info_c::types"); } @@ -48272,13 +48269,13 @@ void meas_and_mob_params_common_s::to_json(json_writer& j) const std::string meas_and_mob_params_common_s::max_num_csi_rs_rrm_rs_sinr_opts::to_string() const { - static constexpr const char* options[] = {"n4", "n8", "n16", "n32", "n64", "n96"}; + static const char* options[] = {"n4", "n8", "n16", "n32", "n64", "n96"}; return convert_enum_idx(options, 6, value, "meas_and_mob_params_common_s::max_num_csi_rs_rrm_rs_sinr_e_"); } uint8_t meas_and_mob_params_common_s::max_num_csi_rs_rrm_rs_sinr_opts::to_number() const { - static constexpr uint8_t options[] = {4, 8, 16, 32, 64, 96}; - return convert_enum_idx(options, 6, value, "meas_and_mob_params_common_s::max_num_csi_rs_rrm_rs_sinr_e_"); + static const uint8_t options[] = {4, 8, 16, 32, 64, 96}; + return map_enum_number(options, 6, value, "meas_and_mob_params_common_s::max_num_csi_rs_rrm_rs_sinr_e_"); } // MeasAndMobParametersFRX-Diff ::= SEQUENCE @@ -48399,13 +48396,13 @@ void meas_and_mob_params_frx_diff_s::to_json(json_writer& j) const std::string meas_and_mob_params_frx_diff_s::max_num_res_csi_rs_rlm_opts::to_string() const { - static constexpr const char* options[] = {"n2", "n4", "n6", "n8"}; + static const char* options[] = {"n2", "n4", "n6", "n8"}; return convert_enum_idx(options, 4, value, "meas_and_mob_params_frx_diff_s::max_num_res_csi_rs_rlm_e_"); } uint8_t meas_and_mob_params_frx_diff_s::max_num_res_csi_rs_rlm_opts::to_number() const { - static constexpr uint8_t options[] = {2, 4, 6, 8}; - return convert_enum_idx(options, 4, value, "meas_and_mob_params_frx_diff_s::max_num_res_csi_rs_rlm_e_"); + static const uint8_t options[] = {2, 4, 6, 8}; + return map_enum_number(options, 4, value, "meas_and_mob_params_frx_diff_s::max_num_res_csi_rs_rlm_e_"); } // MeasAndMobParametersXDD-Diff ::= SEQUENCE @@ -48718,8 +48715,8 @@ void meas_result2_nr_s::to_json(json_writer& j) const } if (meas_result_neigh_cell_list_nr_present) { j.start_array("measResultNeighCellListNR"); - for (uint32_t i1 = 0; i1 < meas_result_neigh_cell_list_nr.size(); ++i1) { - meas_result_neigh_cell_list_nr[i1].to_json(j); + for (const auto& e1 : meas_result_neigh_cell_list_nr) { + e1.to_json(j); } j.end_array(); } @@ -48784,8 +48781,8 @@ void meas_result_scg_fail_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("measResultPerMOList"); - for (uint32_t i1 = 0; i1 < meas_result_per_mo_list.size(); ++i1) { - meas_result_per_mo_list[i1].to_json(j); + for (const auto& e1 : meas_result_per_mo_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -49042,13 +49039,13 @@ void phy_params_common_s::to_json(json_writer& j) const std::string phy_params_common_s::bwp_switching_delay_opts::to_string() const { - static constexpr const char* options[] = {"type1", "type2"}; + static const char* options[] = {"type1", "type2"}; return convert_enum_idx(options, 2, value, "phy_params_common_s::bwp_switching_delay_e_"); } uint8_t phy_params_common_s::bwp_switching_delay_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "phy_params_common_s::bwp_switching_delay_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "phy_params_common_s::bwp_switching_delay_e_"); } // Phy-ParametersFR1 ::= SEQUENCE @@ -49132,39 +49129,39 @@ void phy_params_fr1_s::to_json(json_writer& j) const std::string phy_params_fr1_s::pdsch_re_map_fr1_per_symbol_opts::to_string() const { - static constexpr const char* options[] = {"n10", "n20"}; + static const char* options[] = {"n10", "n20"}; return convert_enum_idx(options, 2, value, "phy_params_fr1_s::pdsch_re_map_fr1_per_symbol_e_"); } uint8_t phy_params_fr1_s::pdsch_re_map_fr1_per_symbol_opts::to_number() const { - static constexpr uint8_t options[] = {10, 20}; - return convert_enum_idx(options, 2, value, "phy_params_fr1_s::pdsch_re_map_fr1_per_symbol_e_"); + static const uint8_t options[] = {10, 20}; + return map_enum_number(options, 2, value, "phy_params_fr1_s::pdsch_re_map_fr1_per_symbol_e_"); } std::string phy_params_fr1_s::pdsch_re_map_fr1_per_slot_opts::to_string() const { - static constexpr const char* options[] = {"n16", - "n32", - "n48", - "n64", - "n80", - "n96", - "n112", - "n128", - "n144", - "n160", - "n176", - "n192", - "n208", - "n224", - "n240", - "n256"}; + static const char* options[] = {"n16", + "n32", + "n48", + "n64", + "n80", + "n96", + "n112", + "n128", + "n144", + "n160", + "n176", + "n192", + "n208", + "n224", + "n240", + "n256"}; return convert_enum_idx(options, 16, value, "phy_params_fr1_s::pdsch_re_map_fr1_per_slot_e_"); } uint16_t phy_params_fr1_s::pdsch_re_map_fr1_per_slot_opts::to_number() const { - static constexpr uint16_t options[] = {16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256}; - return convert_enum_idx(options, 16, value, "phy_params_fr1_s::pdsch_re_map_fr1_per_slot_e_"); + static const uint16_t options[] = {16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256}; + return map_enum_number(options, 16, value, "phy_params_fr1_s::pdsch_re_map_fr1_per_slot_e_"); } // Phy-ParametersFR2 ::= SEQUENCE @@ -49244,39 +49241,39 @@ void phy_params_fr2_s::to_json(json_writer& j) const std::string phy_params_fr2_s::pdsch_re_map_fr2_per_symbol_opts::to_string() const { - static constexpr const char* options[] = {"n6", "n20"}; + static const char* options[] = {"n6", "n20"}; return convert_enum_idx(options, 2, value, "phy_params_fr2_s::pdsch_re_map_fr2_per_symbol_e_"); } uint8_t phy_params_fr2_s::pdsch_re_map_fr2_per_symbol_opts::to_number() const { - static constexpr uint8_t options[] = {6, 20}; - return convert_enum_idx(options, 2, value, "phy_params_fr2_s::pdsch_re_map_fr2_per_symbol_e_"); + static const uint8_t options[] = {6, 20}; + return map_enum_number(options, 2, value, "phy_params_fr2_s::pdsch_re_map_fr2_per_symbol_e_"); } std::string phy_params_fr2_s::pdsch_re_map_fr2_per_slot_opts::to_string() const { - static constexpr const char* options[] = {"n16", - "n32", - "n48", - "n64", - "n80", - "n96", - "n112", - "n128", - "n144", - "n160", - "n176", - "n192", - "n208", - "n224", - "n240", - "n256"}; + static const char* options[] = {"n16", + "n32", + "n48", + "n64", + "n80", + "n96", + "n112", + "n128", + "n144", + "n160", + "n176", + "n192", + "n208", + "n224", + "n240", + "n256"}; return convert_enum_idx(options, 16, value, "phy_params_fr2_s::pdsch_re_map_fr2_per_slot_e_"); } uint16_t phy_params_fr2_s::pdsch_re_map_fr2_per_slot_opts::to_number() const { - static constexpr uint16_t options[] = {16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256}; - return convert_enum_idx(options, 16, value, "phy_params_fr2_s::pdsch_re_map_fr2_per_slot_e_"); + static const uint16_t options[] = {16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256}; + return map_enum_number(options, 16, value, "phy_params_fr2_s::pdsch_re_map_fr2_per_slot_e_"); } // Phy-ParametersFRX-Diff ::= SEQUENCE @@ -49690,13 +49687,13 @@ void phy_params_frx_diff_s::to_json(json_writer& j) const std::string phy_params_frx_diff_s::supported_dmrs_type_dl_opts::to_string() const { - static constexpr const char* options[] = {"type1", "type1And2"}; + static const char* options[] = {"type1", "type1And2"}; return convert_enum_idx(options, 2, value, "phy_params_frx_diff_s::supported_dmrs_type_dl_e_"); } std::string phy_params_frx_diff_s::supported_dmrs_type_ul_opts::to_string() const { - static constexpr const char* options[] = {"type1", "type1And2"}; + static const char* options[] = {"type1", "type1And2"}; return convert_enum_idx(options, 2, value, "phy_params_frx_diff_s::supported_dmrs_type_ul_e_"); } @@ -49883,28 +49880,28 @@ void naics_cap_entry_s::to_json(json_writer& j) const std::string naics_cap_entry_s::nof_aggregated_prb_opts::to_string() const { - static constexpr const char* options[] = {"n50", - "n75", - "n100", - "n125", - "n150", - "n175", - "n200", - "n225", - "n250", - "n275", - "n300", - "n350", - "n400", - "n450", - "n500", - "spare"}; + static const char* options[] = {"n50", + "n75", + "n100", + "n125", + "n150", + "n175", + "n200", + "n225", + "n250", + "n275", + "n300", + "n350", + "n400", + "n450", + "n500", + "spare"}; return convert_enum_idx(options, 16, value, "naics_cap_entry_s::nof_aggregated_prb_e_"); } uint16_t naics_cap_entry_s::nof_aggregated_prb_opts::to_number() const { - static constexpr uint16_t options[] = {50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 350, 400, 450, 500}; - return convert_enum_idx(options, 15, value, "naics_cap_entry_s::nof_aggregated_prb_e_"); + static const uint16_t options[] = {50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 350, 400, 450, 500}; + return map_enum_number(options, 15, value, "naics_cap_entry_s::nof_aggregated_prb_e_"); } // Phy-ParametersMRDC ::= SEQUENCE @@ -49935,8 +49932,8 @@ void phy_params_mrdc_s::to_json(json_writer& j) const j.start_obj(); if (naics_cap_list_present) { j.start_array("naics-Capability-List"); - for (uint32_t i1 = 0; i1 < naics_cap_list.size(); ++i1) { - naics_cap_list[i1].to_json(j); + for (const auto& e1 : naics_cap_list) { + e1.to_json(j); } j.end_array(); } @@ -50031,29 +50028,29 @@ void rf_params_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("supportedBandListNR"); - for (uint32_t i1 = 0; i1 < supported_band_list_nr.size(); ++i1) { - supported_band_list_nr[i1].to_json(j); + for (const auto& e1 : supported_band_list_nr) { + e1.to_json(j); } j.end_array(); if (supported_band_combination_list_present) { j.start_array("supportedBandCombinationList"); - for (uint32_t i1 = 0; i1 < supported_band_combination_list.size(); ++i1) { - supported_band_combination_list[i1].to_json(j); + for (const auto& e1 : supported_band_combination_list) { + e1.to_json(j); } j.end_array(); } if (applied_freq_band_list_filt_present) { j.start_array("appliedFreqBandListFilter"); - for (uint32_t i1 = 0; i1 < applied_freq_band_list_filt.size(); ++i1) { - applied_freq_band_list_filt[i1].to_json(j); + for (const auto& e1 : applied_freq_band_list_filt) { + e1.to_json(j); } j.end_array(); } if (ext) { if (supported_band_combination_list_v1540.is_present()) { j.start_array("supportedBandCombinationList-v1540"); - for (uint32_t i1 = 0; i1 < supported_band_combination_list_v1540->size(); ++i1) { - ((*supported_band_combination_list_v1540)[i1]).to_json(j); + for (const auto& e1 : *supported_band_combination_list_v1540) { + e1.to_json(j); } j.end_array(); } @@ -50062,8 +50059,8 @@ void rf_params_s::to_json(json_writer& j) const } if (supported_band_combination_list_v1550.is_present()) { j.start_array("supportedBandCombinationList-v1550"); - for (uint32_t i1 = 0; i1 < supported_band_combination_list_v1550->size(); ++i1) { - ((*supported_band_combination_list_v1550)[i1]).to_json(j); + for (const auto& e1 : *supported_band_combination_list_v1550) { + e1.to_json(j); } j.end_array(); } @@ -50158,15 +50155,15 @@ void rf_params_mrdc_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_combination_list_present) { j.start_array("supportedBandCombinationList"); - for (uint32_t i1 = 0; i1 < supported_band_combination_list.size(); ++i1) { - supported_band_combination_list[i1].to_json(j); + for (const auto& e1 : supported_band_combination_list) { + e1.to_json(j); } j.end_array(); } if (applied_freq_band_list_filt_present) { j.start_array("appliedFreqBandListFilter"); - for (uint32_t i1 = 0; i1 < applied_freq_band_list_filt.size(); ++i1) { - applied_freq_band_list_filt[i1].to_json(j); + for (const auto& e1 : applied_freq_band_list_filt) { + e1.to_json(j); } j.end_array(); } @@ -50176,15 +50173,15 @@ void rf_params_mrdc_s::to_json(json_writer& j) const } if (supported_band_combination_list_v1540.is_present()) { j.start_array("supportedBandCombinationList-v1540"); - for (uint32_t i1 = 0; i1 < supported_band_combination_list_v1540->size(); ++i1) { - ((*supported_band_combination_list_v1540)[i1]).to_json(j); + for (const auto& e1 : *supported_band_combination_list_v1540) { + e1.to_json(j); } j.end_array(); } if (supported_band_combination_list_v1550.is_present()) { j.start_array("supportedBandCombinationList-v1550"); - for (uint32_t i1 = 0; i1 < supported_band_combination_list_v1550->size(); ++i1) { - ((*supported_band_combination_list_v1550)[i1]).to_json(j); + for (const auto& e1 : *supported_band_combination_list_v1550) { + e1.to_json(j); } j.end_array(); } @@ -50255,8 +50252,8 @@ void ue_cap_request_filt_nr_s::to_json(json_writer& j) const j.start_obj(); if (freq_band_list_filt_present) { j.start_array("frequencyBandListFilter"); - for (uint32_t i1 = 0; i1 < freq_band_list_filt.size(); ++i1) { - freq_band_list_filt[i1].to_json(j); + for (const auto& e1 : freq_band_list_filt) { + e1.to_json(j); } j.end_array(); } @@ -50537,12 +50534,12 @@ void ue_mrdc_cap_s::to_json(json_writer& j) const } if (feature_set_combinations_present) { j.start_array("featureSetCombinations"); - for (uint32_t i1 = 0; i1 < feature_set_combinations.size(); ++i1) { + for (const auto& e1 : feature_set_combinations) { j.start_array(); - for (uint32_t i2 = 0; i2 < feature_set_combinations[i1].size(); ++i2) { + for (const auto& e2 : e1) { j.start_array(); - for (uint32_t i3 = 0; i3 < feature_set_combinations[i1][i2].size(); ++i3) { - feature_set_combinations[i1][i2][i3].to_json(j); + for (const auto& e3 : e2) { + e3.to_json(j); } j.end_array(); } @@ -50812,14 +50809,13 @@ void ue_nr_cap_add_xdd_mode_v1530_s::to_json(json_writer& j) const // AccessStratumRelease ::= ENUMERATED std::string access_stratum_release_opts::to_string() const { - static constexpr const char* options[] = { - "rel15", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"rel15", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "access_stratum_release_e"); } uint8_t access_stratum_release_opts::to_number() const { - static constexpr uint8_t options[] = {15}; - return convert_enum_idx(options, 1, value, "access_stratum_release_e"); + static const uint8_t options[] = {15}; + return map_enum_number(options, 1, value, "access_stratum_release_e"); } // PDCP-Parameters ::= SEQUENCE @@ -50911,28 +50907,28 @@ void pdcp_params_s::to_json(json_writer& j) const std::string pdcp_params_s::max_num_rohc_context_sessions_opts::to_string() const { - static constexpr const char* options[] = {"cs2", - "cs4", - "cs8", - "cs12", - "cs16", - "cs24", - "cs32", - "cs48", - "cs64", - "cs128", - "cs256", - "cs512", - "cs1024", - "cs16384", - "spare2", - "spare1"}; + static const char* options[] = {"cs2", + "cs4", + "cs8", + "cs12", + "cs16", + "cs24", + "cs32", + "cs48", + "cs64", + "cs128", + "cs256", + "cs512", + "cs1024", + "cs16384", + "spare2", + "spare1"}; return convert_enum_idx(options, 16, value, "pdcp_params_s::max_num_rohc_context_sessions_e_"); } uint16_t pdcp_params_s::max_num_rohc_context_sessions_opts::to_number() const { - static constexpr uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 48, 64, 128, 256, 512, 1024, 16384}; - return convert_enum_idx(options, 14, value, "pdcp_params_s::max_num_rohc_context_sessions_e_"); + static const uint16_t options[] = {2, 4, 8, 12, 16, 24, 32, 48, 64, 128, 256, 512, 1024, 16384}; + return map_enum_number(options, 14, value, "pdcp_params_s::max_num_rohc_context_sessions_e_"); } // RLC-Parameters ::= SEQUENCE @@ -51267,12 +51263,12 @@ void ue_nr_cap_s::to_json(json_writer& j) const } if (feature_set_combinations_present) { j.start_array("featureSetCombinations"); - for (uint32_t i1 = 0; i1 < feature_set_combinations.size(); ++i1) { + for (const auto& e1 : feature_set_combinations) { j.start_array(); - for (uint32_t i2 = 0; i2 < feature_set_combinations[i1].size(); ++i2) { + for (const auto& e2 : e1) { j.start_array(); - for (uint32_t i3 = 0; i3 < feature_set_combinations[i1][i2].size(); ++i3) { - feature_set_combinations[i1][i2][i3].to_json(j); + for (const auto& e3 : e2) { + e3.to_json(j); } j.end_array(); } @@ -51332,8 +51328,8 @@ void band_combination_info_s::to_json(json_writer& j) const j.start_obj(); j.write_int("bandCombinationIndex", band_combination_idx); j.start_array("allowedFeatureSetsList"); - for (uint32_t i1 = 0; i1 < allowed_feature_sets_list.size(); ++i1) { - j.write_int(allowed_feature_sets_list[i1]); + for (const auto& e1 : allowed_feature_sets_list) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -51449,8 +51445,8 @@ void cfg_restrict_info_scg_s::to_json(json_writer& j) const j.start_obj(); if (allowed_bc_list_mrdc_present) { j.start_array("allowedBC-ListMRDC"); - for (uint32_t i1 = 0; i1 < allowed_bc_list_mrdc.size(); ++i1) { - allowed_bc_list_mrdc[i1].to_json(j); + for (const auto& e1 : allowed_bc_list_mrdc) { + e1.to_json(j); } j.end_array(); } @@ -51516,8 +51512,8 @@ void reest_info_s::to_json(json_writer& j) const j.write_str("targetCellShortMAC-I", target_cell_short_mac_i.to_string()); if (add_reestab_info_list_present) { j.start_array("additionalReestabInfoList"); - for (uint32_t i1 = 0; i1 < add_reestab_info_list.size(); ++i1) { - add_reestab_info_list[i1].to_json(j); + for (const auto& e1 : add_reestab_info_list) { + e1.to_json(j); } j.end_array(); } @@ -51731,14 +51727,14 @@ void affected_carrier_freq_comb_info_mrdc_s::to_json(json_writer& j) const j.start_obj(); if (affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra_present) { j.start_array("affectedCarrierFreqCombEUTRA"); - for (uint32_t i1 = 0; i1 < affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra.size(); ++i1) { - j.write_int(affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra[i1]); + for (const auto& e1 : affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra) { + j.write_int(e1); } j.end_array(); } j.start_array("affectedCarrierFreqCombNR"); - for (uint32_t i1 = 0; i1 < affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_nr.size(); ++i1) { - j.write_int(affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_nr[i1]); + for (const auto& e1 : affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_nr) { + j.write_int(e1); } j.end_array(); j.end_obj(); @@ -51748,8 +51744,7 @@ void affected_carrier_freq_comb_info_mrdc_s::to_json(json_writer& j) const std::string affected_carrier_freq_comb_info_mrdc_s::interference_direction_mrdc_opts::to_string() const { - static constexpr const char* options[] = { - "eutra-nr", "nr", "other", "utra-nr-other", "nr-other", "spare3", "spare2", "spare1"}; + static const char* options[] = {"eutra-nr", "nr", "other", "utra-nr-other", "nr-other", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "affected_carrier_freq_comb_info_mrdc_s::interference_direction_mrdc_e_"); } @@ -51800,13 +51795,13 @@ void ph_ul_carrier_scg_s::to_json(json_writer& j) const std::string ph_ul_carrier_scg_s::ph_type1or3_opts::to_string() const { - static constexpr const char* options[] = {"type1", "type3"}; + static const char* options[] = {"type1", "type3"}; return convert_enum_idx(options, 2, value, "ph_ul_carrier_scg_s::ph_type1or3_e_"); } uint8_t ph_ul_carrier_scg_s::ph_type1or3_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3}; - return convert_enum_idx(options, 2, value, "ph_ul_carrier_scg_s::ph_type1or3_e_"); + static const uint8_t options[] = {1, 3}; + return map_enum_number(options, 2, value, "ph_ul_carrier_scg_s::ph_type1or3_e_"); } // PH-InfoSCG ::= SEQUENCE @@ -51874,13 +51869,13 @@ void fr_info_s::to_json(json_writer& j) const std::string fr_info_s::fr_type_opts::to_string() const { - static constexpr const char* options[] = {"fr1", "fr2"}; + static const char* options[] = {"fr1", "fr2"}; return convert_enum_idx(options, 2, value, "fr_info_s::fr_type_e_"); } uint8_t fr_info_s::fr_type_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2}; - return convert_enum_idx(options, 2, value, "fr_info_s::fr_type_e_"); + static const uint8_t options[] = {1, 2}; + return map_enum_number(options, 2, value, "fr_info_s::fr_type_e_"); } // NR-FreqInfo ::= SEQUENCE @@ -51986,8 +51981,8 @@ void cg_cfg_v1540_ies_s::to_json(json_writer& j) const } if (ph_info_scg_present) { j.start_array("ph-InfoSCG"); - for (uint32_t i1 = 0; i1 < ph_info_scg.size(); ++i1) { - ph_info_scg[i1].to_json(j); + for (const auto& e1 : ph_info_scg) { + e1.to_json(j); } j.end_array(); } @@ -52450,31 +52445,31 @@ SRSASN_CODE drx_info_s::drx_long_cycle_start_offset_c_::unpack(cbit_ref& bref) std::string drx_info_s::drx_long_cycle_start_offset_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", - "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", - "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; + static const char* options[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", + "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", + "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; return convert_enum_idx(options, 20, value, "drx_info_s::drx_long_cycle_start_offset_c_::types"); } uint16_t drx_info_s::drx_long_cycle_start_offset_c_::types_opts::to_number() const { - static constexpr uint16_t options[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, - 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; - return convert_enum_idx(options, 20, value, "drx_info_s::drx_long_cycle_start_offset_c_::types"); + static const uint16_t options[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, + 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; + return map_enum_number(options, 20, value, "drx_info_s::drx_long_cycle_start_offset_c_::types"); } std::string drx_info_s::short_drx_s_::drx_short_cycle_opts::to_string() const { - static constexpr const char* options[] = { - "ms2", "ms3", "ms4", "ms5", "ms6", "ms7", "ms8", "ms10", "ms14", "ms16", "ms20", - "ms30", "ms32", "ms35", "ms40", "ms64", "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", - "ms640", "spare9", "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + static const char* options[] = {"ms2", "ms3", "ms4", "ms5", "ms6", "ms7", "ms8", "ms10", + "ms14", "ms16", "ms20", "ms30", "ms32", "ms35", "ms40", "ms64", + "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", "spare9", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 32, value, "drx_info_s::short_drx_s_::drx_short_cycle_e_"); } uint16_t drx_info_s::short_drx_s_::drx_short_cycle_opts::to_number() const { - static constexpr uint16_t options[] = {2, 3, 4, 5, 6, 7, 8, 10, 14, 16, 20, 30, - 32, 35, 40, 64, 80, 128, 160, 256, 320, 512, 640}; - return convert_enum_idx(options, 23, value, "drx_info_s::short_drx_s_::drx_short_cycle_e_"); + static const uint16_t options[] = {2, 3, 4, 5, 6, 7, 8, 10, 14, 16, 20, 30, + 32, 35, 40, 64, 80, 128, 160, 256, 320, 512, 640}; + return map_enum_number(options, 23, value, "drx_info_s::short_drx_s_::drx_short_cycle_e_"); } // MeasConfigSN ::= SEQUENCE @@ -52505,8 +52500,8 @@ void meas_cfg_sn_s::to_json(json_writer& j) const j.start_obj(); if (measured_frequencies_sn_present) { j.start_array("measuredFrequenciesSN"); - for (uint32_t i1 = 0; i1 < measured_frequencies_sn.size(); ++i1) { - measured_frequencies_sn[i1].to_json(j); + for (const auto& e1 : measured_frequencies_sn) { + e1.to_json(j); } j.end_array(); } @@ -52636,15 +52631,15 @@ void cg_cfg_ies_s::to_json(json_writer& j) const } if (fr_info_list_scg_present) { j.start_array("fr-InfoListSCG"); - for (uint32_t i1 = 0; i1 < fr_info_list_scg.size(); ++i1) { - fr_info_list_scg[i1].to_json(j); + for (const auto& e1 : fr_info_list_scg) { + e1.to_json(j); } j.end_array(); } if (candidate_serving_freq_list_nr_present) { j.start_array("candidateServingFreqListNR"); - for (uint32_t i1 = 0; i1 < candidate_serving_freq_list_nr.size(); ++i1) { - j.write_int(candidate_serving_freq_list_nr[i1]); + for (const auto& e1 : candidate_serving_freq_list_nr) { + j.write_int(e1); } j.end_array(); } @@ -52851,19 +52846,19 @@ SRSASN_CODE cg_cfg_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) std::string cg_cfg_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"cg-Config", "spare3", "spare2", "spare1"}; + static const char* options[] = {"cg-Config", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "cg_cfg_s::crit_exts_c_::c1_c_::types"); } std::string cg_cfg_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "criticalExtensionsFuture"}; + static const char* options[] = {"c1", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "cg_cfg_s::crit_exts_c_::types"); } uint8_t cg_cfg_s::crit_exts_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "cg_cfg_s::crit_exts_c_::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "cg_cfg_s::crit_exts_c_::types"); } // PH-UplinkCarrierMCG ::= SEQUENCE @@ -52890,13 +52885,13 @@ void ph_ul_carrier_mcg_s::to_json(json_writer& j) const std::string ph_ul_carrier_mcg_s::ph_type1or3_opts::to_string() const { - static constexpr const char* options[] = {"type1", "type3"}; + static const char* options[] = {"type1", "type3"}; return convert_enum_idx(options, 2, value, "ph_ul_carrier_mcg_s::ph_type1or3_e_"); } uint8_t ph_ul_carrier_mcg_s::ph_type1or3_opts::to_number() const { - static constexpr uint8_t options[] = {1, 3}; - return convert_enum_idx(options, 2, value, "ph_ul_carrier_mcg_s::ph_type1or3_e_"); + static const uint8_t options[] = {1, 3}; + return map_enum_number(options, 2, value, "ph_ul_carrier_mcg_s::ph_type1or3_e_"); } // PH-InfoMCG ::= SEQUENCE @@ -52980,8 +52975,8 @@ void cg_cfg_info_v1540_ies_s::to_json(json_writer& j) const j.start_obj(); if (ph_info_mcg_present) { j.start_array("ph-InfoMCG"); - for (uint32_t i1 = 0; i1 < ph_info_mcg.size(); ++i1) { - ph_info_mcg[i1].to_json(j); + for (const auto& e1 : ph_info_mcg) { + e1.to_json(j); } j.end_array(); } @@ -53021,8 +53016,8 @@ void mrdc_assist_info_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("affectedCarrierFreqCombInfoListMRDC"); - for (uint32_t i1 = 0; i1 < affected_carrier_freq_comb_info_list_mrdc.size(); ++i1) { - affected_carrier_freq_comb_info_list_mrdc[i1].to_json(j); + for (const auto& e1 : affected_carrier_freq_comb_info_list_mrdc) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -53072,8 +53067,8 @@ void meas_cfg_mn_s::to_json(json_writer& j) const j.start_obj(); if (measured_frequencies_mn_present) { j.start_array("measuredFrequenciesMN"); - for (uint32_t i1 = 0; i1 < measured_frequencies_mn.size(); ++i1) { - measured_frequencies_mn[i1].to_json(j); + for (const auto& e1 : measured_frequencies_mn) { + e1.to_json(j); } j.end_array(); } @@ -53089,17 +53084,15 @@ void meas_cfg_mn_s::to_json(json_writer& j) const std::string meas_cfg_mn_s::gap_purpose_opts::to_string() const { - static constexpr const char* options[] = {"perUE", "perFR1"}; + static const char* options[] = {"perUE", "perFR1"}; return convert_enum_idx(options, 2, value, "meas_cfg_mn_s::gap_purpose_e_"); } uint8_t meas_cfg_mn_s::gap_purpose_opts::to_number() const { - switch (value) { - case per_fr1: - return 1; - default: - invalid_enum_number(value, "meas_cfg_mn_s::gap_purpose_e_"); + if (value == per_fr1) { + return 1; } + invalid_enum_number(value, "meas_cfg_mn_s::gap_purpose_e_"); return 0; } @@ -53230,8 +53223,8 @@ void cg_cfg_info_ies_s::to_json(json_writer& j) const } if (candidate_cell_info_list_mn_present) { j.start_array("candidateCellInfoListMN"); - for (uint32_t i1 = 0; i1 < candidate_cell_info_list_mn.size(); ++i1) { - candidate_cell_info_list_mn[i1].to_json(j); + for (const auto& e1 : candidate_cell_info_list_mn) { + e1.to_json(j); } j.end_array(); } @@ -53240,8 +53233,8 @@ void cg_cfg_info_ies_s::to_json(json_writer& j) const } if (meas_result_cell_list_sftd_present) { j.start_array("measResultCellListSFTD"); - for (uint32_t i1 = 0; i1 < meas_result_cell_list_sftd.size(); ++i1) { - meas_result_cell_list_sftd[i1].to_json(j); + for (const auto& e1 : meas_result_cell_list_sftd) { + e1.to_json(j); } j.end_array(); } @@ -53286,12 +53279,12 @@ void cg_cfg_info_ies_s::to_json(json_writer& j) const std::string cg_cfg_info_ies_s::scg_fail_info_s_::fail_type_opts::to_string() const { - static constexpr const char* options[] = {"t310-Expiry", - "randomAccessProblem", - "rlc-MaxNumRetx", - "synchReconfigFailure-SCG", - "scg-reconfigFailure", - "srb3-IntegrityFailure"}; + static const char* options[] = {"t310-Expiry", + "randomAccessProblem", + "rlc-MaxNumRetx", + "synchReconfigFailure-SCG", + "scg-reconfigFailure", + "srb3-IntegrityFailure"}; return convert_enum_idx(options, 6, value, "cg_cfg_info_ies_s::scg_fail_info_s_::fail_type_e_"); } uint16_t cg_cfg_info_ies_s::scg_fail_info_s_::fail_type_opts::to_number() const @@ -53503,19 +53496,19 @@ SRSASN_CODE cg_cfg_info_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) std::string cg_cfg_info_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"cg-ConfigInfo", "spare3", "spare2", "spare1"}; + static const char* options[] = {"cg-ConfigInfo", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "cg_cfg_info_s::crit_exts_c_::c1_c_::types"); } std::string cg_cfg_info_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "criticalExtensionsFuture"}; + static const char* options[] = {"c1", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "cg_cfg_info_s::crit_exts_c_::types"); } uint8_t cg_cfg_info_s::crit_exts_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "cg_cfg_info_s::crit_exts_c_::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "cg_cfg_info_s::crit_exts_c_::types"); } void cells_triggered_list_item_c_::destroy_() {} @@ -53613,7 +53606,7 @@ SRSASN_CODE cells_triggered_list_item_c_::unpack(cbit_ref& bref) std::string cells_triggered_list_item_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"physCellId", "physCellIdEUTRA"}; + static const char* options[] = {"physCellId", "physCellIdEUTRA"}; return convert_enum_idx(options, 2, value, "cells_triggered_list_item_c_::types"); } @@ -53842,19 +53835,19 @@ SRSASN_CODE ho_cmd_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) std::string ho_cmd_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"handoverCommand", "spare3", "spare2", "spare1"}; + static const char* options[] = {"handoverCommand", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ho_cmd_s::crit_exts_c_::c1_c_::types"); } std::string ho_cmd_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "criticalExtensionsFuture"}; + static const char* options[] = {"c1", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "ho_cmd_s::crit_exts_c_::types"); } uint8_t ho_cmd_s::crit_exts_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ho_cmd_s::crit_exts_c_::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ho_cmd_s::crit_exts_c_::types"); } // RRM-Config ::= SEQUENCE @@ -53896,8 +53889,8 @@ void rrm_cfg_s::to_json(json_writer& j) const } if (candidate_cell_info_list_present) { j.start_array("candidateCellInfoList"); - for (uint32_t i1 = 0; i1 < candidate_cell_info_list.size(); ++i1) { - candidate_cell_info_list[i1].to_json(j); + for (const auto& e1 : candidate_cell_info_list) { + e1.to_json(j); } j.end_array(); } @@ -53906,7 +53899,7 @@ void rrm_cfg_s::to_json(json_writer& j) const std::string rrm_cfg_s::ue_inactive_time_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "s1", "s2", "s3", "s5", "s7", "s10", "s15", "s20", "s25", "s30", "s40", "s50", "min1", "min1s20", "min1s40", "min2", "min2s30", "min3", "min3s30", "min4", "min5", "min6", "min7", "min8", "min9", "min10", "min12", "min14", "min17", "min20", @@ -53962,8 +53955,8 @@ void ho_prep_info_ies_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("ue-CapabilityRAT-List"); - for (uint32_t i1 = 0; i1 < ue_cap_rat_list.size(); ++i1) { - ue_cap_rat_list[i1].to_json(j); + for (const auto& e1 : ue_cap_rat_list) { + e1.to_json(j); } j.end_array(); if (source_cfg_present) { @@ -54182,19 +54175,19 @@ SRSASN_CODE ho_prep_info_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) std::string ho_prep_info_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"handoverPreparationInformation", "spare3", "spare2", "spare1"}; + static const char* options[] = {"handoverPreparationInformation", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "ho_prep_info_s::crit_exts_c_::c1_c_::types"); } std::string ho_prep_info_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "criticalExtensionsFuture"}; + static const char* options[] = {"c1", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "ho_prep_info_s::crit_exts_c_::types"); } uint8_t ho_prep_info_s::crit_exts_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ho_prep_info_s::crit_exts_c_::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ho_prep_info_s::crit_exts_c_::types"); } // MeasTiming ::= SEQUENCE @@ -54364,8 +54357,8 @@ void meas_timing_cfg_ies_s::to_json(json_writer& j) const j.start_obj(); if (meas_timing_present) { j.start_array("measTiming"); - for (uint32_t i1 = 0; i1 < meas_timing.size(); ++i1) { - meas_timing[i1].to_json(j); + for (const auto& e1 : meas_timing) { + e1.to_json(j); } j.end_array(); } @@ -54573,19 +54566,19 @@ SRSASN_CODE meas_timing_cfg_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) std::string meas_timing_cfg_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"measTimingConf", "spare3", "spare2", "spare1"}; + static const char* options[] = {"measTimingConf", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 4, value, "meas_timing_cfg_s::crit_exts_c_::c1_c_::types"); } std::string meas_timing_cfg_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "criticalExtensionsFuture"}; + static const char* options[] = {"c1", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "meas_timing_cfg_s::crit_exts_c_::types"); } uint8_t meas_timing_cfg_s::crit_exts_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "meas_timing_cfg_s::crit_exts_c_::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "meas_timing_cfg_s::crit_exts_c_::types"); } // UERadioAccessCapabilityInformation-IEs ::= SEQUENCE @@ -54838,20 +54831,20 @@ SRSASN_CODE ue_radio_access_cap_info_s::crit_exts_c_::c1_c_::unpack(cbit_ref& br std::string ue_radio_access_cap_info_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ueRadioAccessCapabilityInformation", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ue_radio_access_cap_info_s::crit_exts_c_::c1_c_::types"); } std::string ue_radio_access_cap_info_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "criticalExtensionsFuture"}; + static const char* options[] = {"c1", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "ue_radio_access_cap_info_s::crit_exts_c_::types"); } uint8_t ue_radio_access_cap_info_s::crit_exts_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ue_radio_access_cap_info_s::crit_exts_c_::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ue_radio_access_cap_info_s::crit_exts_c_::types"); } // UERadioPagingInformation-IEs ::= SEQUENCE @@ -54882,8 +54875,8 @@ void ue_radio_paging_info_ies_s::to_json(json_writer& j) const j.start_obj(); if (supported_band_list_nr_for_paging_present) { j.start_array("supportedBandListNRForPaging"); - for (uint32_t i1 = 0; i1 < supported_band_list_nr_for_paging.size(); ++i1) { - j.write_int(supported_band_list_nr_for_paging[i1]); + for (const auto& e1 : supported_band_list_nr_for_paging) { + j.write_int(e1); } j.end_array(); } @@ -55116,20 +55109,20 @@ SRSASN_CODE ue_radio_paging_info_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) std::string ue_radio_paging_info_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ueRadioPagingInformation", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 8, value, "ue_radio_paging_info_s::crit_exts_c_::c1_c_::types"); } std::string ue_radio_paging_info_s::crit_exts_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"c1", "criticalExtensionsFuture"}; + static const char* options[] = {"c1", "criticalExtensionsFuture"}; return convert_enum_idx(options, 2, value, "ue_radio_paging_info_s::crit_exts_c_::types"); } uint8_t ue_radio_paging_info_s::crit_exts_c_::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ue_radio_paging_info_s::crit_exts_c_::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ue_radio_paging_info_s::crit_exts_c_::types"); } // VarMeasConfig ::= SEQUENCE @@ -55190,22 +55183,22 @@ void var_meas_cfg_s::to_json(json_writer& j) const j.start_obj(); if (meas_id_list_present) { j.start_array("measIdList"); - for (uint32_t i1 = 0; i1 < meas_id_list.size(); ++i1) { - meas_id_list[i1].to_json(j); + for (const auto& e1 : meas_id_list) { + e1.to_json(j); } j.end_array(); } if (meas_obj_list_present) { j.start_array("measObjectList"); - for (uint32_t i1 = 0; i1 < meas_obj_list.size(); ++i1) { - meas_obj_list[i1].to_json(j); + for (const auto& e1 : meas_obj_list) { + e1.to_json(j); } j.end_array(); } if (report_cfg_list_present) { j.start_array("reportConfigList"); - for (uint32_t i1 = 0; i1 < report_cfg_list.size(); ++i1) { - report_cfg_list[i1].to_json(j); + for (const auto& e1 : report_cfg_list) { + e1.to_json(j); } j.end_array(); } @@ -55316,7 +55309,7 @@ SRSASN_CODE var_meas_cfg_s::s_measure_cfg_c_::unpack(cbit_ref& bref) std::string var_meas_cfg_s::s_measure_cfg_c_::types_opts::to_string() const { - static constexpr const char* options[] = {"ssb-RSRP", "csi-RSRP"}; + static const char* options[] = {"ssb-RSRP", "csi-RSRP"}; return convert_enum_idx(options, 2, value, "var_meas_cfg_s::s_measure_cfg_c_::types"); } @@ -55351,8 +55344,8 @@ void var_meas_report_s::to_json(json_writer& j) const j.write_int("measId", meas_id); if (cells_triggered_list_present) { j.start_array("cellsTriggeredList"); - for (uint32_t i1 = 0; i1 < cells_triggered_list.size(); ++i1) { - cells_triggered_list[i1].to_json(j); + for (const auto& e1 : cells_triggered_list) { + e1.to_json(j); } j.end_array(); } diff --git a/lib/src/asn1/s1ap_asn1.cc b/lib/src/asn1/s1ap_asn1.cc index 9a7d71207..b79fc4a2b 100644 --- a/lib/src/asn1/s1ap_asn1.cc +++ b/lib/src/asn1/s1ap_asn1.cc @@ -24,29 +24,15 @@ using namespace asn1; using namespace asn1::s1ap; +using srslte::logmap; /******************************************************************************* * Logging Utilities ******************************************************************************/ -srslte::log* asn1::s1ap::s1ap_log_ptr = nullptr; - -void asn1::s1ap::s1ap_log_register_handler(srslte::log* ctx) -{ - s1ap_log_ptr = ctx; -} - -void asn1::s1ap::s1ap_log_print(srslte::LOG_LEVEL_ENUM log_level, const char* format, ...) -{ - va_list args; - va_start(args, format); - vlog_print(s1ap_log_ptr, log_level, format, args); - va_end(args); -} - void asn1::s1ap::log_invalid_access_choice_id(uint32_t val, uint32_t choice_id) { - s1ap_log_print(LOG_LEVEL_ERROR, "The access choice id is invalid (%d!=%d)\n", val, choice_id); + logmap::get("ASN1::S1AP")->error("The access choice id is invalid (%d!=%d)\n", val, choice_id); } void asn1::s1ap::assert_choice_type(uint32_t val, uint32_t choice_id) @@ -61,11 +47,11 @@ void asn1::s1ap::assert_choice_type(const std::string& access_type, const std::string& choice_type) { if (access_type != current_type) { - s1ap_log_print(LOG_LEVEL_ERROR, - "Invalid field access for choice type \"%s\" (\"%s\"!=\"%s\")\n", - choice_type.c_str(), - access_type.c_str(), - current_type.c_str()); + logmap::get("ASN1::S1AP") + ->error("Invalid field access for choice type \"%s\" (\"%s\"!=\"%s\")\n", + choice_type.c_str(), + access_type.c_str(), + current_type.c_str()); } } @@ -74,29 +60,81 @@ asn1::s1ap::convert_enum_idx(const char* array[], uint32_t nof_types, uint32_t e { if (enum_val >= nof_types) { if (enum_val == nof_types) { - s1ap_log_print(LOG_LEVEL_ERROR, "The enum of type %s was not initialized.\n", enum_type); + logmap::get("ASN1::S1AP")->error("The enum of type %s was not initialized.\n", enum_type); } else { - s1ap_log_print(LOG_LEVEL_ERROR, "The enum value=%d of type %s is not valid.\n", enum_val, enum_type); + logmap::get("ASN1::S1AP")->error("The enum value=%d of type %s is not valid.\n", enum_val, enum_type); } return ""; } return array[enum_val]; } -#define s1ap_asn1_warn_assert(cond, file, line) \ - if ((cond)) { \ - s1ap_log_print(LOG_LEVEL_WARNING, "Assertion in [%s][%d] failed.\n", (file), (line)); \ +template +ItemType asn1::s1ap::map_enum_number(ItemType* array, uint32_t nof_types, uint32_t enum_val, const char* enum_type) +{ + if (enum_val >= nof_types) { + if (enum_val == nof_types) { + logmap::get("ASN1::S1AP")->error("The enum of type %s is not initialized.\n", enum_type); + } else { + logmap::get("ASN1::S1AP") + ->error("The enum value=%d of type %s cannot be converted to a number.\n", enum_val, enum_type); + } + return 0; } - + return array[enum_val]; +} +template const uint8_t asn1::s1ap::map_enum_number(const uint8_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint16_t asn1::s1ap::map_enum_number(const uint16_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint32_t asn1::s1ap::map_enum_number(const uint32_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const uint64_t asn1::s1ap::map_enum_number(const uint64_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int8_t asn1::s1ap::map_enum_number(const int8_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int16_t asn1::s1ap::map_enum_number(const int16_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int32_t asn1::s1ap::map_enum_number(const int32_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const int64_t asn1::s1ap::map_enum_number(const int64_t* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); +template const float asn1::s1ap::map_enum_number(const float* array, + uint32_t nof_types, + uint32_t enum_val, + const char* enum_type); + +void s1ap_asn1_warn_assert(bool cond, const char* filename, int lineno) +{ + if (cond) { + logmap::get("ASN1::S1AP")->warning("Assertion in [%s][%d] failed.\n", filename, lineno); + } +} static void log_invalid_choice_id(uint32_t val, const char* choice_type) { - s1ap_log_print(LOG_LEVEL_ERROR, "Invalid choice id=%d for choice type %s\n", val, choice_type); + logmap::get("ASN1::S1AP")->error("Invalid choice id=%d for choice type %s\n", val, choice_type); } static void invalid_enum_number(int value, const char* name) { - s1ap_log_print( - LOG_LEVEL_ERROR, "The provided enum value=%d of type %s cannot be translated into a number\n", value, name); + logmap::get("ASN1::S1AP") + ->error("The provided enum value=%d of type %s cannot be translated into a number\n", value, name); } /******************************************************************************* @@ -106,14 +144,14 @@ static void invalid_enum_number(int value, const char* name) // Criticality ::= ENUMERATED std::string crit_opts::to_string() const { - static constexpr const char* options[] = {"reject", "ignore", "notify"}; + static const char* options[] = {"reject", "ignore", "notify"}; return convert_enum_idx(options, 3, value, "crit_e"); } // Presence ::= ENUMERATED std::string presence_opts::to_string() const { - static constexpr const char* options[] = {"optional", "conditional", "mandatory"}; + static const char* options[] = {"optional", "conditional", "mandatory"}; return convert_enum_idx(options, 3, value, "presence_e"); } @@ -208,7 +246,7 @@ SRSASN_CODE private_ie_id_c::unpack(cbit_ref& bref) std::string private_ie_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"local", "global"}; + static const char* options[] = {"local", "global"}; return convert_enum_idx(options, 2, value, "private_ie_id_c::types"); } @@ -279,7 +317,7 @@ bool protocol_ext_field_s::load_info_obj(const uint32_t& id_) id = id_; crit = ext_set_paramT_::get_crit(id); ext_value = ext_set_paramT_::get_ext(id); - return true; + return ext_value.type().value != ext_set_paramT_::ext_c::types_opts::nulltype; } // ProtocolIE-Field{S1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE{{S1AP-PROTOCOL-IES}} @@ -320,7 +358,7 @@ bool protocol_ie_field_s::load_info_obj(const uint32_t& id_) id = id_; crit = ies_set_paramT_::get_crit(id); value = ies_set_paramT_::get_value(id); - return true; + return value.type().value != ies_set_paramT_::value_c::types_opts::nulltype; } // ProtocolIE-SingleContainer{S1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE{{S1AP-PROTOCOL-IES}} @@ -361,7 +399,7 @@ bool protocol_ie_single_container_s::load_info_obj(const uint32 id = id_; crit = ies_set_paramT_::get_crit(id); value = ies_set_paramT_::get_value(id); - return true; + return value.type().value != ies_set_paramT_::value_c::types_opts::nulltype; } // ProtocolIE-FieldPair{S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE{{S1AP-PROTOCOL-IES-PAIR}} @@ -411,7 +449,8 @@ bool protocol_ie_field_pair_s::load_info_obj(const uint32_t& id first_value = ies_set_paramT_::get_first_value(id); second_crit = ies_set_paramT_::get_second_crit(id); second_value = ies_set_paramT_::get_second_value(id); - return true; + return first_value.type().value != ies_set_paramT_::first_value_c::types_opts::nulltype and + second_value.type().value != ies_set_paramT_::second_value_c::types_opts::nulltype; } // ActivatedCellsList-Item ::= SEQUENCE @@ -438,25 +477,25 @@ void activ_cells_list_item_s::to_json(json_writer& j) const uint32_t s1ap_protocol_ext_empty_o::idx_to_id(uint32_t idx) { - s1ap_log_print(LOG_LEVEL_ERROR, "object set is empty\n"); + logmap::get("ASN1::S1AP")->error("object set is empty\n"); return 0; } bool s1ap_protocol_ext_empty_o::is_id_valid(const uint32_t& id) { - s1ap_log_print(LOG_LEVEL_ERROR, "object set is empty\n"); + logmap::get("ASN1::S1AP")->error("object set is empty\n"); return false; } crit_e s1ap_protocol_ext_empty_o::get_crit(const uint32_t& id) { - return crit_e(); + return {}; } s1ap_protocol_ext_empty_o::ext_c s1ap_protocol_ext_empty_o::get_ext(const uint32_t& id) { - return s1ap_protocol_ext_empty_o::ext_c(); + return {}; } presence_e s1ap_protocol_ext_empty_o::get_presence(const uint32_t& id) { - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -478,7 +517,7 @@ SRSASN_CODE s1ap_protocol_ext_empty_o::ext_c::unpack(cbit_ref& bref) std::string s1ap_protocol_ext_empty_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {}; + static const char* options[] = {}; return convert_enum_idx(options, 0, value, "s1ap_protocol_ext_empty_o::ext_c::types"); } @@ -625,14 +664,14 @@ void add_guti_s::to_json(json_writer& j) const // Pre-emptionCapability ::= ENUMERATED std::string pre_emption_cap_opts::to_string() const { - static constexpr const char* options[] = {"shall-not-trigger-pre-emption", "may-trigger-pre-emption"}; + static const char* options[] = {"shall-not-trigger-pre-emption", "may-trigger-pre-emption"}; return convert_enum_idx(options, 2, value, "pre_emption_cap_e"); } // Pre-emptionVulnerability ::= ENUMERATED std::string pre_emption_vulnerability_opts::to_string() const { - static constexpr const char* options[] = {"not-pre-emptable", "pre-emptable"}; + static const char* options[] = {"not-pre-emptable", "pre-emptable"}; return convert_enum_idx(options, 2, value, "pre_emption_vulnerability_e"); } @@ -785,8 +824,8 @@ void cell_based_mdt_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("cellIdListforMDT"); - for (uint32_t i1 = 0; i1 < cell_id_listfor_mdt.size(); ++i1) { - cell_id_listfor_mdt[i1].to_json(j); + for (const auto& e1 : cell_id_listfor_mdt) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -825,8 +864,8 @@ void ta_based_mdt_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("tAListforMDT"); - for (uint32_t i1 = 0; i1 < talistfor_mdt.size(); ++i1) { - j.write_str(talistfor_mdt[i1].to_string()); + for (const auto& e1 : talistfor_mdt) { + j.write_str(e1.to_string()); } j.end_array(); if (ie_exts_present) { @@ -865,8 +904,8 @@ void tai_based_mdt_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("tAIListforMDT"); - for (uint32_t i1 = 0; i1 < tai_listfor_mdt.size(); ++i1) { - tai_listfor_mdt[i1].to_json(j); + for (const auto& e1 : tai_listfor_mdt) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -1034,7 +1073,7 @@ SRSASN_CODE area_scope_of_mdt_c::unpack(cbit_ref& bref) std::string area_scope_of_mdt_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellBased", "tABased", "pLMNWide", "tAIBased"}; + static const char* options[] = {"cellBased", "tABased", "pLMNWide", "tAIBased"}; return convert_enum_idx(options, 4, value, "area_scope_of_mdt_c::types"); } @@ -1166,49 +1205,36 @@ void recommended_cell_item_s::to_json(json_writer& j) const // RecommendedCellItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t recommended_cell_item_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {214}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {214}; + return map_enum_number(options, 1, idx, "id"); } bool recommended_cell_item_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {214}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 214 == id; } crit_e recommended_cell_item_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 214: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 214) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } recommended_cell_item_ies_o::value_c recommended_cell_item_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 214: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 214) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e recommended_cell_item_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 214: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 214) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -1234,16 +1260,16 @@ SRSASN_CODE recommended_cell_item_ies_o::value_c::unpack(cbit_ref& bref) std::string recommended_cell_item_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"RecommendedCellItem"}; + static const char* options[] = {"RecommendedCellItem"}; return convert_enum_idx(options, 1, value, "recommended_cell_item_ies_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // NextPagingAreaScope ::= ENUMERATED std::string next_paging_area_scope_opts::to_string() const { - static constexpr const char* options[] = {"same", "changed"}; + static const char* options[] = {"same", "changed"}; return convert_enum_idx(options, 2, value, "next_paging_area_scope_e"); } @@ -1276,8 +1302,8 @@ void recommended_cells_for_paging_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("recommendedCellList"); - for (uint32_t i1 = 0; i1 < recommended_cell_list.size(); ++i1) { - recommended_cell_list[i1].to_json(j); + for (const auto& e1 : recommended_cell_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -1524,14 +1550,14 @@ void coun_tvalue_pdcp_snlen18_s::to_json(json_writer& j) const // Bearers-SubjectToStatusTransfer-ItemExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t bearers_subject_to_status_transfer_item_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {179, 180, 181, 217, 218, 219}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {179, 180, 181, 217, 218, 219}; + return map_enum_number(options, 6, idx, "id"); } bool bearers_subject_to_status_transfer_item_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {179, 180, 181, 217, 218, 219}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {179, 180, 181, 217, 218, 219}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -1553,9 +1579,9 @@ crit_e bearers_subject_to_status_transfer_item_ext_ies_o::get_crit(const uint32_ case 219: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } bearers_subject_to_status_transfer_item_ext_ies_o::ext_c bearers_subject_to_status_transfer_item_ext_ies_o::get_ext(const uint32_t& id) @@ -1581,7 +1607,7 @@ bearers_subject_to_status_transfer_item_ext_ies_o::get_ext(const uint32_t& id) ret.set(ext_c::types::receive_status_of_ulpdcpsdus_pdcp_snlen18); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -1601,9 +1627,9 @@ presence_e bearers_subject_to_status_transfer_item_ext_ies_o::get_presence(const case 219: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -1880,12 +1906,12 @@ SRSASN_CODE bearers_subject_to_status_transfer_item_ext_ies_o::ext_c::unpack(cbi std::string bearers_subject_to_status_transfer_item_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"COUNTValueExtended", - "COUNTValueExtended", - "BIT STRING", - "COUNTvaluePDCP-SNlength18", - "COUNTvaluePDCP-SNlength18", - "BIT STRING"}; + static const char* options[] = {"COUNTValueExtended", + "COUNTValueExtended", + "BIT STRING", + "COUNTvaluePDCP-SNlength18", + "COUNTvaluePDCP-SNlength18", + "BIT STRING"}; return convert_enum_idx(options, 6, value, "bearers_subject_to_status_transfer_item_ext_ies_o::ext_c::types"); } @@ -1928,7 +1954,7 @@ void coun_tvalue_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; bearers_subject_to_status_transfer_item_ext_ies_container::bearers_subject_to_status_transfer_item_ext_ies_container() : ulcount_value_extended(179, crit_e::ignore), @@ -2017,7 +2043,7 @@ SRSASN_CODE bearers_subject_to_status_transfer_item_ext_ies_container::unpack(cb receive_status_of_ulpdcpsdus_pdcp_snlen18.ext = c.ext_value.receive_status_of_ulpdcpsdus_pdcp_snlen18(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -2112,50 +2138,37 @@ void bearers_subject_to_status_transfer_item_s::to_json(json_writer& j) const // Bearers-SubjectToStatusTransfer-ItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t bearers_subject_to_status_transfer_item_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {89}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {89}; + return map_enum_number(options, 1, idx, "id"); } bool bearers_subject_to_status_transfer_item_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {89}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 89 == id; } crit_e bearers_subject_to_status_transfer_item_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 89: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 89) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } bearers_subject_to_status_transfer_item_ies_o::value_c bearers_subject_to_status_transfer_item_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 89: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 89) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e bearers_subject_to_status_transfer_item_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 89: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 89) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -2181,11 +2194,11 @@ SRSASN_CODE bearers_subject_to_status_transfer_item_ies_o::value_c::unpack(cbit_ std::string bearers_subject_to_status_transfer_item_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Bearers-SubjectToStatusTransfer-Item"}; + static const char* options[] = {"Bearers-SubjectToStatusTransfer-Item"}; return convert_enum_idx(options, 1, value, "bearers_subject_to_status_transfer_item_ies_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // CancelledCellinEAI-Item ::= SEQUENCE SRSASN_CODE cancelled_cellin_eai_item_s::pack(bit_ref& bref) const @@ -2339,8 +2352,8 @@ void emergency_area_id_cancelled_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("emergencyAreaID", emergency_area_id.to_string()); j.start_array("cancelledCellinEAI"); - for (uint32_t i1 = 0; i1 < cancelled_cellin_eai.size(); ++i1) { - cancelled_cellin_eai[i1].to_json(j); + for (const auto& e1 : cancelled_cellin_eai) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -2383,8 +2396,8 @@ void tai_cancelled_item_s::to_json(json_writer& j) const j.write_fieldname("tAI"); tai.to_json(j); j.start_array("cancelledCellinTAI"); - for (uint32_t i1 = 0; i1 < cancelled_cellin_tai.size(); ++i1) { - cancelled_cellin_tai[i1].to_json(j); + for (const auto& e1 : cancelled_cellin_tai) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -2481,22 +2494,22 @@ void broadcast_cancelled_area_list_c::to_json(json_writer& j) const switch (type_) { case types::cell_id_cancelled: j.start_array("cellID-Cancelled"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::tai_cancelled: j.start_array("tAI-Cancelled"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::emergency_area_id_cancelled: j.start_array("emergencyAreaID-Cancelled"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -2548,7 +2561,7 @@ SRSASN_CODE broadcast_cancelled_area_list_c::unpack(cbit_ref& bref) std::string broadcast_cancelled_area_list_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellID-Cancelled", "tAI-Cancelled", "emergencyAreaID-Cancelled"}; + static const char* options[] = {"cellID-Cancelled", "tAI-Cancelled", "emergencyAreaID-Cancelled"}; return convert_enum_idx(options, 3, value, "broadcast_cancelled_area_list_c::types"); } @@ -2695,8 +2708,8 @@ void emergency_area_id_broadcast_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("emergencyAreaID", emergency_area_id.to_string()); j.start_array("completedCellinEAI"); - for (uint32_t i1 = 0; i1 < completed_cellin_eai.size(); ++i1) { - completed_cellin_eai[i1].to_json(j); + for (const auto& e1 : completed_cellin_eai) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -2739,8 +2752,8 @@ void tai_broadcast_item_s::to_json(json_writer& j) const j.write_fieldname("tAI"); tai.to_json(j); j.start_array("completedCellinTAI"); - for (uint32_t i1 = 0; i1 < completed_cellin_tai.size(); ++i1) { - completed_cellin_tai[i1].to_json(j); + for (const auto& e1 : completed_cellin_tai) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -2837,22 +2850,22 @@ void broadcast_completed_area_list_c::to_json(json_writer& j) const switch (type_) { case types::cell_id_broadcast: j.start_array("cellID-Broadcast"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::tai_broadcast: j.start_array("tAI-Broadcast"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::emergency_area_id_broadcast: j.start_array("emergencyAreaID-Broadcast"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -2904,7 +2917,7 @@ SRSASN_CODE broadcast_completed_area_list_c::unpack(cbit_ref& bref) std::string broadcast_completed_area_list_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellID-Broadcast", "tAI-Broadcast", "emergencyAreaID-Broadcast"}; + static const char* options[] = {"cellID-Broadcast", "tAI-Broadcast", "emergencyAreaID-Broadcast"}; return convert_enum_idx(options, 3, value, "broadcast_completed_area_list_c::types"); } @@ -3000,14 +3013,14 @@ void csg_id_list_item_s::to_json(json_writer& j) const // CSGMembershipStatus ::= ENUMERATED std::string csg_membership_status_opts::to_string() const { - static constexpr const char* options[] = {"member", "not-member"}; + static const char* options[] = {"member", "not-member"}; return convert_enum_idx(options, 2, value, "csg_membership_status_e"); } // CellAccessMode ::= ENUMERATED std::string cell_access_mode_opts::to_string() const { - static constexpr const char* options[] = {"hybrid"}; + static const char* options[] = {"hybrid"}; return convert_enum_idx(options, 1, value, "cell_access_mode_e"); } @@ -3236,7 +3249,7 @@ SRSASN_CODE irat_cell_id_c::unpack(cbit_ref& bref) std::string irat_cell_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"eUTRAN", "uTRAN", "gERAN", "eHRPD"}; + static const char* options[] = {"eUTRAN", "uTRAN", "gERAN", "eHRPD"}; return convert_enum_idx(options, 4, value, "irat_cell_id_c::types"); } @@ -3268,19 +3281,19 @@ void candidate_pci_s::to_json(json_writer& j) const // CauseMisc ::= ENUMERATED std::string cause_misc_opts::to_string() const { - static constexpr const char* options[] = {"control-processing-overload", - "not-enough-user-plane-processing-resources", - "hardware-failure", - "om-intervention", - "unspecified", - "unknown-PLMN"}; + static const char* options[] = {"control-processing-overload", + "not-enough-user-plane-processing-resources", + "hardware-failure", + "om-intervention", + "unspecified", + "unknown-PLMN"}; return convert_enum_idx(options, 6, value, "cause_misc_e"); } // CauseNas ::= ENUMERATED std::string cause_nas_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "normal-release", "authentication-failure", "detach", "unspecified", "csg-subscription-expiry"}; return convert_enum_idx(options, 5, value, "cause_nas_e"); } @@ -3288,66 +3301,66 @@ std::string cause_nas_opts::to_string() const // CauseProtocol ::= ENUMERATED std::string cause_protocol_opts::to_string() const { - static constexpr const char* options[] = {"transfer-syntax-error", - "abstract-syntax-error-reject", - "abstract-syntax-error-ignore-and-notify", - "message-not-compatible-with-receiver-state", - "semantic-error", - "abstract-syntax-error-falsely-constructed-message", - "unspecified"}; + static const char* options[] = {"transfer-syntax-error", + "abstract-syntax-error-reject", + "abstract-syntax-error-ignore-and-notify", + "message-not-compatible-with-receiver-state", + "semantic-error", + "abstract-syntax-error-falsely-constructed-message", + "unspecified"}; return convert_enum_idx(options, 7, value, "cause_protocol_e"); } // CauseRadioNetwork ::= ENUMERATED std::string cause_radio_network_opts::to_string() const { - static constexpr const char* options[] = {"unspecified", - "tx2relocoverall-expiry", - "successful-handover", - "release-due-to-eutran-generated-reason", - "handover-cancelled", - "partial-handover", - "ho-failure-in-target-EPC-eNB-or-target-system", - "ho-target-not-allowed", - "tS1relocoverall-expiry", - "tS1relocprep-expiry", - "cell-not-available", - "unknown-targetID", - "no-radio-resources-available-in-target-cell", - "unknown-mme-ue-s1ap-id", - "unknown-enb-ue-s1ap-id", - "unknown-pair-ue-s1ap-id", - "handover-desirable-for-radio-reason", - "time-critical-handover", - "resource-optimisation-handover", - "reduce-load-in-serving-cell", - "user-inactivity", - "radio-connection-with-ue-lost", - "load-balancing-tau-required", - "cs-fallback-triggered", - "ue-not-available-for-ps-service", - "radio-resources-not-available", - "failure-in-radio-interface-procedure", - "invalid-qos-combination", - "interrat-redirection", - "interaction-with-other-procedure", - "unknown-E-RAB-ID", - "multiple-E-RAB-ID-instances", - "encryption-and-or-integrity-protection-algorithms-not-supported", - "s1-intra-system-handover-triggered", - "s1-inter-system-handover-triggered", - "x2-handover-triggered", - "redirection-towards-1xRTT", - "not-supported-QCI-value", - "invalid-CSG-Id", - "release-due-to-pre-emption"}; + static const char* options[] = {"unspecified", + "tx2relocoverall-expiry", + "successful-handover", + "release-due-to-eutran-generated-reason", + "handover-cancelled", + "partial-handover", + "ho-failure-in-target-EPC-eNB-or-target-system", + "ho-target-not-allowed", + "tS1relocoverall-expiry", + "tS1relocprep-expiry", + "cell-not-available", + "unknown-targetID", + "no-radio-resources-available-in-target-cell", + "unknown-mme-ue-s1ap-id", + "unknown-enb-ue-s1ap-id", + "unknown-pair-ue-s1ap-id", + "handover-desirable-for-radio-reason", + "time-critical-handover", + "resource-optimisation-handover", + "reduce-load-in-serving-cell", + "user-inactivity", + "radio-connection-with-ue-lost", + "load-balancing-tau-required", + "cs-fallback-triggered", + "ue-not-available-for-ps-service", + "radio-resources-not-available", + "failure-in-radio-interface-procedure", + "invalid-qos-combination", + "interrat-redirection", + "interaction-with-other-procedure", + "unknown-E-RAB-ID", + "multiple-E-RAB-ID-instances", + "encryption-and-or-integrity-protection-algorithms-not-supported", + "s1-intra-system-handover-triggered", + "s1-inter-system-handover-triggered", + "x2-handover-triggered", + "redirection-towards-1xRTT", + "not-supported-QCI-value", + "invalid-CSG-Id", + "release-due-to-pre-emption"}; return convert_enum_idx(options, 40, value, "cause_radio_network_e"); } // CauseTransport ::= ENUMERATED std::string cause_transport_opts::to_string() const { - static constexpr const char* options[] = {"transport-resource-unavailable", "unspecified"}; + static const char* options[] = {"transport-resource-unavailable", "unspecified"}; return convert_enum_idx(options, 2, value, "cause_transport_e"); } @@ -3492,13 +3505,13 @@ SRSASN_CODE cause_c::unpack(cbit_ref& bref) std::string cause_c::types_opts::to_string() const { - static constexpr const char* options[] = {"radioNetwork", "transport", "nas", "protocol", "misc"}; + static const char* options[] = {"radioNetwork", "transport", "nas", "protocol", "misc"}; return convert_enum_idx(options, 5, value, "cause_c::types"); } uint8_t cause_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx(options, 1, value, "cause_c::types"); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "cause_c::types"); } // Cdma2000OneXSRVCCInfo ::= SEQUENCE @@ -3594,8 +3607,8 @@ void cell_activation_request_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("cellsToActivateList"); - for (uint32_t i1 = 0; i1 < cells_to_activ_list.size(); ++i1) { - cells_to_activ_list[i1].to_json(j); + for (const auto& e1 : cells_to_activ_list) { + e1.to_json(j); } j.end_array(); if (minimum_activation_time_present) { @@ -3623,8 +3636,8 @@ void cell_activation_resp_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("activatedCellsList"); - for (uint32_t i1 = 0; i1 < activ_cells_list.size(); ++i1) { - activ_cells_list[i1].to_json(j); + for (const auto& e1 : activ_cells_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -3870,14 +3883,14 @@ SRSASN_CODE cell_load_report_resp_c::unpack(cbit_ref& bref) std::string cell_load_report_resp_c::types_opts::to_string() const { - static constexpr const char* options[] = {"eUTRAN", "uTRAN", "gERAN", "eHRPD"}; + static const char* options[] = {"eUTRAN", "uTRAN", "gERAN", "eHRPD"}; return convert_enum_idx(options, 4, value, "cell_load_report_resp_c::types"); } // NotifyFlag ::= ENUMERATED std::string notify_flag_opts::to_string() const { - static constexpr const char* options[] = {"activated", "deactivated"}; + static const char* options[] = {"activated", "deactivated"}; return convert_enum_idx(options, 2, value, "notify_flag_e"); } @@ -3925,8 +3938,8 @@ void cell_state_ind_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("notificationCellList"); - for (uint32_t i1 = 0; i1 < notif_cell_list.size(); ++i1) { - notif_cell_list[i1].to_json(j); + for (const auto& e1 : notif_cell_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -3935,21 +3948,21 @@ void cell_state_ind_s::to_json(json_writer& j) const // PrivacyIndicator ::= ENUMERATED std::string privacy_ind_opts::to_string() const { - static constexpr const char* options[] = {"immediate-MDT", "logged-MDT"}; + static const char* options[] = {"immediate-MDT", "logged-MDT"}; return convert_enum_idx(options, 2, value, "privacy_ind_e"); } // CellTrafficTraceIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t cell_traffic_trace_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 86, 100, 131, 166}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {0, 8, 86, 100, 131, 166}; + return map_enum_number(options, 6, idx, "id"); } bool cell_traffic_trace_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 86, 100, 131, 166}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 86, 100, 131, 166}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -3971,9 +3984,9 @@ crit_e cell_traffic_trace_ies_o::get_crit(const uint32_t& id) case 166: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } cell_traffic_trace_ies_o::value_c cell_traffic_trace_ies_o::get_value(const uint32_t& id) { @@ -3998,7 +4011,7 @@ cell_traffic_trace_ies_o::value_c cell_traffic_trace_ies_o::get_value(const uint ret.set(value_c::types::privacy_ind); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -4018,9 +4031,9 @@ presence_e cell_traffic_trace_ies_o::get_presence(const uint32_t& id) case 166: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -4276,12 +4289,12 @@ SRSASN_CODE cell_traffic_trace_ies_o::value_c::unpack(cbit_ref& bref) std::string cell_traffic_trace_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "OCTET STRING", - "EUTRAN-CGI", - "BIT STRING", - "PrivacyIndicator"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "OCTET STRING", + "EUTRAN-CGI", + "BIT STRING", + "PrivacyIndicator"}; return convert_enum_idx(options, 6, value, "cell_traffic_trace_ies_o::value_c::types"); } @@ -4321,7 +4334,7 @@ void protocol_ie_container_item_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; cell_traffic_trace_ies_container::cell_traffic_trace_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -4397,12 +4410,13 @@ SRSASN_CODE cell_traffic_trace_ies_container::unpack(cbit_ref& bref) privacy_ind.value = c.value.privacy_ind(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -4453,7 +4467,7 @@ void cell_traffic_trace_s::to_json(json_writer& j) const // Cell-Size ::= ENUMERATED std::string cell_size_opts::to_string() const { - static constexpr const char* options[] = {"verysmall", "small", "medium", "large"}; + static const char* options[] = {"verysmall", "small", "medium", "large"}; return convert_enum_idx(options, 4, value, "cell_size_e"); } @@ -4496,7 +4510,7 @@ void cell_type_s::to_json(json_writer& j) const // CE-ModeBRestricted ::= ENUMERATED std::string ce_mode_brestricted_opts::to_string() const { - static constexpr const char* options[] = {"restricted", "not-restricted"}; + static const char* options[] = {"restricted", "not-restricted"}; return convert_enum_idx(options, 2, value, "ce_mode_brestricted_e"); } @@ -4539,21 +4553,21 @@ void dl_cp_security_info_s::to_json(json_writer& j) const // EnhancedCoverageRestricted ::= ENUMERATED std::string enhanced_coverage_restricted_opts::to_string() const { - static constexpr const char* options[] = {"restricted"}; + static const char* options[] = {"restricted"}; return convert_enum_idx(options, 1, value, "enhanced_coverage_restricted_e"); } // ConnectionEstablishmentIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t conn_establishment_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 74, 251, 253, 271}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {0, 8, 74, 251, 253, 271}; + return map_enum_number(options, 6, idx, "id"); } bool conn_establishment_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 74, 251, 253, 271}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 74, 251, 253, 271}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -4575,9 +4589,9 @@ crit_e conn_establishment_ind_ies_o::get_crit(const uint32_t& id) case 271: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } conn_establishment_ind_ies_o::value_c conn_establishment_ind_ies_o::get_value(const uint32_t& id) { @@ -4602,7 +4616,7 @@ conn_establishment_ind_ies_o::value_c conn_establishment_ind_ies_o::get_value(co ret.set(value_c::types::ce_mode_brestricted); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -4622,9 +4636,9 @@ presence_e conn_establishment_ind_ies_o::get_presence(const uint32_t& id) case 271: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -4875,16 +4889,16 @@ SRSASN_CODE conn_establishment_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string conn_establishment_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "OCTET STRING", - "EnhancedCoverageRestricted", - "DL-CP-SecurityInformation", - "CE-ModeBRestricted"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "OCTET STRING", + "EnhancedCoverageRestricted", + "DL-CP-SecurityInformation", + "CE-ModeBRestricted"}; return convert_enum_idx(options, 6, value, "conn_establishment_ind_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; conn_establishment_ind_ies_container::conn_establishment_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -4969,12 +4983,13 @@ SRSASN_CODE conn_establishment_ind_ies_container::unpack(cbit_ref& bref) ce_mode_brestricted.value = c.value.ce_mode_brestricted(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -5031,7 +5046,7 @@ void conn_establishment_ind_s::to_json(json_writer& j) const // TypeOfError ::= ENUMERATED std::string type_of_error_opts::to_string() const { - static constexpr const char* options[] = {"not-understood", "missing"}; + static const char* options[] = {"not-understood", "missing"}; return convert_enum_idx(options, 2, value, "type_of_error_e"); } @@ -5080,7 +5095,7 @@ void crit_diagnostics_ie_item_s::to_json(json_writer& j) const // TriggeringMessage ::= ENUMERATED std::string trigger_msg_opts::to_string() const { - static constexpr const char* options[] = {"initiating-message", "successful-outcome", "unsuccessfull-outcome"}; + static const char* options[] = {"initiating-message", "successful-outcome", "unsuccessfull-outcome"}; return convert_enum_idx(options, 3, value, "trigger_msg_e"); } @@ -5153,8 +5168,8 @@ void crit_diagnostics_s::to_json(json_writer& j) const } if (ies_crit_diagnostics_present) { j.start_array("iEsCriticalityDiagnostics"); - for (uint32_t i1 = 0; i1 < ies_crit_diagnostics.size(); ++i1) { - ies_crit_diagnostics[i1].to_json(j); + for (const auto& e1 : ies_crit_diagnostics) { + e1.to_json(j); } j.end_array(); } @@ -5168,14 +5183,14 @@ void crit_diagnostics_s::to_json(json_writer& j) const // DeactivateTraceIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t deactiv_trace_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 86}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 8, 86}; + return map_enum_number(options, 3, idx, "id"); } bool deactiv_trace_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 86}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 86}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -5191,9 +5206,9 @@ crit_e deactiv_trace_ies_o::get_crit(const uint32_t& id) case 86: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } deactiv_trace_ies_o::value_c deactiv_trace_ies_o::get_value(const uint32_t& id) { @@ -5209,7 +5224,7 @@ deactiv_trace_ies_o::value_c deactiv_trace_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::e_utran_trace_id); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -5223,9 +5238,9 @@ presence_e deactiv_trace_ies_o::get_presence(const uint32_t& id) case 86: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -5389,11 +5404,11 @@ SRSASN_CODE deactiv_trace_ies_o::value_c::unpack(cbit_ref& bref) std::string deactiv_trace_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "OCTET STRING"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "OCTET STRING"}; return convert_enum_idx(options, 3, value, "deactiv_trace_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; deactiv_trace_ies_container::deactiv_trace_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -5442,12 +5457,13 @@ SRSASN_CODE deactiv_trace_ies_container::unpack(cbit_ref& bref) e_utran_trace_id.value = c.value.e_utran_trace_id(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -5519,8 +5535,8 @@ void forbidden_las_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("pLMN-Identity", plmn_id.to_string()); j.start_array("forbiddenLACs"); - for (uint32_t i1 = 0; i1 < forbidden_lacs.size(); ++i1) { - j.write_str(forbidden_lacs[i1].to_string()); + for (const auto& e1 : forbidden_lacs) { + j.write_str(e1.to_string()); } j.end_array(); if (ie_exts_present) { @@ -5562,8 +5578,8 @@ void forbidden_tas_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("pLMN-Identity", plmn_id.to_string()); j.start_array("forbiddenTACs"); - for (uint32_t i1 = 0; i1 < forbidden_tacs.size(); ++i1) { - j.write_str(forbidden_tacs[i1].to_string()); + for (const auto& e1 : forbidden_tacs) { + j.write_str(e1.to_string()); } j.end_array(); if (ie_exts_present) { @@ -5576,14 +5592,14 @@ void forbidden_tas_item_s::to_json(json_writer& j) const // ForbiddenInterRATs ::= ENUMERATED std::string forbidden_inter_rats_opts::to_string() const { - static constexpr const char* options[] = {"all", "geran", "utran", "cdma2000", "geranandutran", "cdma2000andutran"}; + static const char* options[] = {"all", "geran", "utran", "cdma2000", "geranandutran", "cdma2000andutran"}; return convert_enum_idx(options, 6, value, "forbidden_inter_rats_e"); } // DLNASPDUDeliveryAckRequest ::= ENUMERATED std::string dlnaspdu_delivery_ack_request_opts::to_string() const { - static constexpr const char* options[] = {"requested"}; + static const char* options[] = {"requested"}; return convert_enum_idx(options, 1, value, "dlnaspdu_delivery_ack_request_e"); } @@ -5650,22 +5666,22 @@ void ho_restrict_list_s::to_json(json_writer& j) const j.write_str("servingPLMN", serving_plmn.to_string()); if (equivalent_plmns_present) { j.start_array("equivalentPLMNs"); - for (uint32_t i1 = 0; i1 < equivalent_plmns.size(); ++i1) { - j.write_str(equivalent_plmns[i1].to_string()); + for (const auto& e1 : equivalent_plmns) { + j.write_str(e1.to_string()); } j.end_array(); } if (forbidden_tas_present) { j.start_array("forbiddenTAs"); - for (uint32_t i1 = 0; i1 < forbidden_tas.size(); ++i1) { - forbidden_tas[i1].to_json(j); + for (const auto& e1 : forbidden_tas) { + e1.to_json(j); } j.end_array(); } if (forbidden_las_present) { j.start_array("forbiddenLAs"); - for (uint32_t i1 = 0; i1 < forbidden_las.size(); ++i1) { - forbidden_las[i1].to_json(j); + for (const auto& e1 : forbidden_las) { + e1.to_json(j); } j.end_array(); } @@ -5682,28 +5698,28 @@ void ho_restrict_list_s::to_json(json_writer& j) const // PendingDataIndication ::= ENUMERATED std::string pending_data_ind_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "pending_data_ind_e"); } // SRVCCOperationPossible ::= ENUMERATED std::string srvcc_operation_possible_opts::to_string() const { - static constexpr const char* options[] = {"possible"}; + static const char* options[] = {"possible"}; return convert_enum_idx(options, 1, value, "srvcc_operation_possible_e"); } // DownlinkNASTransport-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t dl_nas_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 26, 41, 106, 124, 74, 249, 251, 271, 283}; - return convert_enum_idx(options, 11, idx, "id"); + static const uint32_t options[] = {0, 8, 26, 41, 106, 124, 74, 249, 251, 271, 283}; + return map_enum_number(options, 11, idx, "id"); } bool dl_nas_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 26, 41, 106, 124, 74, 249, 251, 271, 283}; - for (uint32_t i = 0; i < 11; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 26, 41, 106, 124, 74, 249, 251, 271, 283}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -5735,9 +5751,9 @@ crit_e dl_nas_transport_ies_o::get_crit(const uint32_t& id) case 283: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } dl_nas_transport_ies_o::value_c dl_nas_transport_ies_o::get_value(const uint32_t& id) { @@ -5777,7 +5793,7 @@ dl_nas_transport_ies_o::value_c dl_nas_transport_ies_o::get_value(const uint32_t ret.set(value_c::types::pending_data_ind); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -5807,9 +5823,9 @@ presence_e dl_nas_transport_ies_o::get_presence(const uint32_t& id) case 283: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -6199,21 +6215,21 @@ SRSASN_CODE dl_nas_transport_ies_o::value_c::unpack(cbit_ref& bref) std::string dl_nas_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "OCTET STRING", - "HandoverRestrictionList", - "INTEGER (1..256)", - "SRVCCOperationPossible", - "OCTET STRING", - "DLNASPDUDeliveryAckRequest", - "EnhancedCoverageRestricted", - "CE-ModeBRestricted", - "PendingDataIndication"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "OCTET STRING", + "HandoverRestrictionList", + "INTEGER (1..256)", + "SRVCCOperationPossible", + "OCTET STRING", + "DLNASPDUDeliveryAckRequest", + "EnhancedCoverageRestricted", + "CE-ModeBRestricted", + "PendingDataIndication"}; return convert_enum_idx(options, 11, value, "dl_nas_transport_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; dl_nas_transport_ies_container::dl_nas_transport_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -6350,12 +6366,13 @@ SRSASN_CODE dl_nas_transport_ies_container::unpack(cbit_ref& bref) pending_data_ind.value = c.value.pending_data_ind(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -6430,14 +6447,14 @@ void dl_nas_transport_s::to_json(json_writer& j) const // DownlinkNonUEAssociatedLPPaTransport-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t dl_non_ueassociated_lp_pa_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {148, 147}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {148, 147}; + return map_enum_number(options, 2, idx, "id"); } bool dl_non_ueassociated_lp_pa_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {148, 147}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {148, 147}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -6451,9 +6468,9 @@ crit_e dl_non_ueassociated_lp_pa_transport_ies_o::get_crit(const uint32_t& id) case 147: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } dl_non_ueassociated_lp_pa_transport_ies_o::value_c dl_non_ueassociated_lp_pa_transport_ies_o::get_value(const uint32_t& id) @@ -6467,7 +6484,7 @@ dl_non_ueassociated_lp_pa_transport_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::lp_pa_pdu); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -6479,9 +6496,9 @@ presence_e dl_non_ueassociated_lp_pa_transport_ies_o::get_presence(const uint32_ case 147: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -6620,16 +6637,16 @@ SRSASN_CODE dl_non_ueassociated_lp_pa_transport_ies_o::value_c::unpack(cbit_ref& std::string dl_non_ueassociated_lp_pa_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..255)", "OCTET STRING"}; + static const char* options[] = {"INTEGER (0..255)", "OCTET STRING"}; return convert_enum_idx(options, 2, value, "dl_non_ueassociated_lp_pa_transport_ies_o::value_c::types"); } uint8_t dl_non_ueassociated_lp_pa_transport_ies_o::value_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {0}; - return convert_enum_idx(options, 1, value, "dl_non_ueassociated_lp_pa_transport_ies_o::value_c::types"); + static const uint8_t options[] = {0}; + return map_enum_number(options, 1, value, "dl_non_ueassociated_lp_pa_transport_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; dl_non_ueassociated_lp_pa_transport_ies_container::dl_non_ueassociated_lp_pa_transport_ies_container() : routing_id(148, crit_e::reject), @@ -6670,12 +6687,13 @@ SRSASN_CODE dl_non_ueassociated_lp_pa_transport_ies_container::unpack(cbit_ref& lp_pa_pdu.value = c.value.lp_pa_pdu(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -6796,49 +6814,36 @@ void erab_data_forwarding_item_s::to_json(json_writer& j) const // E-RABDataForwardingItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_data_forwarding_item_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {14}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {14}; + return map_enum_number(options, 1, idx, "id"); } bool erab_data_forwarding_item_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {14}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 14 == id; } crit_e erab_data_forwarding_item_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 14: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 14) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_data_forwarding_item_ies_o::value_c erab_data_forwarding_item_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 14: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 14) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_data_forwarding_item_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 14: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 14) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -6864,31 +6869,29 @@ SRSASN_CODE erab_data_forwarding_item_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_data_forwarding_item_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABDataForwardingItem"}; + static const char* options[] = {"E-RABDataForwardingItem"}; return convert_enum_idx(options, 1, value, "erab_data_forwarding_item_ies_o::value_c::types"); } // Cdma2000HOStatus ::= ENUMERATED std::string cdma2000_ho_status_opts::to_string() const { - static constexpr const char* options[] = {"hOSuccess", "hOFailure"}; + static const char* options[] = {"hOSuccess", "hOFailure"}; return convert_enum_idx(options, 2, value, "cdma2000_ho_status_e"); } // Cdma2000RATType ::= ENUMERATED std::string cdma2000_rat_type_opts::to_string() const { - static constexpr const char* options[] = {"hRPD", "onexRTT"}; + static const char* options[] = {"hRPD", "onexRTT"}; return convert_enum_idx(options, 2, value, "cdma2000_rat_type_e"); } uint8_t cdma2000_rat_type_opts::to_number() const { - switch (value) { - case onex_rtt: - return 1; - default: - invalid_enum_number(value, "cdma2000_rat_type_e"); + if (value == onex_rtt) { + return 1; } + invalid_enum_number(value, "cdma2000_rat_type_e"); return 0; } @@ -6951,20 +6954,19 @@ SRSASN_CODE erab_data_forwarding_item_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_single_container_item_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 14: - nof_mandatory_ies--; - erab_data_forwarding_item.id = c.id; - erab_data_forwarding_item.crit = c.crit; - erab_data_forwarding_item.value = c.value.erab_data_forwarding_item(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 14) { + nof_mandatory_ies--; + erab_data_forwarding_item.id = c.id; + erab_data_forwarding_item.crit = c.crit; + erab_data_forwarding_item.value = c.value.erab_data_forwarding_item(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -6980,14 +6982,14 @@ void erab_data_forwarding_item_ies_container::to_json(json_writer& j) const // DownlinkS1cdma2000tunnellingIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t dl_s1cdma2000tunnelling_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 12, 83, 71, 70}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {0, 8, 12, 83, 71, 70}; + return map_enum_number(options, 6, idx, "id"); } bool dl_s1cdma2000tunnelling_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 12, 83, 71, 70}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 12, 83, 71, 70}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -7009,9 +7011,9 @@ crit_e dl_s1cdma2000tunnelling_ies_o::get_crit(const uint32_t& id) case 70: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } dl_s1cdma2000tunnelling_ies_o::value_c dl_s1cdma2000tunnelling_ies_o::get_value(const uint32_t& id) { @@ -7036,7 +7038,7 @@ dl_s1cdma2000tunnelling_ies_o::value_c dl_s1cdma2000tunnelling_ies_o::get_value( ret.set(value_c::types::cdma2000_pdu); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -7056,9 +7058,9 @@ presence_e dl_s1cdma2000tunnelling_ies_o::get_presence(const uint32_t& id) case 70: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -7310,12 +7312,12 @@ SRSASN_CODE dl_s1cdma2000tunnelling_ies_o::value_c::unpack(cbit_ref& bref) std::string dl_s1cdma2000tunnelling_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "", "Cdma2000HOStatus", "Cdma2000RATType", "OCTET STRING"}; return convert_enum_idx(options, 6, value, "dl_s1cdma2000tunnelling_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; dl_s1cdma2000tunnelling_ies_container::dl_s1cdma2000tunnelling_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -7394,12 +7396,13 @@ SRSASN_CODE dl_s1cdma2000tunnelling_ies_container::unpack(cbit_ref& bref) cdma2000_pdu.value = c.value.cdma2000_pdu(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -7452,14 +7455,14 @@ void dl_s1cdma2000tunnelling_s::to_json(json_writer& j) const // DownlinkUEAssociatedLPPaTransport-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t dl_ueassociated_lp_pa_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 148, 147}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 148, 147}; + return map_enum_number(options, 4, idx, "id"); } bool dl_ueassociated_lp_pa_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 148, 147}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 148, 147}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -7477,9 +7480,9 @@ crit_e dl_ueassociated_lp_pa_transport_ies_o::get_crit(const uint32_t& id) case 147: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } dl_ueassociated_lp_pa_transport_ies_o::value_c dl_ueassociated_lp_pa_transport_ies_o::get_value(const uint32_t& id) { @@ -7498,7 +7501,7 @@ dl_ueassociated_lp_pa_transport_ies_o::value_c dl_ueassociated_lp_pa_transport_i ret.set(value_c::types::lp_pa_pdu); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -7514,9 +7517,9 @@ presence_e dl_ueassociated_lp_pa_transport_ies_o::get_presence(const uint32_t& i case 147: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -7708,12 +7711,12 @@ SRSASN_CODE dl_ueassociated_lp_pa_transport_ies_o::value_c::unpack(cbit_ref& bre std::string dl_ueassociated_lp_pa_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "INTEGER (0..255)", "OCTET STRING"}; return convert_enum_idx(options, 4, value, "dl_ueassociated_lp_pa_transport_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; dl_ueassociated_lp_pa_transport_ies_container::dl_ueassociated_lp_pa_transport_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -7770,12 +7773,13 @@ SRSASN_CODE dl_ueassociated_lp_pa_transport_ies_container::unpack(cbit_ref& bref lp_pa_pdu.value = c.value.lp_pa_pdu(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -7906,49 +7910,36 @@ void erab_admitted_item_s::to_json(json_writer& j) const // E-RABAdmittedItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_admitted_item_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {20}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {20}; + return map_enum_number(options, 1, idx, "id"); } bool erab_admitted_item_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {20}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 20 == id; } crit_e erab_admitted_item_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 20: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 20) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_admitted_item_ies_o::value_c erab_admitted_item_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 20: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 20) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_admitted_item_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 20: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 20) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -7974,7 +7965,7 @@ SRSASN_CODE erab_admitted_item_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_admitted_item_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABAdmittedItem"}; + static const char* options[] = {"E-RABAdmittedItem"}; return convert_enum_idx(options, 1, value, "erab_admitted_item_ies_o::value_c::types"); } @@ -7998,20 +7989,19 @@ SRSASN_CODE erab_admitted_item_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_single_container_item_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 20: - nof_mandatory_ies--; - erab_admitted_item.id = c.id; - erab_admitted_item.crit = c.crit; - erab_admitted_item.value = c.value.erab_admitted_item(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 20) { + nof_mandatory_ies--; + erab_admitted_item.id = c.id; + erab_admitted_item.crit = c.crit; + erab_admitted_item.value = c.value.erab_admitted_item(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -8067,50 +8057,37 @@ void erab_failed_to_resume_item_resume_req_s::to_json(json_writer& j) const // E-RABFailedToResumeItemResumeReqIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_failed_to_resume_item_resume_req_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {236}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {236}; + return map_enum_number(options, 1, idx, "id"); } bool erab_failed_to_resume_item_resume_req_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {236}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 236 == id; } crit_e erab_failed_to_resume_item_resume_req_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 236: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 236) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_failed_to_resume_item_resume_req_ies_o::value_c erab_failed_to_resume_item_resume_req_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 236: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 236) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_failed_to_resume_item_resume_req_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 236: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 236) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -8136,7 +8113,7 @@ SRSASN_CODE erab_failed_to_resume_item_resume_req_ies_o::value_c::unpack(cbit_re std::string erab_failed_to_resume_item_resume_req_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABFailedToResumeItemResumeReq"}; + static const char* options[] = {"E-RABFailedToResumeItemResumeReq"}; return convert_enum_idx(options, 1, value, "erab_failed_to_resume_item_resume_req_ies_o::value_c::types"); } @@ -8183,50 +8160,37 @@ void erab_failed_to_resume_item_resume_res_s::to_json(json_writer& j) const // E-RABFailedToResumeItemResumeResIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_failed_to_resume_item_resume_res_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {238}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {238}; + return map_enum_number(options, 1, idx, "id"); } bool erab_failed_to_resume_item_resume_res_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {238}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 238 == id; } crit_e erab_failed_to_resume_item_resume_res_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 238: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 238) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_failed_to_resume_item_resume_res_ies_o::value_c erab_failed_to_resume_item_resume_res_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 238: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 238) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_failed_to_resume_item_resume_res_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 238: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 238) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -8252,7 +8216,7 @@ SRSASN_CODE erab_failed_to_resume_item_resume_res_ies_o::value_c::unpack(cbit_re std::string erab_failed_to_resume_item_resume_res_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABFailedToResumeItemResumeRes"}; + static const char* options[] = {"E-RABFailedToResumeItemResumeRes"}; return convert_enum_idx(options, 1, value, "erab_failed_to_resume_item_resume_res_ies_o::value_c::types"); } @@ -8279,20 +8243,19 @@ SRSASN_CODE erab_failed_to_resume_item_resume_req_ies_container::unpack(cbit_ref for (; nof_ies > 0; --nof_ies) { protocol_ie_single_container_item_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 236: - nof_mandatory_ies--; - erab_failed_to_resume_item_resume_req.id = c.id; - erab_failed_to_resume_item_resume_req.crit = c.crit; - erab_failed_to_resume_item_resume_req.value = c.value.erab_failed_to_resume_item_resume_req(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 236) { + nof_mandatory_ies--; + erab_failed_to_resume_item_resume_req.id = c.id; + erab_failed_to_resume_item_resume_req.crit = c.crit; + erab_failed_to_resume_item_resume_req.value = c.value.erab_failed_to_resume_item_resume_req(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -8328,20 +8291,19 @@ SRSASN_CODE erab_failed_to_resume_item_resume_res_ies_container::unpack(cbit_ref for (; nof_ies > 0; --nof_ies) { protocol_ie_single_container_item_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 238: - nof_mandatory_ies--; - erab_failed_to_resume_item_resume_res.id = c.id; - erab_failed_to_resume_item_resume_res.crit = c.crit; - erab_failed_to_resume_item_resume_res.value = c.value.erab_failed_to_resume_item_resume_res(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 238) { + nof_mandatory_ies--; + erab_failed_to_resume_item_resume_res.id = c.id; + erab_failed_to_resume_item_resume_res.crit = c.crit; + erab_failed_to_resume_item_resume_res.value = c.value.erab_failed_to_resume_item_resume_res(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -8397,50 +8359,37 @@ void erab_failed_to_setup_item_ho_req_ack_s::to_json(json_writer& j) const // E-RABFailedtoSetupItemHOReqAckIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_failedto_setup_item_ho_req_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {21}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {21}; + return map_enum_number(options, 1, idx, "id"); } bool erab_failedto_setup_item_ho_req_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {21}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 21 == id; } crit_e erab_failedto_setup_item_ho_req_ack_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 21: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 21) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_failedto_setup_item_ho_req_ack_ies_o::value_c erab_failedto_setup_item_ho_req_ack_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 21: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 21) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_failedto_setup_item_ho_req_ack_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 21: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 21) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -8466,7 +8415,7 @@ SRSASN_CODE erab_failedto_setup_item_ho_req_ack_ies_o::value_c::unpack(cbit_ref& std::string erab_failedto_setup_item_ho_req_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABFailedToSetupItemHOReqAck"}; + static const char* options[] = {"E-RABFailedToSetupItemHOReqAck"}; return convert_enum_idx(options, 1, value, "erab_failedto_setup_item_ho_req_ack_ies_o::value_c::types"); } @@ -8493,20 +8442,19 @@ SRSASN_CODE erab_failedto_setup_item_ho_req_ack_ies_container::unpack(cbit_ref& for (; nof_ies > 0; --nof_ies) { protocol_ie_single_container_item_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 21: - nof_mandatory_ies--; - erab_failedto_setup_item_ho_req_ack.id = c.id; - erab_failedto_setup_item_ho_req_ack.crit = c.crit; - erab_failedto_setup_item_ho_req_ack.value = c.value.erab_failedto_setup_item_ho_req_ack(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 21) { + nof_mandatory_ies--; + erab_failedto_setup_item_ho_req_ack.id = c.id; + erab_failedto_setup_item_ho_req_ack.crit = c.crit; + erab_failedto_setup_item_ho_req_ack.value = c.value.erab_failedto_setup_item_ho_req_ack(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -8522,7 +8470,7 @@ void erab_failedto_setup_item_ho_req_ack_ies_container::to_json(json_writer& j) // DL-Forwarding ::= ENUMERATED std::string dl_forwarding_opts::to_string() const { - static constexpr const char* options[] = {"dL-Forwarding-proposed"}; + static const char* options[] = {"dL-Forwarding-proposed"}; return convert_enum_idx(options, 1, value, "dl_forwarding_e"); } @@ -8576,49 +8524,36 @@ void erab_info_list_item_s::to_json(json_writer& j) const // E-RABInformationListIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_info_list_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {78}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {78}; + return map_enum_number(options, 1, idx, "id"); } bool erab_info_list_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {78}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 78 == id; } crit_e erab_info_list_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 78: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 78) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_info_list_ies_o::value_c erab_info_list_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 78: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 78) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_info_list_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 78: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 78) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -8644,11 +8579,11 @@ SRSASN_CODE erab_info_list_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_info_list_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABInformationListItem"}; + static const char* options[] = {"E-RABInformationListItem"}; return convert_enum_idx(options, 1, value, "erab_info_list_ies_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // E-RABItem ::= SEQUENCE SRSASN_CODE erab_item_s::pack(bit_ref& bref) const @@ -8693,49 +8628,36 @@ void erab_item_s::to_json(json_writer& j) const // E-RABItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_item_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {35}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {35}; + return map_enum_number(options, 1, idx, "id"); } bool erab_item_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {35}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 35 == id; } crit_e erab_item_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 35: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 35) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_item_ies_o::value_c erab_item_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 35: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 35) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_item_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 35: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 35) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -8761,7 +8683,7 @@ SRSASN_CODE erab_item_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_item_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABItem"}; + static const char* options[] = {"E-RABItem"}; return convert_enum_idx(options, 1, value, "erab_item_ies_o::value_c::types"); } @@ -8862,7 +8784,7 @@ void erab_level_qos_params_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // E-RABModifyItemBearerModConf ::= SEQUENCE SRSASN_CODE erab_modify_item_bearer_mod_conf_s::pack(bit_ref& bref) const @@ -8903,49 +8825,36 @@ void erab_modify_item_bearer_mod_conf_s::to_json(json_writer& j) const // E-RABModifyItemBearerModConfIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_modify_item_bearer_mod_conf_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {204}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {204}; + return map_enum_number(options, 1, idx, "id"); } bool erab_modify_item_bearer_mod_conf_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {204}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 204 == id; } crit_e erab_modify_item_bearer_mod_conf_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 204: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 204) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_modify_item_bearer_mod_conf_ies_o::value_c erab_modify_item_bearer_mod_conf_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 204: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 204) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_modify_item_bearer_mod_conf_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 204: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 204) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -8971,23 +8880,23 @@ SRSASN_CODE erab_modify_item_bearer_mod_conf_ies_o::value_c::unpack(cbit_ref& br std::string erab_modify_item_bearer_mod_conf_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABModifyItemBearerModConf"}; + static const char* options[] = {"E-RABModifyItemBearerModConf"}; return convert_enum_idx(options, 1, value, "erab_modify_item_bearer_mod_conf_ies_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // E-RABModificationConfirmIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_mod_confirm_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 203, 205, 210, 58, 146}; - return convert_enum_idx(options, 7, idx, "id"); + static const uint32_t options[] = {0, 8, 203, 205, 210, 58, 146}; + return map_enum_number(options, 7, idx, "id"); } bool erab_mod_confirm_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 203, 205, 210, 58, 146}; - for (uint32_t i = 0; i < 7; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 203, 205, 210, 58, 146}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -9011,9 +8920,9 @@ crit_e erab_mod_confirm_ies_o::get_crit(const uint32_t& id) case 146: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_mod_confirm_ies_o::value_c erab_mod_confirm_ies_o::get_value(const uint32_t& id) { @@ -9041,7 +8950,7 @@ erab_mod_confirm_ies_o::value_c erab_mod_confirm_ies_o::get_value(const uint32_t ret.set(value_c::types::csg_membership_status); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -9063,9 +8972,9 @@ presence_e erab_mod_confirm_ies_o::get_presence(const uint32_t& id) case 146: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -9267,22 +9176,22 @@ void erab_mod_confirm_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_modify_list_bearer_mod_conf: j.start_array("E-RABModifyListBearerModConf"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::erab_failed_to_modify_list_bearer_mod_conf: j.start_array("E-RABList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::erab_to_be_released_list_bearer_mod_conf: j.start_array("E-RABList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -9363,17 +9272,17 @@ SRSASN_CODE erab_mod_confirm_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_mod_confirm_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "E-RABModifyListBearerModConf", - "E-RABList", - "E-RABList", - "CriticalityDiagnostics", - "CSGMembershipStatus"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "E-RABModifyListBearerModConf", + "E-RABList", + "E-RABList", + "CriticalityDiagnostics", + "CSGMembershipStatus"}; return convert_enum_idx(options, 7, value, "erab_mod_confirm_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; erab_mod_confirm_ies_container::erab_mod_confirm_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -9469,12 +9378,13 @@ SRSASN_CODE erab_mod_confirm_ies_container::unpack(cbit_ref& bref) csg_membership_status.value = c.value.csg_membership_status(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -9619,50 +9529,37 @@ void erab_to_be_modified_item_bearer_mod_ind_s::to_json(json_writer& j) const // E-RABNotToBeModifiedItemBearerModIndIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_not_to_be_modified_item_bearer_mod_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {202}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {202}; + return map_enum_number(options, 1, idx, "id"); } bool erab_not_to_be_modified_item_bearer_mod_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {202}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 202 == id; } crit_e erab_not_to_be_modified_item_bearer_mod_ind_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 202: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 202) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_not_to_be_modified_item_bearer_mod_ind_ies_o::value_c erab_not_to_be_modified_item_bearer_mod_ind_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 202: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 202) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_not_to_be_modified_item_bearer_mod_ind_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 202: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 202) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -9688,57 +9585,44 @@ SRSASN_CODE erab_not_to_be_modified_item_bearer_mod_ind_ies_o::value_c::unpack(c std::string erab_not_to_be_modified_item_bearer_mod_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABNotToBeModifiedItemBearerModInd"}; + static const char* options[] = {"E-RABNotToBeModifiedItemBearerModInd"}; return convert_enum_idx(options, 1, value, "erab_not_to_be_modified_item_bearer_mod_ind_ies_o::value_c::types"); } // E-RABToBeModifiedItemBearerModIndIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_to_be_modified_item_bearer_mod_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {200}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {200}; + return map_enum_number(options, 1, idx, "id"); } bool erab_to_be_modified_item_bearer_mod_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {200}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 200 == id; } crit_e erab_to_be_modified_item_bearer_mod_ind_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 200: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 200) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_to_be_modified_item_bearer_mod_ind_ies_o::value_c erab_to_be_modified_item_bearer_mod_ind_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 200: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 200) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_to_be_modified_item_bearer_mod_ind_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 200: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 200) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -9764,7 +9648,7 @@ SRSASN_CODE erab_to_be_modified_item_bearer_mod_ind_ies_o::value_c::unpack(cbit_ std::string erab_to_be_modified_item_bearer_mod_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABToBeModifiedItemBearerModInd"}; + static const char* options[] = {"E-RABToBeModifiedItemBearerModInd"}; return convert_enum_idx(options, 1, value, "erab_to_be_modified_item_bearer_mod_ind_ies_o::value_c::types"); } @@ -9791,20 +9675,19 @@ SRSASN_CODE erab_not_to_be_modified_item_bearer_mod_ind_ies_container::unpack(cb for (; nof_ies > 0; --nof_ies) { protocol_ie_single_container_item_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 202: - nof_mandatory_ies--; - erab_not_to_be_modified_item_bearer_mod_ind.id = c.id; - erab_not_to_be_modified_item_bearer_mod_ind.crit = c.crit; - erab_not_to_be_modified_item_bearer_mod_ind.value = c.value.erab_not_to_be_modified_item_bearer_mod_ind(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 202) { + nof_mandatory_ies--; + erab_not_to_be_modified_item_bearer_mod_ind.id = c.id; + erab_not_to_be_modified_item_bearer_mod_ind.crit = c.crit; + erab_not_to_be_modified_item_bearer_mod_ind.value = c.value.erab_not_to_be_modified_item_bearer_mod_ind(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -9840,20 +9723,19 @@ SRSASN_CODE erab_to_be_modified_item_bearer_mod_ind_ies_container::unpack(cbit_r for (; nof_ies > 0; --nof_ies) { protocol_ie_single_container_item_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 200: - nof_mandatory_ies--; - erab_to_be_modified_item_bearer_mod_ind.id = c.id; - erab_to_be_modified_item_bearer_mod_ind.crit = c.crit; - erab_to_be_modified_item_bearer_mod_ind.value = c.value.erab_to_be_modified_item_bearer_mod_ind(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 200) { + nof_mandatory_ies--; + erab_to_be_modified_item_bearer_mod_ind.id = c.id; + erab_to_be_modified_item_bearer_mod_ind.crit = c.crit; + erab_to_be_modified_item_bearer_mod_ind.value = c.value.erab_to_be_modified_item_bearer_mod_ind(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -9916,14 +9798,14 @@ void tunnel_info_s::to_json(json_writer& j) const // E-RABModificationIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_mod_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 199, 201, 226, 176}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {0, 8, 199, 201, 226, 176}; + return map_enum_number(options, 6, idx, "id"); } bool erab_mod_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 199, 201, 226, 176}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 199, 201, 226, 176}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -9945,9 +9827,9 @@ crit_e erab_mod_ind_ies_o::get_crit(const uint32_t& id) case 176: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_mod_ind_ies_o::value_c erab_mod_ind_ies_o::get_value(const uint32_t& id) { @@ -9972,7 +9854,7 @@ erab_mod_ind_ies_o::value_c erab_mod_ind_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::tunnel_info_for_bbf); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -9992,9 +9874,9 @@ presence_e erab_mod_ind_ies_o::get_presence(const uint32_t& id) case 176: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -10259,12 +10141,12 @@ SRSASN_CODE erab_mod_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_mod_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "", "", "CSGMembershipInfo", "TunnelInformation"}; return convert_enum_idx(options, 6, value, "erab_mod_ind_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; erab_mod_ind_ies_container::erab_mod_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -10346,12 +10228,13 @@ SRSASN_CODE erab_mod_ind_ies_container::unpack(cbit_ref& bref) tunnel_info_for_bbf.value = c.value.tunnel_info_for_bbf(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -10442,49 +10325,36 @@ void erab_modify_item_bearer_mod_res_s::to_json(json_writer& j) const // E-RABModifyItemBearerModResIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_modify_item_bearer_mod_res_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {37}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {37}; + return map_enum_number(options, 1, idx, "id"); } bool erab_modify_item_bearer_mod_res_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {37}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 37 == id; } crit_e erab_modify_item_bearer_mod_res_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 37: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 37) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_modify_item_bearer_mod_res_ies_o::value_c erab_modify_item_bearer_mod_res_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 37: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 37) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_modify_item_bearer_mod_res_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 37: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 37) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -10510,11 +10380,11 @@ SRSASN_CODE erab_modify_item_bearer_mod_res_ies_o::value_c::unpack(cbit_ref& bre std::string erab_modify_item_bearer_mod_res_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABModifyItemBearerModRes"}; + static const char* options[] = {"E-RABModifyItemBearerModRes"}; return convert_enum_idx(options, 1, value, "erab_modify_item_bearer_mod_res_ies_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // TransportInformation ::= SEQUENCE SRSASN_CODE transport_info_s::pack(bit_ref& bref) const @@ -10544,50 +10414,37 @@ void transport_info_s::to_json(json_writer& j) const // E-RABToBeModifyItemBearerModReqExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t erab_to_be_modify_item_bearer_mod_req_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {185}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {185}; + return map_enum_number(options, 1, idx, "id"); } bool erab_to_be_modify_item_bearer_mod_req_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {185}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 185 == id; } crit_e erab_to_be_modify_item_bearer_mod_req_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 185: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 185) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_to_be_modify_item_bearer_mod_req_ext_ies_o::ext_c erab_to_be_modify_item_bearer_mod_req_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 185: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 185) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_to_be_modify_item_bearer_mod_req_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 185: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 185) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -10613,11 +10470,11 @@ SRSASN_CODE erab_to_be_modify_item_bearer_mod_req_ext_ies_o::ext_c::unpack(cbit_ std::string erab_to_be_modify_item_bearer_mod_req_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"TransportInformation"}; + static const char* options[] = {"TransportInformation"}; return convert_enum_idx(options, 1, value, "erab_to_be_modify_item_bearer_mod_req_ext_ies_o::ext_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; erab_to_be_modify_item_bearer_mod_req_ext_ies_container::erab_to_be_modify_item_bearer_mod_req_ext_ies_container() : transport_info(185, crit_e::reject) @@ -10643,16 +10500,14 @@ SRSASN_CODE erab_to_be_modify_item_bearer_mod_req_ext_ies_container::unpack(cbit for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 185: - transport_info_present = true; - transport_info.id = c.id; - transport_info.crit = c.crit; - transport_info.ext = c.ext_value.transport_info(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 185) { + transport_info_present = true; + transport_info.id = c.id; + transport_info.crit = c.crit; + transport_info.ext = c.ext_value.transport_info(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -10714,50 +10569,37 @@ void erab_to_be_modified_item_bearer_mod_req_s::to_json(json_writer& j) const // E-RABToBeModifiedItemBearerModReqIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_to_be_modified_item_bearer_mod_req_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {36}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {36}; + return map_enum_number(options, 1, idx, "id"); } bool erab_to_be_modified_item_bearer_mod_req_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {36}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 36 == id; } crit_e erab_to_be_modified_item_bearer_mod_req_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 36: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 36) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_to_be_modified_item_bearer_mod_req_ies_o::value_c erab_to_be_modified_item_bearer_mod_req_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 36: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 36) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_to_be_modified_item_bearer_mod_req_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 36: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 36) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -10783,11 +10625,11 @@ SRSASN_CODE erab_to_be_modified_item_bearer_mod_req_ies_o::value_c::unpack(cbit_ std::string erab_to_be_modified_item_bearer_mod_req_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABToBeModifiedItemBearerModReq"}; + static const char* options[] = {"E-RABToBeModifiedItemBearerModReq"}; return convert_enum_idx(options, 1, value, "erab_to_be_modified_item_bearer_mod_req_ies_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // UEAggregateMaximumBitrate ::= SEQUENCE SRSASN_CODE ue_aggregate_maximum_bitrate_s::pack(bit_ref& bref) const @@ -10831,14 +10673,14 @@ void ue_aggregate_maximum_bitrate_s::to_json(json_writer& j) const // E-RABModifyRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_modify_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 66, 30}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 66, 30}; + return map_enum_number(options, 4, idx, "id"); } bool erab_modify_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 66, 30}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 66, 30}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -10856,9 +10698,9 @@ crit_e erab_modify_request_ies_o::get_crit(const uint32_t& id) case 30: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_modify_request_ies_o::value_c erab_modify_request_ies_o::get_value(const uint32_t& id) { @@ -10877,7 +10719,7 @@ erab_modify_request_ies_o::value_c erab_modify_request_ies_o::get_value(const ui ret.set(value_c::types::erab_to_be_modified_list_bearer_mod_req); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -10893,9 +10735,9 @@ presence_e erab_modify_request_ies_o::get_presence(const uint32_t& id) case 30: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -11040,8 +10882,8 @@ void erab_modify_request_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_to_be_modified_list_bearer_mod_req: j.start_array("E-RABToBeModifiedListBearerModReq"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -11097,14 +10939,14 @@ SRSASN_CODE erab_modify_request_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_modify_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "UEAggregateMaximumBitrate", - "E-RABToBeModifiedListBearerModReq"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "UEAggregateMaximumBitrate", + "E-RABToBeModifiedListBearerModReq"}; return convert_enum_idx(options, 4, value, "erab_modify_request_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; erab_modify_request_ies_container::erab_modify_request_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -11164,12 +11006,13 @@ SRSASN_CODE erab_modify_request_ies_container::unpack(cbit_ref& bref) erab_to_be_modified_list_bearer_mod_req.value = c.value.erab_to_be_modified_list_bearer_mod_req(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -11216,14 +11059,14 @@ void erab_modify_request_s::to_json(json_writer& j) const // E-RABModifyResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_modify_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 31, 32, 58}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {0, 8, 31, 32, 58}; + return map_enum_number(options, 5, idx, "id"); } bool erab_modify_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 31, 32, 58}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 31, 32, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -11243,9 +11086,9 @@ crit_e erab_modify_resp_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_modify_resp_ies_o::value_c erab_modify_resp_ies_o::get_value(const uint32_t& id) { @@ -11267,7 +11110,7 @@ erab_modify_resp_ies_o::value_c erab_modify_resp_ies_o::get_value(const uint32_t ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -11285,9 +11128,9 @@ presence_e erab_modify_resp_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -11449,15 +11292,15 @@ void erab_modify_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_modify_list_bearer_mod_res: j.start_array("E-RABModifyListBearerModRes"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::erab_failed_to_modify_list: j.start_array("E-RABList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -11523,15 +11366,15 @@ SRSASN_CODE erab_modify_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_modify_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "E-RABModifyListBearerModRes", - "E-RABList", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "E-RABModifyListBearerModRes", + "E-RABList", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 5, value, "erab_modify_resp_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; erab_modify_resp_ies_container::erab_modify_resp_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -11605,12 +11448,13 @@ SRSASN_CODE erab_modify_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -11663,14 +11507,14 @@ void erab_modify_resp_s::to_json(json_writer& j) const // E-RABReleaseCommandIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_release_cmd_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 66, 33, 26}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {0, 8, 66, 33, 26}; + return map_enum_number(options, 5, idx, "id"); } bool erab_release_cmd_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 66, 33, 26}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 66, 33, 26}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -11690,9 +11534,9 @@ crit_e erab_release_cmd_ies_o::get_crit(const uint32_t& id) case 26: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_release_cmd_ies_o::value_c erab_release_cmd_ies_o::get_value(const uint32_t& id) { @@ -11714,7 +11558,7 @@ erab_release_cmd_ies_o::value_c erab_release_cmd_ies_o::get_value(const uint32_t ret.set(value_c::types::nas_pdu); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -11732,9 +11576,9 @@ presence_e erab_release_cmd_ies_o::get_presence(const uint32_t& id) case 26: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -11900,8 +11744,8 @@ void erab_release_cmd_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_to_be_released_list: j.start_array("E-RABList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -11966,12 +11810,12 @@ SRSASN_CODE erab_release_cmd_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_release_cmd_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "UEAggregateMaximumBitrate", "E-RABList", "OCTET STRING"}; return convert_enum_idx(options, 5, value, "erab_release_cmd_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; erab_release_cmd_ies_container::erab_release_cmd_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -12042,12 +11886,13 @@ SRSASN_CODE erab_release_cmd_ies_container::unpack(cbit_ref& bref) nas_pdu.value = c.value.nas_pdu(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -12139,14 +11984,14 @@ void user_location_info_s::to_json(json_writer& j) const // E-RABReleaseIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_release_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 110, 189}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 110, 189}; + return map_enum_number(options, 4, idx, "id"); } bool erab_release_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 110, 189}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 110, 189}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -12164,9 +12009,9 @@ crit_e erab_release_ind_ies_o::get_crit(const uint32_t& id) case 189: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_release_ind_ies_o::value_c erab_release_ind_ies_o::get_value(const uint32_t& id) { @@ -12185,7 +12030,7 @@ erab_release_ind_ies_o::value_c erab_release_ind_ies_o::get_value(const uint32_t ret.set(value_c::types::user_location_info); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -12201,9 +12046,9 @@ presence_e erab_release_ind_ies_o::get_presence(const uint32_t& id) case 189: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -12343,8 +12188,8 @@ void erab_release_ind_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_released_list: j.start_array("E-RABList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -12404,12 +12249,12 @@ SRSASN_CODE erab_release_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_release_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "E-RABList", "UserLocationInformation"}; return convert_enum_idx(options, 4, value, "erab_release_ind_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; erab_release_ind_ies_container::erab_release_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -12469,12 +12314,13 @@ SRSASN_CODE erab_release_ind_ies_container::unpack(cbit_ref& bref) user_location_info.value = c.value.user_location_info(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -12557,49 +12403,36 @@ void erab_release_item_bearer_rel_comp_s::to_json(json_writer& j) const // E-RABReleaseItemBearerRelCompIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_release_item_bearer_rel_comp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {15}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {15}; + return map_enum_number(options, 1, idx, "id"); } bool erab_release_item_bearer_rel_comp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {15}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 15 == id; } crit_e erab_release_item_bearer_rel_comp_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 15: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 15) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_release_item_bearer_rel_comp_ies_o::value_c erab_release_item_bearer_rel_comp_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 15: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 15) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_release_item_bearer_rel_comp_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 15: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 15) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -12625,23 +12458,23 @@ SRSASN_CODE erab_release_item_bearer_rel_comp_ies_o::value_c::unpack(cbit_ref& b std::string erab_release_item_bearer_rel_comp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABReleaseItemBearerRelComp"}; + static const char* options[] = {"E-RABReleaseItemBearerRelComp"}; return convert_enum_idx(options, 1, value, "erab_release_item_bearer_rel_comp_ies_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // E-RABReleaseResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_release_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 69, 34, 58, 189}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {0, 8, 69, 34, 58, 189}; + return map_enum_number(options, 6, idx, "id"); } bool erab_release_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 69, 34, 58, 189}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 69, 34, 58, 189}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -12663,9 +12496,9 @@ crit_e erab_release_resp_ies_o::get_crit(const uint32_t& id) case 189: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_release_resp_ies_o::value_c erab_release_resp_ies_o::get_value(const uint32_t& id) { @@ -12690,7 +12523,7 @@ erab_release_resp_ies_o::value_c erab_release_resp_ies_o::get_value(const uint32 ret.set(value_c::types::user_location_info); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -12710,9 +12543,9 @@ presence_e erab_release_resp_ies_o::get_presence(const uint32_t& id) case 189: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -12896,15 +12729,15 @@ void erab_release_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_release_list_bearer_rel_comp: j.start_array("E-RABReleaseListBearerRelComp"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::erab_failed_to_release_list: j.start_array("E-RABList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -12980,16 +12813,16 @@ SRSASN_CODE erab_release_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_release_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "E-RABReleaseListBearerRelComp", - "E-RABList", - "CriticalityDiagnostics", - "UserLocationInformation"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "E-RABReleaseListBearerRelComp", + "E-RABList", + "CriticalityDiagnostics", + "UserLocationInformation"}; return convert_enum_idx(options, 6, value, "erab_release_resp_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; erab_release_resp_ies_container::erab_release_resp_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -13074,12 +12907,13 @@ SRSASN_CODE erab_release_resp_ies_container::unpack(cbit_ref& bref) user_location_info.value = c.value.user_location_info(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -13178,49 +13012,36 @@ void erab_setup_item_bearer_su_res_s::to_json(json_writer& j) const // E-RABSetupItemBearerSUResIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_setup_item_bearer_su_res_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {39}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {39}; + return map_enum_number(options, 1, idx, "id"); } bool erab_setup_item_bearer_su_res_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {39}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 39 == id; } crit_e erab_setup_item_bearer_su_res_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 39: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 39) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_setup_item_bearer_su_res_ies_o::value_c erab_setup_item_bearer_su_res_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 39: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 39) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_setup_item_bearer_su_res_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 39: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 39) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -13246,7 +13067,7 @@ SRSASN_CODE erab_setup_item_bearer_su_res_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_setup_item_bearer_su_res_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABSetupItemBearerSURes"}; + static const char* options[] = {"E-RABSetupItemBearerSURes"}; return convert_enum_idx(options, 1, value, "erab_setup_item_bearer_su_res_ies_o::value_c::types"); } @@ -13295,49 +13116,36 @@ void erab_setup_item_ctxt_su_res_s::to_json(json_writer& j) const // E-RABSetupItemCtxtSUResIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_setup_item_ctxt_su_res_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {50}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {50}; + return map_enum_number(options, 1, idx, "id"); } bool erab_setup_item_ctxt_su_res_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {50}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 50 == id; } crit_e erab_setup_item_ctxt_su_res_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 50: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 50) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_setup_item_ctxt_su_res_ies_o::value_c erab_setup_item_ctxt_su_res_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 50: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 50) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_setup_item_ctxt_su_res_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 50: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 50) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -13363,32 +13171,32 @@ SRSASN_CODE erab_setup_item_ctxt_su_res_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_setup_item_ctxt_su_res_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABSetupItemCtxtSURes"}; + static const char* options[] = {"E-RABSetupItemCtxtSURes"}; return convert_enum_idx(options, 1, value, "erab_setup_item_ctxt_su_res_ies_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // BearerType ::= ENUMERATED std::string bearer_type_opts::to_string() const { - static constexpr const char* options[] = {"non-IP"}; + static const char* options[] = {"non-IP"}; return convert_enum_idx(options, 1, value, "bearer_type_e"); } // E-RABToBeSetupItemBearerSUReqExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t erab_to_be_setup_item_bearer_su_req_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {156, 183, 233}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {156, 183, 233}; + return map_enum_number(options, 3, idx, "id"); } bool erab_to_be_setup_item_bearer_su_req_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {156, 183, 233}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {156, 183, 233}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -13404,9 +13212,9 @@ crit_e erab_to_be_setup_item_bearer_su_req_ext_ies_o::get_crit(const uint32_t& i case 233: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_to_be_setup_item_bearer_su_req_ext_ies_o::ext_c erab_to_be_setup_item_bearer_su_req_ext_ies_o::get_ext(const uint32_t& id) @@ -13423,7 +13231,7 @@ erab_to_be_setup_item_bearer_su_req_ext_ies_o::get_ext(const uint32_t& id) ret.set(ext_c::types::bearer_type); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -13437,9 +13245,9 @@ presence_e erab_to_be_setup_item_bearer_su_req_ext_ies_o::get_presence(const uin case 233: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -13609,11 +13417,11 @@ SRSASN_CODE erab_to_be_setup_item_bearer_su_req_ext_ies_o::ext_c::unpack(cbit_re std::string erab_to_be_setup_item_bearer_su_req_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"OCTET STRING", "OCTET STRING", "BearerType"}; + static const char* options[] = {"OCTET STRING", "OCTET STRING", "BearerType"}; return convert_enum_idx(options, 3, value, "erab_to_be_setup_item_bearer_su_req_ext_ies_o::ext_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; erab_to_be_setup_item_bearer_su_req_ext_ies_container::erab_to_be_setup_item_bearer_su_req_ext_ies_container() : correlation_id(156, crit_e::ignore), @@ -13669,7 +13477,7 @@ SRSASN_CODE erab_to_be_setup_item_bearer_su_req_ext_ies_container::unpack(cbit_r bearer_type.ext = c.ext_value.bearer_type(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -13746,50 +13554,37 @@ void erab_to_be_setup_item_bearer_su_req_s::to_json(json_writer& j) const // E-RABToBeSetupItemBearerSUReqIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_to_be_setup_item_bearer_su_req_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {17}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {17}; + return map_enum_number(options, 1, idx, "id"); } bool erab_to_be_setup_item_bearer_su_req_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {17}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 17 == id; } crit_e erab_to_be_setup_item_bearer_su_req_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 17: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 17) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_to_be_setup_item_bearer_su_req_ies_o::value_c erab_to_be_setup_item_bearer_su_req_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 17: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 17) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_to_be_setup_item_bearer_su_req_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 17: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 17) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -13815,23 +13610,23 @@ SRSASN_CODE erab_to_be_setup_item_bearer_su_req_ies_o::value_c::unpack(cbit_ref& std::string erab_to_be_setup_item_bearer_su_req_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABToBeSetupItemBearerSUReq"}; + static const char* options[] = {"E-RABToBeSetupItemBearerSUReq"}; return convert_enum_idx(options, 1, value, "erab_to_be_setup_item_bearer_su_req_ies_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // E-RABSetupRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_setup_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 66, 16}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 66, 16}; + return map_enum_number(options, 4, idx, "id"); } bool erab_setup_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 66, 16}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 66, 16}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -13849,9 +13644,9 @@ crit_e erab_setup_request_ies_o::get_crit(const uint32_t& id) case 16: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_setup_request_ies_o::value_c erab_setup_request_ies_o::get_value(const uint32_t& id) { @@ -13870,7 +13665,7 @@ erab_setup_request_ies_o::value_c erab_setup_request_ies_o::get_value(const uint ret.set(value_c::types::erab_to_be_setup_list_bearer_su_req); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -13886,9 +13681,9 @@ presence_e erab_setup_request_ies_o::get_presence(const uint32_t& id) case 16: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -14033,8 +13828,8 @@ void erab_setup_request_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_to_be_setup_list_bearer_su_req: j.start_array("E-RABToBeSetupListBearerSUReq"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -14090,12 +13885,12 @@ SRSASN_CODE erab_setup_request_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_setup_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "UEAggregateMaximumBitrate", "E-RABToBeSetupListBearerSUReq"}; return convert_enum_idx(options, 4, value, "erab_setup_request_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; erab_setup_request_ies_container::erab_setup_request_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -14155,12 +13950,13 @@ SRSASN_CODE erab_setup_request_ies_container::unpack(cbit_ref& bref) erab_to_be_setup_list_bearer_su_req.value = c.value.erab_to_be_setup_list_bearer_su_req(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -14207,14 +14003,14 @@ void erab_setup_request_s::to_json(json_writer& j) const // E-RABSetupResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_setup_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 28, 29, 58}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {0, 8, 28, 29, 58}; + return map_enum_number(options, 5, idx, "id"); } bool erab_setup_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 28, 29, 58}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 28, 29, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -14234,9 +14030,9 @@ crit_e erab_setup_resp_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_setup_resp_ies_o::value_c erab_setup_resp_ies_o::get_value(const uint32_t& id) { @@ -14258,7 +14054,7 @@ erab_setup_resp_ies_o::value_c erab_setup_resp_ies_o::get_value(const uint32_t& ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -14276,9 +14072,9 @@ presence_e erab_setup_resp_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -14439,15 +14235,15 @@ void erab_setup_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_setup_list_bearer_su_res: j.start_array("E-RABSetupListBearerSURes"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::erab_failed_to_setup_list_bearer_su_res: j.start_array("E-RABList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -14513,15 +14309,15 @@ SRSASN_CODE erab_setup_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_setup_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "E-RABSetupListBearerSURes", - "E-RABList", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "E-RABSetupListBearerSURes", + "E-RABList", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 5, value, "erab_setup_resp_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; erab_setup_resp_ies_container::erab_setup_resp_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -14595,12 +14391,13 @@ SRSASN_CODE erab_setup_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -14653,14 +14450,14 @@ void erab_setup_resp_s::to_json(json_writer& j) const // E-RABToBeSetupItemCtxtSUReqExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t erab_to_be_setup_item_ctxt_su_req_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {156, 183, 233}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {156, 183, 233}; + return map_enum_number(options, 3, idx, "id"); } bool erab_to_be_setup_item_ctxt_su_req_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {156, 183, 233}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {156, 183, 233}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -14676,9 +14473,9 @@ crit_e erab_to_be_setup_item_ctxt_su_req_ext_ies_o::get_crit(const uint32_t& id) case 233: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_to_be_setup_item_ctxt_su_req_ext_ies_o::ext_c erab_to_be_setup_item_ctxt_su_req_ext_ies_o::get_ext(const uint32_t& id) @@ -14695,7 +14492,7 @@ erab_to_be_setup_item_ctxt_su_req_ext_ies_o::get_ext(const uint32_t& id) ret.set(ext_c::types::bearer_type); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -14709,9 +14506,9 @@ presence_e erab_to_be_setup_item_ctxt_su_req_ext_ies_o::get_presence(const uint3 case 233: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -14881,11 +14678,11 @@ SRSASN_CODE erab_to_be_setup_item_ctxt_su_req_ext_ies_o::ext_c::unpack(cbit_ref& std::string erab_to_be_setup_item_ctxt_su_req_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"OCTET STRING", "OCTET STRING", "BearerType"}; + static const char* options[] = {"OCTET STRING", "OCTET STRING", "BearerType"}; return convert_enum_idx(options, 3, value, "erab_to_be_setup_item_ctxt_su_req_ext_ies_o::ext_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; erab_to_be_setup_item_ctxt_su_req_ext_ies_container::erab_to_be_setup_item_ctxt_su_req_ext_ies_container() : correlation_id(156, crit_e::ignore), @@ -14941,7 +14738,7 @@ SRSASN_CODE erab_to_be_setup_item_ctxt_su_req_ext_ies_container::unpack(cbit_ref bearer_type.ext = c.ext_value.bearer_type(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -15026,49 +14823,36 @@ void erab_to_be_setup_item_ctxt_su_req_s::to_json(json_writer& j) const // E-RABToBeSetupItemCtxtSUReqIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_to_be_setup_item_ctxt_su_req_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {52}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {52}; + return map_enum_number(options, 1, idx, "id"); } bool erab_to_be_setup_item_ctxt_su_req_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {52}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 52 == id; } crit_e erab_to_be_setup_item_ctxt_su_req_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 52: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 52) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_to_be_setup_item_ctxt_su_req_ies_o::value_c erab_to_be_setup_item_ctxt_su_req_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 52: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 52) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_to_be_setup_item_ctxt_su_req_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 52: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 52) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -15094,28 +14878,28 @@ SRSASN_CODE erab_to_be_setup_item_ctxt_su_req_ies_o::value_c::unpack(cbit_ref& b std::string erab_to_be_setup_item_ctxt_su_req_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABToBeSetupItemCtxtSUReq"}; + static const char* options[] = {"E-RABToBeSetupItemCtxtSUReq"}; return convert_enum_idx(options, 1, value, "erab_to_be_setup_item_ctxt_su_req_ies_o::value_c::types"); } // Data-Forwarding-Not-Possible ::= ENUMERATED std::string data_forwarding_not_possible_opts::to_string() const { - static constexpr const char* options[] = {"data-Forwarding-not-Possible"}; + static const char* options[] = {"data-Forwarding-not-Possible"}; return convert_enum_idx(options, 1, value, "data_forwarding_not_possible_e"); } // E-RABToBeSetupItemHOReq-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t erab_to_be_setup_item_ho_req_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {143, 233}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {143, 233}; + return map_enum_number(options, 2, idx, "id"); } bool erab_to_be_setup_item_ho_req_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {143, 233}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {143, 233}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -15129,9 +14913,9 @@ crit_e erab_to_be_setup_item_ho_req_ext_ies_o::get_crit(const uint32_t& id) case 233: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } erab_to_be_setup_item_ho_req_ext_ies_o::ext_c erab_to_be_setup_item_ho_req_ext_ies_o::get_ext(const uint32_t& id) { @@ -15144,7 +14928,7 @@ erab_to_be_setup_item_ho_req_ext_ies_o::ext_c erab_to_be_setup_item_ho_req_ext_i ret.set(ext_c::types::bearer_type); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -15156,9 +14940,9 @@ presence_e erab_to_be_setup_item_ho_req_ext_ies_o::get_presence(const uint32_t& case 233: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -15277,11 +15061,11 @@ SRSASN_CODE erab_to_be_setup_item_ho_req_ext_ies_o::ext_c::unpack(cbit_ref& bref std::string erab_to_be_setup_item_ho_req_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Data-Forwarding-Not-Possible", "BearerType"}; + static const char* options[] = {"Data-Forwarding-Not-Possible", "BearerType"}; return convert_enum_idx(options, 2, value, "erab_to_be_setup_item_ho_req_ext_ies_o::ext_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; erab_to_be_setup_item_ho_req_ext_ies_container::erab_to_be_setup_item_ho_req_ext_ies_container() : data_forwarding_not_possible(143, crit_e::ignore), @@ -15326,7 +15110,7 @@ SRSASN_CODE erab_to_be_setup_item_ho_req_ext_ies_container::unpack(cbit_ref& bre bearer_type.ext = c.ext_value.bearer_type(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -15396,49 +15180,36 @@ void erab_to_be_setup_item_ho_req_s::to_json(json_writer& j) const // E-RABToBeSetupItemHOReqIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_to_be_setup_item_ho_req_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {27}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {27}; + return map_enum_number(options, 1, idx, "id"); } bool erab_to_be_setup_item_ho_req_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {27}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 27 == id; } crit_e erab_to_be_setup_item_ho_req_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 27: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 27) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_to_be_setup_item_ho_req_ies_o::value_c erab_to_be_setup_item_ho_req_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 27: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 27) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_to_be_setup_item_ho_req_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 27: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 27) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -15464,11 +15235,11 @@ SRSASN_CODE erab_to_be_setup_item_ho_req_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_to_be_setup_item_ho_req_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABToBeSetupItemHOReq"}; + static const char* options[] = {"E-RABToBeSetupItemHOReq"}; return convert_enum_idx(options, 1, value, "erab_to_be_setup_item_ho_req_ies_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; erab_to_be_setup_item_ho_req_ies_container::erab_to_be_setup_item_ho_req_ies_container() : erab_to_be_setup_item_ho_req(27, crit_e::reject) @@ -15493,20 +15264,19 @@ SRSASN_CODE erab_to_be_setup_item_ho_req_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_single_container_item_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 27: - nof_mandatory_ies--; - erab_to_be_setup_item_ho_req.id = c.id; - erab_to_be_setup_item_ho_req.crit = c.crit; - erab_to_be_setup_item_ho_req.value = c.value.erab_to_be_setup_item_ho_req(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 27) { + nof_mandatory_ies--; + erab_to_be_setup_item_ho_req.id = c.id; + erab_to_be_setup_item_ho_req.crit = c.crit; + erab_to_be_setup_item_ho_req.value = c.value.erab_to_be_setup_item_ho_req(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -15564,49 +15334,36 @@ void erab_to_be_switched_dl_item_s::to_json(json_writer& j) const // E-RABToBeSwitchedDLItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_to_be_switched_dl_item_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {23}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {23}; + return map_enum_number(options, 1, idx, "id"); } bool erab_to_be_switched_dl_item_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {23}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 23 == id; } crit_e erab_to_be_switched_dl_item_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 23: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 23) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_to_be_switched_dl_item_ies_o::value_c erab_to_be_switched_dl_item_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 23: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 23) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_to_be_switched_dl_item_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 23: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 23) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -15632,7 +15389,7 @@ SRSASN_CODE erab_to_be_switched_dl_item_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_to_be_switched_dl_item_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABToBeSwitchedDLItem"}; + static const char* options[] = {"E-RABToBeSwitchedDLItem"}; return convert_enum_idx(options, 1, value, "erab_to_be_switched_dl_item_ies_o::value_c::types"); } @@ -15659,20 +15416,19 @@ SRSASN_CODE erab_to_be_switched_dl_item_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_single_container_item_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 23: - nof_mandatory_ies--; - erab_to_be_switched_dl_item.id = c.id; - erab_to_be_switched_dl_item.crit = c.crit; - erab_to_be_switched_dl_item.value = c.value.erab_to_be_switched_dl_item(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 23) { + nof_mandatory_ies--; + erab_to_be_switched_dl_item.id = c.id; + erab_to_be_switched_dl_item.crit = c.crit; + erab_to_be_switched_dl_item.value = c.value.erab_to_be_switched_dl_item(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -15730,49 +15486,36 @@ void erab_to_be_switched_ul_item_s::to_json(json_writer& j) const // E-RABToBeSwitchedULItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t erab_to_be_switched_ul_item_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {94}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {94}; + return map_enum_number(options, 1, idx, "id"); } bool erab_to_be_switched_ul_item_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {94}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 94 == id; } crit_e erab_to_be_switched_ul_item_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 94: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 94) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } erab_to_be_switched_ul_item_ies_o::value_c erab_to_be_switched_ul_item_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 94: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 94) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e erab_to_be_switched_ul_item_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 94: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 94) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -15798,7 +15541,7 @@ SRSASN_CODE erab_to_be_switched_ul_item_ies_o::value_c::unpack(cbit_ref& bref) std::string erab_to_be_switched_ul_item_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"E-RABToBeSwitchedULItem"}; + static const char* options[] = {"E-RABToBeSwitchedULItem"}; return convert_enum_idx(options, 1, value, "erab_to_be_switched_ul_item_ies_o::value_c::types"); } @@ -15825,20 +15568,19 @@ SRSASN_CODE erab_to_be_switched_ul_item_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_single_container_item_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 94: - nof_mandatory_ies--; - erab_to_be_switched_ul_item.id = c.id; - erab_to_be_switched_ul_item.crit = c.crit; - erab_to_be_switched_ul_item.value = c.value.erab_to_be_switched_ul_item(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 94) { + nof_mandatory_ies--; + erab_to_be_switched_ul_item.id = c.id; + erab_to_be_switched_ul_item.crit = c.crit; + erab_to_be_switched_ul_item.value = c.value.erab_to_be_switched_ul_item(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -15906,8 +15648,8 @@ void enb_status_transfer_transparent_container_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("bearers-SubjectToStatusTransferList"); - for (uint32_t i1 = 0; i1 < bearers_subject_to_status_transfer_list.size(); ++i1) { - bearers_subject_to_status_transfer_list[i1].to_json(j); + for (const auto& e1 : bearers_subject_to_status_transfer_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -15998,14 +15740,14 @@ void ul_cp_security_info_s::to_json(json_writer& j) const // ENBCPRelocationIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t enbcp_relocation_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {8, 96, 100, 67, 254}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {8, 96, 100, 67, 254}; + return map_enum_number(options, 5, idx, "id"); } bool enbcp_relocation_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {8, 96, 100, 67, 254}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {8, 96, 100, 67, 254}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -16025,9 +15767,9 @@ crit_e enbcp_relocation_ind_ies_o::get_crit(const uint32_t& id) case 254: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } enbcp_relocation_ind_ies_o::value_c enbcp_relocation_ind_ies_o::get_value(const uint32_t& id) { @@ -16049,7 +15791,7 @@ enbcp_relocation_ind_ies_o::value_c enbcp_relocation_ind_ies_o::get_value(const ret.set(value_c::types::ul_cp_security_info); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -16067,9 +15809,9 @@ presence_e enbcp_relocation_ind_ies_o::get_presence(const uint32_t& id) case 254: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -16304,17 +16046,16 @@ SRSASN_CODE enbcp_relocation_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string enbcp_relocation_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "INTEGER (0..16777215)", "S-TMSI", "EUTRAN-CGI", "TAI", "UL-CP-SecurityInformation"}; + static const char* options[] = {"INTEGER (0..16777215)", "S-TMSI", "EUTRAN-CGI", "TAI", "UL-CP-SecurityInformation"}; return convert_enum_idx(options, 5, value, "enbcp_relocation_ind_ies_o::value_c::types"); } uint8_t enbcp_relocation_ind_ies_o::value_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {0}; - return convert_enum_idx(options, 1, value, "enbcp_relocation_ind_ies_o::value_c::types"); + static const uint8_t options[] = {0}; + return map_enum_number(options, 1, value, "enbcp_relocation_ind_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; enbcp_relocation_ind_ies_container::enbcp_relocation_ind_ies_container() : enb_ue_s1ap_id(8, crit_e::reject), @@ -16379,12 +16120,13 @@ SRSASN_CODE enbcp_relocation_ind_ies_container::unpack(cbit_ref& bref) ul_cp_security_info.value = c.value.ul_cp_security_info(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -16475,8 +16217,8 @@ void enbx2_ext_tla_s::to_json(json_writer& j) const } if (gtptl_aa_present) { j.start_array("gTPTLAa"); - for (uint32_t i1 = 0; i1 < gtptl_aa.size(); ++i1) { - j.write_str(gtptl_aa[i1].to_string()); + for (const auto& e1 : gtptl_aa) { + j.write_str(e1.to_string()); } j.end_array(); } @@ -16490,7 +16232,7 @@ void enbx2_ext_tla_s::to_json(json_writer& j) const // MutingAvailabilityIndication ::= ENUMERATED std::string muting_availability_ind_opts::to_string() const { - static constexpr const char* options[] = {"available", "unavailable"}; + static const char* options[] = {"available", "unavailable"}; return convert_enum_idx(options, 2, value, "muting_availability_ind_e"); } @@ -16544,56 +16286,43 @@ void rlf_report_info_s::to_json(json_writer& j) const // SynchronisationStatus ::= ENUMERATED std::string synchronisation_status_opts::to_string() const { - static constexpr const char* options[] = {"synchronous", "asynchronous"}; + static const char* options[] = {"synchronous", "asynchronous"}; return convert_enum_idx(options, 2, value, "synchronisation_status_e"); } // TimeSynchronisationInfo-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t time_synchronisation_info_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {207}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {207}; + return map_enum_number(options, 1, idx, "id"); } bool time_synchronisation_info_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {207}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 207 == id; } crit_e time_synchronisation_info_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 207: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 207) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } time_synchronisation_info_ext_ies_o::ext_c time_synchronisation_info_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 207: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 207) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e time_synchronisation_info_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 207: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 207) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -16618,7 +16347,7 @@ SRSASN_CODE time_synchronisation_info_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string time_synchronisation_info_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"MutingAvailabilityIndication"}; + static const char* options[] = {"MutingAvailabilityIndication"}; return convert_enum_idx(options, 1, value, "time_synchronisation_info_ext_ies_o::ext_c::types"); } @@ -16671,13 +16400,13 @@ void muting_pattern_info_s::to_json(json_writer& j) const std::string muting_pattern_info_s::muting_pattern_period_opts::to_string() const { - static constexpr const char* options[] = {"ms0", "ms1280", "ms2560", "ms5120", "ms10240"}; + static const char* options[] = {"ms0", "ms1280", "ms2560", "ms5120", "ms10240"}; return convert_enum_idx(options, 5, value, "muting_pattern_info_s::muting_pattern_period_e_"); } uint16_t muting_pattern_info_s::muting_pattern_period_opts::to_number() const { - static constexpr uint16_t options[] = {0, 1280, 2560, 5120, 10240}; - return convert_enum_idx(options, 5, value, "muting_pattern_info_s::muting_pattern_period_e_"); + static const uint16_t options[] = {0, 1280, 2560, 5120, 10240}; + return map_enum_number(options, 5, value, "muting_pattern_info_s::muting_pattern_period_e_"); } // SONInformationReport ::= CHOICE @@ -16708,11 +16437,11 @@ SRSASN_CODE son_info_report_c::unpack(cbit_ref& bref) std::string son_info_report_c::types_opts::to_string() const { - static constexpr const char* options[] = {"rLFReportInformation"}; + static const char* options[] = {"rLFReportInformation"}; return convert_enum_idx(options, 1, value, "son_info_report_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; time_synchronisation_info_ext_ies_container::time_synchronisation_info_ext_ies_container() : muting_availability_ind(207, crit_e::ignore) @@ -16738,16 +16467,14 @@ SRSASN_CODE time_synchronisation_info_ext_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 207: - muting_availability_ind_present = true; - muting_availability_ind.id = c.id; - muting_availability_ind.crit = c.crit; - muting_availability_ind.ext = c.ext_value.muting_availability_ind(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 207) { + muting_availability_ind_present = true; + muting_availability_ind.id = c.id; + muting_availability_ind.crit = c.crit; + muting_availability_ind.ext = c.ext_value.muting_availability_ind(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -16805,14 +16532,14 @@ void time_synchronisation_info_s::to_json(json_writer& j) const // X2TNLConfigurationInfo-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t x2_tnl_cfg_info_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {153, 193}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {153, 193}; + return map_enum_number(options, 2, idx, "id"); } bool x2_tnl_cfg_info_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {153, 193}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {153, 193}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -16826,9 +16553,9 @@ crit_e x2_tnl_cfg_info_ext_ies_o::get_crit(const uint32_t& id) case 193: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } x2_tnl_cfg_info_ext_ies_o::ext_c x2_tnl_cfg_info_ext_ies_o::get_ext(const uint32_t& id) { @@ -16841,7 +16568,7 @@ x2_tnl_cfg_info_ext_ies_o::ext_c x2_tnl_cfg_info_ext_ies_o::get_ext(const uint32 ret.set(ext_c::types::enb_indirect_x2_transport_layer_addresses); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -16853,9 +16580,9 @@ presence_e x2_tnl_cfg_info_ext_ies_o::get_presence(const uint32_t& id) case 193: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -16955,15 +16682,15 @@ void x2_tnl_cfg_info_ext_ies_o::ext_c::to_json(json_writer& j) const switch (type_) { case types::enbx2_extended_transport_layer_addresses: j.start_array("ENBX2ExtTLAs"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::enb_indirect_x2_transport_layer_addresses: j.start_array("ENBIndirectX2TransportLayerAddresses"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -17007,7 +16734,7 @@ SRSASN_CODE x2_tnl_cfg_info_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string x2_tnl_cfg_info_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"ENBX2ExtTLAs", "ENBIndirectX2TransportLayerAddresses"}; + static const char* options[] = {"ENBX2ExtTLAs", "ENBIndirectX2TransportLayerAddresses"}; return convert_enum_idx(options, 2, value, "x2_tnl_cfg_info_ext_ies_o::ext_c::types"); } @@ -17177,7 +16904,7 @@ SRSASN_CODE enb_id_c::unpack(cbit_ref& bref) std::string enb_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"macroENB-ID", "homeENB-ID", "short-macroENB-ID", "long-macroENB-ID"}; + static const char* options[] = {"macroENB-ID", "homeENB-ID", "short-macroENB-ID", "long-macroENB-ID"}; return convert_enum_idx(options, 4, value, "enb_id_c::types"); } @@ -17222,61 +16949,48 @@ void listening_sf_pattern_s::to_json(json_writer& j) const std::string listening_sf_pattern_s::pattern_period_opts::to_string() const { - static constexpr const char* options[] = {"ms1280", "ms2560", "ms5120", "ms10240"}; + static const char* options[] = {"ms1280", "ms2560", "ms5120", "ms10240"}; return convert_enum_idx(options, 4, value, "listening_sf_pattern_s::pattern_period_e_"); } uint16_t listening_sf_pattern_s::pattern_period_opts::to_number() const { - static constexpr uint16_t options[] = {1280, 2560, 5120, 10240}; - return convert_enum_idx(options, 4, value, "listening_sf_pattern_s::pattern_period_e_"); + static const uint16_t options[] = {1280, 2560, 5120, 10240}; + return map_enum_number(options, 4, value, "listening_sf_pattern_s::pattern_period_e_"); } // SONInformation-ExtensionIE ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t son_info_ext_ie_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {206}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {206}; + return map_enum_number(options, 1, idx, "id"); } bool son_info_ext_ie_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {206}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 206 == id; } crit_e son_info_ext_ie_o::get_crit(const uint32_t& id) { - switch (id) { - case 206: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 206) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } son_info_ext_ie_o::value_c son_info_ext_ie_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 206: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 206) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e son_info_ext_ie_o::get_presence(const uint32_t& id) { - switch (id) { - case 206: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 206) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -17302,56 +17016,43 @@ SRSASN_CODE son_info_ext_ie_o::value_c::unpack(cbit_ref& bref) std::string son_info_ext_ie_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"SONInformationReport"}; + static const char* options[] = {"SONInformationReport"}; return convert_enum_idx(options, 1, value, "son_info_ext_ie_o::value_c::types"); } // SONInformationReply-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t son_info_reply_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {149}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {149}; + return map_enum_number(options, 1, idx, "id"); } bool son_info_reply_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {149}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 149 == id; } crit_e son_info_reply_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 149: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 149) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } son_info_reply_ext_ies_o::ext_c son_info_reply_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 149: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 149) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e son_info_reply_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 149: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 149) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -17377,11 +17078,11 @@ SRSASN_CODE son_info_reply_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string son_info_reply_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"TimeSynchronisationInfo"}; + static const char* options[] = {"TimeSynchronisationInfo"}; return convert_enum_idx(options, 1, value, "son_info_reply_ext_ies_o::ext_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; x2_tnl_cfg_info_ext_ies_container::x2_tnl_cfg_info_ext_ies_container() : enbx2_extended_transport_layer_addresses(153, crit_e::ignore), @@ -17426,7 +17127,7 @@ SRSASN_CODE x2_tnl_cfg_info_ext_ies_container::unpack(cbit_ref& bref) enb_indirect_x2_transport_layer_addresses.ext = c.ext_value.enb_indirect_x2_transport_layer_addresses(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -17476,8 +17177,8 @@ void x2_tnl_cfg_info_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("eNBX2TransportLayerAddresses"); - for (uint32_t i1 = 0; i1 < enbx2_transport_layer_addresses.size(); ++i1) { - j.write_str(enbx2_transport_layer_addresses[i1].to_string()); + for (const auto& e1 : enbx2_transport_layer_addresses) { + j.write_str(e1.to_string()); } j.end_array(); if (ie_exts_present) { @@ -17527,9 +17228,9 @@ void global_enb_id_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; son_info_reply_ext_ies_container::son_info_reply_ext_ies_container() : time_synchronisation_info(149, crit_e::ignore) {} SRSASN_CODE son_info_reply_ext_ies_container::pack(bit_ref& bref) const @@ -17552,16 +17253,14 @@ SRSASN_CODE son_info_reply_ext_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 149: - time_synchronisation_info_present = true; - time_synchronisation_info.id = c.id; - time_synchronisation_info.crit = c.crit; - time_synchronisation_info.ext = c.ext_value.time_synchronisation_info(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 149) { + time_synchronisation_info_present = true; + time_synchronisation_info.id = c.id; + time_synchronisation_info.crit = c.crit; + time_synchronisation_info.ext = c.ext_value.time_synchronisation_info(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -17625,14 +17324,14 @@ void son_info_reply_s::to_json(json_writer& j) const // SONInformationRequest ::= ENUMERATED std::string son_info_request_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "x2TNL-Configuration-Info", "time-Synchronisation-Info", "activate-Muting", "deactivate-Muting"}; return convert_enum_idx(options, 4, value, "son_info_request_e"); } uint8_t son_info_request_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx(options, 1, value, "son_info_request_e"); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "son_info_request_e"); } // SynchronisationInformation ::= SEQUENCE @@ -17694,8 +17393,8 @@ void synchronisation_info_s::to_json(json_writer& j) const } if (aggressore_cgi_list_present) { j.start_array("aggressoreCGI-List"); - for (uint32_t i1 = 0; i1 < aggressore_cgi_list.size(); ++i1) { - aggressore_cgi_list[i1].to_json(j); + for (const auto& e1 : aggressore_cgi_list) { + e1.to_json(j); } j.end_array(); } @@ -17709,14 +17408,14 @@ void synchronisation_info_s::to_json(json_writer& j) const // SONConfigurationTransfer-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t son_cfg_transfer_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {152, 209}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {152, 209}; + return map_enum_number(options, 2, idx, "id"); } bool son_cfg_transfer_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {152, 209}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {152, 209}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -17730,9 +17429,9 @@ crit_e son_cfg_transfer_ext_ies_o::get_crit(const uint32_t& id) case 209: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } son_cfg_transfer_ext_ies_o::ext_c son_cfg_transfer_ext_ies_o::get_ext(const uint32_t& id) { @@ -17745,7 +17444,7 @@ son_cfg_transfer_ext_ies_o::ext_c son_cfg_transfer_ext_ies_o::get_ext(const uint ret.set(ext_c::types::synchronisation_info); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -17757,9 +17456,9 @@ presence_e son_cfg_transfer_ext_ies_o::get_presence(const uint32_t& id) case 209: return presence_e::conditional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -17903,13 +17602,13 @@ SRSASN_CODE son_cfg_transfer_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string son_cfg_transfer_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"X2TNLConfigurationInfo", "SynchronisationInformation"}; + static const char* options[] = {"X2TNLConfigurationInfo", "SynchronisationInformation"}; return convert_enum_idx(options, 2, value, "son_cfg_transfer_ext_ies_o::ext_c::types"); } uint8_t son_cfg_transfer_ext_ies_o::ext_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx(options, 1, value, "son_cfg_transfer_ext_ies_o::ext_c::types"); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "son_cfg_transfer_ext_ies_o::ext_c::types"); } // SONInformation ::= CHOICE @@ -18053,7 +17752,7 @@ SRSASN_CODE son_info_c::unpack(cbit_ref& bref) std::string son_info_c::types_opts::to_string() const { - static constexpr const char* options[] = {"sONInformationRequest", "sONInformationReply", "sONInformation-Extension"}; + static const char* options[] = {"sONInformationRequest", "sONInformationReply", "sONInformation-Extension"}; return convert_enum_idx(options, 3, value, "son_info_c::types"); } @@ -18137,7 +17836,7 @@ void targetenb_id_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; son_cfg_transfer_ext_ies_container::son_cfg_transfer_ext_ies_container() : x2_tnl_cfg_info(152, crit_e::ignore), @@ -18182,7 +17881,7 @@ SRSASN_CODE son_cfg_transfer_ext_ies_container::unpack(cbit_ref& bref) synchronisation_info.ext = c.ext_value.synchronisation_info(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -18251,49 +17950,36 @@ void son_cfg_transfer_s::to_json(json_writer& j) const // ENBConfigurationTransferIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t enb_cfg_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {129}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {129}; + return map_enum_number(options, 1, idx, "id"); } bool enb_cfg_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {129}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 129 == id; } crit_e enb_cfg_transfer_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 129: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 129) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } enb_cfg_transfer_ies_o::value_c enb_cfg_transfer_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 129: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 129) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e enb_cfg_transfer_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 129: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 129) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -18319,11 +18005,11 @@ SRSASN_CODE enb_cfg_transfer_ies_o::value_c::unpack(cbit_ref& bref) std::string enb_cfg_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"SONConfigurationTransfer"}; + static const char* options[] = {"SONConfigurationTransfer"}; return convert_enum_idx(options, 1, value, "enb_cfg_transfer_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; enb_cfg_transfer_ies_container::enb_cfg_transfer_ies_container() : son_cfg_transfer_ect(129, crit_e::ignore) {} SRSASN_CODE enb_cfg_transfer_ies_container::pack(bit_ref& bref) const @@ -18346,16 +18032,14 @@ SRSASN_CODE enb_cfg_transfer_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 129: - son_cfg_transfer_ect_present = true; - son_cfg_transfer_ect.id = c.id; - son_cfg_transfer_ect.crit = c.crit; - son_cfg_transfer_ect.value = c.value.son_cfg_transfer_ect(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 129) { + son_cfg_transfer_ect_present = true; + son_cfg_transfer_ect.id = c.id; + son_cfg_transfer_ect.crit = c.crit; + son_cfg_transfer_ect.value = c.value.son_cfg_transfer_ect(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -18397,56 +18081,43 @@ void enb_cfg_transfer_s::to_json(json_writer& j) const // RAT-Type ::= ENUMERATED std::string rat_type_opts::to_string() const { - static constexpr const char* options[] = {"nbiot"}; + static const char* options[] = {"nbiot"}; return convert_enum_idx(options, 1, value, "rat_type_e"); } // SupportedTAs-Item-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t supported_tas_item_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {232}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {232}; + return map_enum_number(options, 1, idx, "id"); } bool supported_tas_item_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {232}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 232 == id; } crit_e supported_tas_item_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 232: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 232) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } supported_tas_item_ext_ies_o::ext_c supported_tas_item_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 232: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 232) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e supported_tas_item_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 232: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 232) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -18471,11 +18142,11 @@ SRSASN_CODE supported_tas_item_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string supported_tas_item_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"RAT-Type"}; + static const char* options[] = {"RAT-Type"}; return convert_enum_idx(options, 1, value, "supported_tas_item_ext_ies_o::ext_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; supported_tas_item_ext_ies_container::supported_tas_item_ext_ies_container() : rat_type(232, crit_e::reject) {} SRSASN_CODE supported_tas_item_ext_ies_container::pack(bit_ref& bref) const @@ -18498,16 +18169,14 @@ SRSASN_CODE supported_tas_item_ext_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 232: - rat_type_present = true; - rat_type.id = c.id; - rat_type.crit = c.crit; - rat_type.ext = c.ext_value.rat_type(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 232) { + rat_type_present = true; + rat_type.id = c.id; + rat_type.crit = c.crit; + rat_type.ext = c.ext_value.rat_type(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -18555,8 +18224,8 @@ void supported_tas_item_s::to_json(json_writer& j) const j.start_obj(); j.write_str("tAC", tac.to_string()); j.start_array("broadcastPLMNs"); - for (uint32_t i1 = 0; i1 < broadcast_plmns.size(); ++i1) { - j.write_str(broadcast_plmns[i1].to_string()); + for (const auto& e1 : broadcast_plmns) { + j.write_str(e1.to_string()); } j.end_array(); if (ie_exts_present) { @@ -18569,38 +18238,38 @@ void supported_tas_item_s::to_json(json_writer& j) const // NB-IoT-DefaultPagingDRX ::= ENUMERATED std::string nb_io_t_default_paging_drx_opts::to_string() const { - static constexpr const char* options[] = {"v128", "v256", "v512", "v1024"}; + static const char* options[] = {"v128", "v256", "v512", "v1024"}; return convert_enum_idx(options, 4, value, "nb_io_t_default_paging_drx_e"); } uint16_t nb_io_t_default_paging_drx_opts::to_number() const { - static constexpr uint16_t options[] = {128, 256, 512, 1024}; - return convert_enum_idx(options, 4, value, "nb_io_t_default_paging_drx_e"); + static const uint16_t options[] = {128, 256, 512, 1024}; + return map_enum_number(options, 4, value, "nb_io_t_default_paging_drx_e"); } // PagingDRX ::= ENUMERATED std::string paging_drx_opts::to_string() const { - static constexpr const char* options[] = {"v32", "v64", "v128", "v256"}; + static const char* options[] = {"v32", "v64", "v128", "v256"}; return convert_enum_idx(options, 4, value, "paging_drx_e"); } uint16_t paging_drx_opts::to_number() const { - static constexpr uint16_t options[] = {32, 64, 128, 256}; - return convert_enum_idx(options, 4, value, "paging_drx_e"); + static const uint16_t options[] = {32, 64, 128, 256}; + return map_enum_number(options, 4, value, "paging_drx_e"); } // ENBConfigurationUpdateIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t enb_cfg_upd_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {60, 64, 128, 137, 234}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {60, 64, 128, 137, 234}; + return map_enum_number(options, 5, idx, "id"); } bool enb_cfg_upd_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {60, 64, 128, 137, 234}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {60, 64, 128, 137, 234}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -18620,9 +18289,9 @@ crit_e enb_cfg_upd_ies_o::get_crit(const uint32_t& id) case 234: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } enb_cfg_upd_ies_o::value_c enb_cfg_upd_ies_o::get_value(const uint32_t& id) { @@ -18644,7 +18313,7 @@ enb_cfg_upd_ies_o::value_c enb_cfg_upd_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::nb_io_t_default_paging_drx); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -18662,9 +18331,9 @@ presence_e enb_cfg_upd_ies_o::get_presence(const uint32_t& id) case 234: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -18822,15 +18491,15 @@ void enb_cfg_upd_ies_o::value_c::to_json(json_writer& j) const break; case types::supported_tas: j.start_array("SupportedTAs"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::csg_id_list: j.start_array("CSG-IdList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -18898,12 +18567,12 @@ SRSASN_CODE enb_cfg_upd_ies_o::value_c::unpack(cbit_ref& bref) std::string enb_cfg_upd_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "PrintableString", "SupportedTAs", "CSG-IdList", "PagingDRX", "NB-IoT-DefaultPagingDRX"}; return convert_enum_idx(options, 5, value, "enb_cfg_upd_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; enb_cfg_upd_ies_container::enb_cfg_upd_ies_container() : enbname(60, crit_e::ignore), @@ -18981,7 +18650,7 @@ SRSASN_CODE enb_cfg_upd_ies_container::unpack(cbit_ref& bref) nb_io_t_default_paging_drx.value = c.value.nb_io_t_default_paging_drx(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -19040,49 +18709,36 @@ void enb_cfg_upd_s::to_json(json_writer& j) const // ENBConfigurationUpdateAcknowledgeIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t enb_cfg_upd_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {58}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {58}; + return map_enum_number(options, 1, idx, "id"); } bool enb_cfg_upd_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {58}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 58 == id; } crit_e enb_cfg_upd_ack_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 58: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 58) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } enb_cfg_upd_ack_ies_o::value_c enb_cfg_upd_ack_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 58: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 58) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e enb_cfg_upd_ack_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 58: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 58) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -19108,11 +18764,11 @@ SRSASN_CODE enb_cfg_upd_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string enb_cfg_upd_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"CriticalityDiagnostics"}; + static const char* options[] = {"CriticalityDiagnostics"}; return convert_enum_idx(options, 1, value, "enb_cfg_upd_ack_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; enb_cfg_upd_ack_ies_container::enb_cfg_upd_ack_ies_container() : crit_diagnostics(58, crit_e::ignore) {} SRSASN_CODE enb_cfg_upd_ack_ies_container::pack(bit_ref& bref) const @@ -19135,16 +18791,14 @@ SRSASN_CODE enb_cfg_upd_ack_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 58: - crit_diagnostics_present = true; - crit_diagnostics.id = c.id; - crit_diagnostics.crit = c.crit; - crit_diagnostics.value = c.value.crit_diagnostics(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 58) { + crit_diagnostics_present = true; + crit_diagnostics.id = c.id; + crit_diagnostics.crit = c.crit; + crit_diagnostics.value = c.value.crit_diagnostics(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -19186,26 +18840,26 @@ void enb_cfg_upd_ack_s::to_json(json_writer& j) const // TimeToWait ::= ENUMERATED std::string time_to_wait_opts::to_string() const { - static constexpr const char* options[] = {"v1s", "v2s", "v5s", "v10s", "v20s", "v60s"}; + static const char* options[] = {"v1s", "v2s", "v5s", "v10s", "v20s", "v60s"}; return convert_enum_idx(options, 6, value, "time_to_wait_e"); } uint8_t time_to_wait_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 5, 10, 20, 60}; - return convert_enum_idx(options, 6, value, "time_to_wait_e"); + static const uint8_t options[] = {1, 2, 5, 10, 20, 60}; + return map_enum_number(options, 6, value, "time_to_wait_e"); } // ENBConfigurationUpdateFailureIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t enb_cfg_upd_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {2, 65, 58}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {2, 65, 58}; + return map_enum_number(options, 3, idx, "id"); } bool enb_cfg_upd_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {2, 65, 58}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {2, 65, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -19221,9 +18875,9 @@ crit_e enb_cfg_upd_fail_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } enb_cfg_upd_fail_ies_o::value_c enb_cfg_upd_fail_ies_o::get_value(const uint32_t& id) { @@ -19239,7 +18893,7 @@ enb_cfg_upd_fail_ies_o::value_c enb_cfg_upd_fail_ies_o::get_value(const uint32_t ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -19253,9 +18907,9 @@ presence_e enb_cfg_upd_fail_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -19426,11 +19080,11 @@ SRSASN_CODE enb_cfg_upd_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string enb_cfg_upd_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; + static const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "enb_cfg_upd_fail_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; enb_cfg_upd_fail_ies_container::enb_cfg_upd_fail_ies_container() : cause(2, crit_e::ignore), @@ -19485,12 +19139,13 @@ SRSASN_CODE enb_cfg_upd_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -19825,7 +19480,7 @@ SRSASN_CODE rim_routing_address_c::unpack(cbit_ref& bref) std::string rim_routing_address_c::types_opts::to_string() const { - static constexpr const char* options[] = {"gERAN-Cell-ID", "targetRNC-ID", "eHRPD-Sector-ID"}; + static const char* options[] = {"gERAN-Cell-ID", "targetRNC-ID", "eHRPD-Sector-ID"}; return convert_enum_idx(options, 3, value, "rim_routing_address_c::types"); } @@ -19905,56 +19560,43 @@ SRSASN_CODE inter_sys_info_transfer_type_c::unpack(cbit_ref& bref) std::string inter_sys_info_transfer_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"rIMTransfer"}; + static const char* options[] = {"rIMTransfer"}; return convert_enum_idx(options, 1, value, "inter_sys_info_transfer_type_c::types"); } // ENBDirectInformationTransferIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t enb_direct_info_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {121}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {121}; + return map_enum_number(options, 1, idx, "id"); } bool enb_direct_info_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {121}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 121 == id; } crit_e enb_direct_info_transfer_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 121: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 121) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } enb_direct_info_transfer_ies_o::value_c enb_direct_info_transfer_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 121: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 121) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e enb_direct_info_transfer_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 121: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 121) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -19980,11 +19622,11 @@ SRSASN_CODE enb_direct_info_transfer_ies_o::value_c::unpack(cbit_ref& bref) std::string enb_direct_info_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Inter-SystemInformationTransferType"}; + static const char* options[] = {"Inter-SystemInformationTransferType"}; return convert_enum_idx(options, 1, value, "enb_direct_info_transfer_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; enb_direct_info_transfer_ies_container::enb_direct_info_transfer_ies_container() : inter_sys_info_transfer_type_edt(121, crit_e::reject) @@ -20009,20 +19651,19 @@ SRSASN_CODE enb_direct_info_transfer_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 121: - nof_mandatory_ies--; - inter_sys_info_transfer_type_edt.id = c.id; - inter_sys_info_transfer_type_edt.crit = c.crit; - inter_sys_info_transfer_type_edt.value = c.value.inter_sys_info_transfer_type_edt(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 121) { + nof_mandatory_ies--; + inter_sys_info_transfer_type_edt.id = c.id; + inter_sys_info_transfer_type_edt.crit = c.crit; + inter_sys_info_transfer_type_edt.value = c.value.inter_sys_info_transfer_type_edt(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -20061,14 +19702,14 @@ void enb_direct_info_transfer_s::to_json(json_writer& j) const // ENBStatusTransferIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t enb_status_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 90}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 8, 90}; + return map_enum_number(options, 3, idx, "id"); } bool enb_status_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 90}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 90}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -20084,9 +19725,9 @@ crit_e enb_status_transfer_ies_o::get_crit(const uint32_t& id) case 90: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } enb_status_transfer_ies_o::value_c enb_status_transfer_ies_o::get_value(const uint32_t& id) { @@ -20102,7 +19743,7 @@ enb_status_transfer_ies_o::value_c enb_status_transfer_ies_o::get_value(const ui ret.set(value_c::types::enb_status_transfer_transparent_container); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -20116,9 +19757,9 @@ presence_e enb_status_transfer_ies_o::get_presence(const uint32_t& id) case 90: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -20286,12 +19927,12 @@ SRSASN_CODE enb_status_transfer_ies_o::value_c::unpack(cbit_ref& bref) std::string enb_status_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "ENB-StatusTransfer-TransparentContainer"}; return convert_enum_idx(options, 3, value, "enb_status_transfer_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; enb_status_transfer_ies_container::enb_status_transfer_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -20340,12 +19981,13 @@ SRSASN_CODE enb_status_transfer_ies_container::unpack(cbit_ref& bref) enb_status_transfer_transparent_container.value = c.value.enb_status_transfer_transparent_container(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -20414,14 +20056,14 @@ void eutran_resp_s::to_json(json_writer& j) const // ErrorIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t error_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 2, 58}; + return map_enum_number(options, 4, idx, "id"); } bool error_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 2, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -20439,9 +20081,9 @@ crit_e error_ind_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } error_ind_ies_o::value_c error_ind_ies_o::get_value(const uint32_t& id) { @@ -20460,7 +20102,7 @@ error_ind_ies_o::value_c error_ind_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -20476,9 +20118,9 @@ presence_e error_ind_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -20675,12 +20317,12 @@ SRSASN_CODE error_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string error_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "error_ind_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; error_ind_ies_container::error_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -20747,7 +20389,7 @@ SRSASN_CODE error_ind_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -20802,13 +20444,13 @@ void error_ind_s::to_json(json_writer& j) const // NumberOfMeasurementReportingLevels ::= ENUMERATED std::string nof_meas_report_levels_opts::to_string() const { - static constexpr const char* options[] = {"rl2", "rl3", "rl4", "rl5", "rl10"}; + static const char* options[] = {"rl2", "rl3", "rl4", "rl5", "rl10"}; return convert_enum_idx(options, 5, value, "nof_meas_report_levels_e"); } uint8_t nof_meas_report_levels_opts::to_number() const { - static constexpr uint8_t options[] = {2, 3, 4, 5, 10}; - return convert_enum_idx(options, 5, value, "nof_meas_report_levels_e"); + static const uint8_t options[] = {2, 3, 4, 5, 10}; + return map_enum_number(options, 5, value, "nof_meas_report_levels_e"); } // EventTriggeredCellLoadReportingRequest ::= SEQUENCE @@ -20836,7 +20478,7 @@ void event_triggered_cell_load_report_request_s::to_json(json_writer& j) const // OverloadFlag ::= ENUMERATED std::string overload_flag_opts::to_string() const { - static constexpr const char* options[] = {"overload"}; + static const char* options[] = {"overload"}; return convert_enum_idx(options, 1, value, "overload_flag_e"); } @@ -20879,7 +20521,7 @@ void event_triggered_cell_load_report_resp_s::to_json(json_writer& j) const // SourceOfUEActivityBehaviourInformation ::= ENUMERATED std::string source_of_ue_activity_behaviour_info_opts::to_string() const { - static constexpr const char* options[] = {"subscription-information", "statistics"}; + static const char* options[] = {"subscription-information", "statistics"}; return convert_enum_idx(options, 2, value, "source_of_ue_activity_behaviour_info_e"); } @@ -20952,13 +20594,13 @@ void expected_ue_activity_behaviour_s::to_json(json_writer& j) const // ExpectedHOInterval ::= ENUMERATED std::string expected_ho_interv_opts::to_string() const { - static constexpr const char* options[] = {"sec15", "sec30", "sec60", "sec90", "sec120", "sec180", "long-time"}; + static const char* options[] = {"sec15", "sec30", "sec60", "sec90", "sec120", "sec180", "long-time"}; return convert_enum_idx(options, 7, value, "expected_ho_interv_e"); } uint8_t expected_ho_interv_opts::to_number() const { - static constexpr uint8_t options[] = {15, 30, 60, 90, 120, 180}; - return convert_enum_idx(options, 6, value, "expected_ho_interv_e"); + static const uint8_t options[] = {15, 30, 60, 90, 120, 180}; + return map_enum_number(options, 6, value, "expected_ho_interv_e"); } // ExpectedUEBehaviour ::= SEQUENCE @@ -21080,21 +20722,21 @@ SRSASN_CODE fail_event_report_c::unpack(cbit_ref& bref) std::string fail_event_report_c::types_opts::to_string() const { - static constexpr const char* options[] = {"tooEarlyInterRATHOReportFromEUTRAN"}; + static const char* options[] = {"tooEarlyInterRATHOReportFromEUTRAN"}; return convert_enum_idx(options, 1, value, "fail_event_report_c::types"); } // HoReportType ::= ENUMERATED std::string ho_report_type_opts::to_string() const { - static constexpr const char* options[] = {"unnecessaryhotoanotherrat", "earlyirathandover"}; + static const char* options[] = {"unnecessaryhotoanotherrat", "earlyirathandover"}; return convert_enum_idx(options, 2, value, "ho_report_type_e"); } // HoType ::= ENUMERATED std::string ho_type_opts::to_string() const { - static constexpr const char* options[] = {"ltetoutran", "ltetogeran"}; + static const char* options[] = {"ltetoutran", "ltetogeran"}; return convert_enum_idx(options, 2, value, "ho_type_e"); } @@ -21147,15 +20789,15 @@ void ho_report_s::to_json(json_writer& j) const j.write_fieldname("hoTargetID"); ho_target_id.to_json(j); j.start_array("candidateCellList"); - for (uint32_t i1 = 0; i1 < candidate_cell_list.size(); ++i1) { - candidate_cell_list[i1].to_json(j); + for (const auto& e1 : candidate_cell_list) { + e1.to_json(j); } j.end_array(); if (ext) { if (candidate_pci_list.is_present()) { j.start_array("candidatePCIList"); - for (uint32_t i1 = 0; i1 < candidate_pci_list->size(); ++i1) { - ((*candidate_pci_list)[i1]).to_json(j); + for (const auto& e1 : *candidate_pci_list) { + e1.to_json(j); } j.end_array(); } @@ -21166,14 +20808,14 @@ void ho_report_s::to_json(json_writer& j) const // HandoverCancelIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ho_cancel_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 2}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 8, 2}; + return map_enum_number(options, 3, idx, "id"); } bool ho_cancel_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 2}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 2}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -21189,9 +20831,9 @@ crit_e ho_cancel_ies_o::get_crit(const uint32_t& id) case 2: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_cancel_ies_o::value_c ho_cancel_ies_o::get_value(const uint32_t& id) { @@ -21207,7 +20849,7 @@ ho_cancel_ies_o::value_c ho_cancel_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::cause); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -21221,9 +20863,9 @@ presence_e ho_cancel_ies_o::get_presence(const uint32_t& id) case 2: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -21388,11 +21030,11 @@ SRSASN_CODE ho_cancel_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_cancel_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause"}; return convert_enum_idx(options, 3, value, "ho_cancel_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ho_cancel_ies_container::ho_cancel_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -21441,12 +21083,13 @@ SRSASN_CODE ho_cancel_ies_container::unpack(cbit_ref& bref) cause.value = c.value.cause(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -21489,14 +21132,14 @@ void ho_cancel_s::to_json(json_writer& j) const // HandoverCancelAcknowledgeIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ho_cancel_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 58}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 8, 58}; + return map_enum_number(options, 3, idx, "id"); } bool ho_cancel_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 58}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -21512,9 +21155,9 @@ crit_e ho_cancel_ack_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_cancel_ack_ies_o::value_c ho_cancel_ack_ies_o::get_value(const uint32_t& id) { @@ -21530,7 +21173,7 @@ ho_cancel_ack_ies_o::value_c ho_cancel_ack_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -21544,9 +21187,9 @@ presence_e ho_cancel_ack_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -21711,12 +21354,11 @@ SRSASN_CODE ho_cancel_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_cancel_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "ho_cancel_ack_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ho_cancel_ack_ies_container::ho_cancel_ack_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -21768,12 +21410,13 @@ SRSASN_CODE ho_cancel_ack_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -21818,21 +21461,21 @@ void ho_cancel_ack_s::to_json(json_writer& j) const // HandoverType ::= ENUMERATED std::string handov_type_opts::to_string() const { - static constexpr const char* options[] = {"intralte", "ltetoutran", "ltetogeran", "utrantolte", "gerantolte"}; + static const char* options[] = {"intralte", "ltetoutran", "ltetogeran", "utrantolte", "gerantolte"}; return convert_enum_idx(options, 5, value, "handov_type_e"); } // HandoverCommandIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ho_cmd_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 1, 135, 12, 13, 123, 139, 58}; - return convert_enum_idx(options, 9, idx, "id"); + static const uint32_t options[] = {0, 8, 1, 135, 12, 13, 123, 139, 58}; + return map_enum_number(options, 9, idx, "id"); } bool ho_cmd_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 1, 135, 12, 13, 123, 139, 58}; - for (uint32_t i = 0; i < 9; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 1, 135, 12, 13, 123, 139, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -21860,9 +21503,9 @@ crit_e ho_cmd_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_cmd_ies_o::value_c ho_cmd_ies_o::get_value(const uint32_t& id) { @@ -21896,7 +21539,7 @@ ho_cmd_ies_o::value_c ho_cmd_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -21922,9 +21565,9 @@ presence_e ho_cmd_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -22179,8 +21822,8 @@ void ho_cmd_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_to_release_list_ho_cmd: j.start_array("E-RABList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -22276,19 +21919,19 @@ SRSASN_CODE ho_cmd_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_cmd_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "HandoverType", - "OCTET STRING", - "", - "E-RABList", - "OCTET STRING", - "OCTET STRING", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "HandoverType", + "OCTET STRING", + "", + "E-RABList", + "OCTET STRING", + "OCTET STRING", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 9, value, "ho_cmd_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ho_cmd_ies_container::ho_cmd_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -22401,12 +22044,13 @@ SRSASN_CODE ho_cmd_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -22471,14 +22115,14 @@ void ho_cmd_s::to_json(json_writer& j) const // HandoverFailureIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ho_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 2, 58}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 2, 58}; + return map_enum_number(options, 3, idx, "id"); } bool ho_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 2, 58}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 2, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -22494,9 +22138,9 @@ crit_e ho_fail_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_fail_ies_o::value_c ho_fail_ies_o::get_value(const uint32_t& id) { @@ -22512,7 +22156,7 @@ ho_fail_ies_o::value_c ho_fail_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -22526,9 +22170,9 @@ presence_e ho_fail_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -22698,16 +22342,16 @@ SRSASN_CODE ho_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", "Cause", "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..4294967295)", "Cause", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "ho_fail_ies_o::value_c::types"); } uint8_t ho_fail_ies_o::value_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {0}; - return convert_enum_idx(options, 1, value, "ho_fail_ies_o::value_c::types"); + static const uint8_t options[] = {0}; + return map_enum_number(options, 1, value, "ho_fail_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ho_fail_ies_container::ho_fail_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -22759,12 +22403,13 @@ SRSASN_CODE ho_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -22809,14 +22454,14 @@ void ho_fail_s::to_json(json_writer& j) const // HandoverNotifyIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ho_notify_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 100, 67, 176, 186}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {0, 8, 100, 67, 176, 186}; + return map_enum_number(options, 6, idx, "id"); } bool ho_notify_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 100, 67, 176, 186}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 100, 67, 176, 186}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -22838,9 +22483,9 @@ crit_e ho_notify_ies_o::get_crit(const uint32_t& id) case 186: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_notify_ies_o::value_c ho_notify_ies_o::get_value(const uint32_t& id) { @@ -22865,7 +22510,7 @@ ho_notify_ies_o::value_c ho_notify_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::lhn_id); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -22885,9 +22530,9 @@ presence_e ho_notify_ies_o::get_presence(const uint32_t& id) case 186: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -23147,12 +22792,12 @@ SRSASN_CODE ho_notify_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_notify_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "EUTRAN-CGI", "TAI", "TunnelInformation", "OCTET STRING"}; return convert_enum_idx(options, 6, value, "ho_notify_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ho_notify_ies_container::ho_notify_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -23231,12 +22876,13 @@ SRSASN_CODE ho_notify_ies_container::unpack(cbit_ref& bref) lhn_id.value = c.value.lhn_id(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -23289,14 +22935,14 @@ void ho_notify_s::to_json(json_writer& j) const // HandoverPreparationFailureIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ho_prep_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 2, 58}; + return map_enum_number(options, 4, idx, "id"); } bool ho_prep_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 2, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -23314,9 +22960,9 @@ crit_e ho_prep_fail_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_prep_fail_ies_o::value_c ho_prep_fail_ies_o::get_value(const uint32_t& id) { @@ -23335,7 +22981,7 @@ ho_prep_fail_ies_o::value_c ho_prep_fail_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -23351,9 +22997,9 @@ presence_e ho_prep_fail_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -23550,12 +23196,12 @@ SRSASN_CODE ho_prep_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_prep_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "ho_prep_fail_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ho_prep_fail_ies_container::ho_prep_fail_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -23615,12 +23261,13 @@ SRSASN_CODE ho_prep_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -23714,94 +23361,93 @@ void mbsfn_result_to_log_info_s::to_json(json_writer& j) const // Links-to-log ::= ENUMERATED std::string links_to_log_opts::to_string() const { - static constexpr const char* options[] = {"uplink", "downlink", "both-uplink-and-downlink"}; + static const char* options[] = {"uplink", "downlink", "both-uplink-and-downlink"}; return convert_enum_idx(options, 3, value, "links_to_log_e"); } // LoggingDuration ::= ENUMERATED std::string logging_dur_opts::to_string() const { - static constexpr const char* options[] = {"m10", "m20", "m40", "m60", "m90", "m120"}; + static const char* options[] = {"m10", "m20", "m40", "m60", "m90", "m120"}; return convert_enum_idx(options, 6, value, "logging_dur_e"); } uint8_t logging_dur_opts::to_number() const { - static constexpr uint8_t options[] = {10, 20, 40, 60, 90, 120}; - return convert_enum_idx(options, 6, value, "logging_dur_e"); + static const uint8_t options[] = {10, 20, 40, 60, 90, 120}; + return map_enum_number(options, 6, value, "logging_dur_e"); } // LoggingInterval ::= ENUMERATED std::string logging_interv_opts::to_string() const { - static constexpr const char* options[] = { - "ms128", "ms256", "ms512", "ms1024", "ms2048", "ms3072", "ms4096", "ms6144"}; + static const char* options[] = {"ms128", "ms256", "ms512", "ms1024", "ms2048", "ms3072", "ms4096", "ms6144"}; return convert_enum_idx(options, 8, value, "logging_interv_e"); } uint16_t logging_interv_opts::to_number() const { - static constexpr uint16_t options[] = {128, 256, 512, 1024, 2048, 3072, 4096, 6144}; - return convert_enum_idx(options, 8, value, "logging_interv_e"); + static const uint16_t options[] = {128, 256, 512, 1024, 2048, 3072, 4096, 6144}; + return map_enum_number(options, 8, value, "logging_interv_e"); } // M3period ::= ENUMERATED std::string m3period_opts::to_string() const { - static constexpr const char* options[] = {"ms100", "ms1000", "ms10000"}; + static const char* options[] = {"ms100", "ms1000", "ms10000"}; return convert_enum_idx(options, 3, value, "m3period_e"); } uint16_t m3period_opts::to_number() const { - static constexpr uint16_t options[] = {100, 1000, 10000}; - return convert_enum_idx(options, 3, value, "m3period_e"); + static const uint16_t options[] = {100, 1000, 10000}; + return map_enum_number(options, 3, value, "m3period_e"); } // M4period ::= ENUMERATED std::string m4period_opts::to_string() const { - static constexpr const char* options[] = {"ms1024", "ms2048", "ms5120", "ms10240", "min1"}; + static const char* options[] = {"ms1024", "ms2048", "ms5120", "ms10240", "min1"}; return convert_enum_idx(options, 5, value, "m4period_e"); } uint16_t m4period_opts::to_number() const { - static constexpr uint16_t options[] = {1024, 2048, 5120, 10240, 1}; - return convert_enum_idx(options, 5, value, "m4period_e"); + static const uint16_t options[] = {1024, 2048, 5120, 10240, 1}; + return map_enum_number(options, 5, value, "m4period_e"); } // M5period ::= ENUMERATED std::string m5period_opts::to_string() const { - static constexpr const char* options[] = {"ms1024", "ms2048", "ms5120", "ms10240", "min1"}; + static const char* options[] = {"ms1024", "ms2048", "ms5120", "ms10240", "min1"}; return convert_enum_idx(options, 5, value, "m5period_e"); } uint16_t m5period_opts::to_number() const { - static constexpr uint16_t options[] = {1024, 2048, 5120, 10240, 1}; - return convert_enum_idx(options, 5, value, "m5period_e"); + static const uint16_t options[] = {1024, 2048, 5120, 10240, 1}; + return map_enum_number(options, 5, value, "m5period_e"); } // M6delay-threshold ::= ENUMERATED std::string m6delay_thres_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ms30", "ms40", "ms50", "ms60", "ms70", "ms80", "ms90", "ms100", "ms150", "ms300", "ms500", "ms750"}; return convert_enum_idx(options, 12, value, "m6delay_thres_e"); } uint16_t m6delay_thres_opts::to_number() const { - static constexpr uint16_t options[] = {30, 40, 50, 60, 70, 80, 90, 100, 150, 300, 500, 750}; - return convert_enum_idx(options, 12, value, "m6delay_thres_e"); + static const uint16_t options[] = {30, 40, 50, 60, 70, 80, 90, 100, 150, 300, 500, 750}; + return map_enum_number(options, 12, value, "m6delay_thres_e"); } // M6report-Interval ::= ENUMERATED std::string m6report_interv_opts::to_string() const { - static constexpr const char* options[] = {"ms1024", "ms2048", "ms5120", "ms10240"}; + static const char* options[] = {"ms1024", "ms2048", "ms5120", "ms10240"}; return convert_enum_idx(options, 4, value, "m6report_interv_e"); } uint16_t m6report_interv_opts::to_number() const { - static constexpr uint16_t options[] = {1024, 2048, 5120, 10240}; - return convert_enum_idx(options, 4, value, "m6report_interv_e"); + static const uint16_t options[] = {1024, 2048, 5120, 10240}; + return map_enum_number(options, 4, value, "m6report_interv_e"); } // LoggedMBSFNMDT ::= SEQUENCE @@ -23846,8 +23492,8 @@ void logged_mbsfnmdt_s::to_json(json_writer& j) const j.write_str("loggingDuration", logging_dur.to_string()); if (mbsfn_result_to_log_present) { j.start_array("mBSFN-ResultToLog"); - for (uint32_t i1 = 0; i1 < mbsfn_result_to_log.size(); ++i1) { - mbsfn_result_to_log[i1].to_json(j); + for (const auto& e1 : mbsfn_result_to_log) { + e1.to_json(j); } j.end_array(); } @@ -24157,57 +23803,57 @@ SRSASN_CODE meas_thres_a2_c::unpack(cbit_ref& bref) std::string meas_thres_a2_c::types_opts::to_string() const { - static constexpr const char* options[] = {"threshold-RSRP", "threshold-RSRQ"}; + static const char* options[] = {"threshold-RSRP", "threshold-RSRQ"}; return convert_enum_idx(options, 2, value, "meas_thres_a2_c::types"); } // ReportAmountMDT ::= ENUMERATED std::string report_amount_mdt_opts::to_string() const { - static constexpr const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "rinfinity"}; + static const char* options[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "rinfinity"}; return convert_enum_idx(options, 8, value, "report_amount_mdt_e"); } int8_t report_amount_mdt_opts::to_number() const { - static constexpr int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return convert_enum_idx(options, 8, value, "report_amount_mdt_e"); + static const int8_t options[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(options, 8, value, "report_amount_mdt_e"); } // ReportIntervalMDT ::= ENUMERATED std::string report_interv_mdt_opts::to_string() const { - static constexpr const char* options[] = {"ms120", - "ms240", - "ms480", - "ms640", - "ms1024", - "ms2048", - "ms5120", - "ms10240", - "min1", - "min6", - "min12", - "min30", - "min60"}; + static const char* options[] = {"ms120", + "ms240", + "ms480", + "ms640", + "ms1024", + "ms2048", + "ms5120", + "ms10240", + "min1", + "min6", + "min12", + "min30", + "min60"}; return convert_enum_idx(options, 13, value, "report_interv_mdt_e"); } uint16_t report_interv_mdt_opts::to_number() const { - static constexpr uint16_t options[] = {120, 240, 480, 640, 1024, 2048, 5120, 10240, 1, 6, 12, 30, 60}; - return convert_enum_idx(options, 13, value, "report_interv_mdt_e"); + static const uint16_t options[] = {120, 240, 480, 640, 1024, 2048, 5120, 10240, 1, 6, 12, 30, 60}; + return map_enum_number(options, 13, value, "report_interv_mdt_e"); } // ImmediateMDT-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t immediate_mdt_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {171, 172, 173, 174, 220, 221}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {171, 172, 173, 174, 220, 221}; + return map_enum_number(options, 6, idx, "id"); } bool immediate_mdt_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {171, 172, 173, 174, 220, 221}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {171, 172, 173, 174, 220, 221}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -24229,9 +23875,9 @@ crit_e immediate_mdt_ext_ies_o::get_crit(const uint32_t& id) case 221: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } immediate_mdt_ext_ies_o::ext_c immediate_mdt_ext_ies_o::get_ext(const uint32_t& id) { @@ -24256,7 +23902,7 @@ immediate_mdt_ext_ies_o::ext_c immediate_mdt_ext_ies_o::get_ext(const uint32_t& ret.set(ext_c::types::m7_cfg); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -24276,9 +23922,9 @@ presence_e immediate_mdt_ext_ies_o::get_presence(const uint32_t& id) case 221: return presence_e::conditional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -24548,7 +24194,7 @@ SRSASN_CODE immediate_mdt_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string immediate_mdt_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "M3Configuration", "M4Configuration", "M5Configuration", "BIT STRING", "M6Configuration", "M7Configuration"}; return convert_enum_idx(options, 6, value, "immediate_mdt_ext_ies_o::ext_c::types"); } @@ -24613,7 +24259,7 @@ void m1_periodic_report_s::to_json(json_writer& j) const // M1ReportingTrigger ::= ENUMERATED std::string m1_report_trigger_opts::to_string() const { - static constexpr const char* options[] = {"periodic", "a2eventtriggered", "a2eventtriggered-periodic"}; + static const char* options[] = {"periodic", "a2eventtriggered", "a2eventtriggered-periodic"}; return convert_enum_idx(options, 3, value, "m1_report_trigger_e"); } @@ -24657,49 +24303,36 @@ void m1_thres_event_a2_s::to_json(json_writer& j) const // MDTMode-ExtensionIE ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t mdt_mode_ext_ie_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {197}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {197}; + return map_enum_number(options, 1, idx, "id"); } bool mdt_mode_ext_ie_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {197}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 197 == id; } crit_e mdt_mode_ext_ie_o::get_crit(const uint32_t& id) { - switch (id) { - case 197: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 197) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } mdt_mode_ext_ie_o::value_c mdt_mode_ext_ie_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 197: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 197) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e mdt_mode_ext_ie_o::get_presence(const uint32_t& id) { - switch (id) { - case 197: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 197) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -24725,11 +24358,11 @@ SRSASN_CODE mdt_mode_ext_ie_o::value_c::unpack(cbit_ref& bref) std::string mdt_mode_ext_ie_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"LoggedMBSFNMDT"}; + static const char* options[] = {"LoggedMBSFNMDT"}; return convert_enum_idx(options, 1, value, "mdt_mode_ext_ie_o::value_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; immediate_mdt_ext_ies_container::immediate_mdt_ext_ies_container() : m3_cfg(171, crit_e::ignore), @@ -24818,7 +24451,7 @@ SRSASN_CODE immediate_mdt_ext_ies_container::unpack(cbit_ref& bref) m7_cfg.ext = c.ext_value.m7_cfg(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -24957,12 +24590,12 @@ void logged_mdt_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // MDT-Activation ::= ENUMERATED std::string mdt_activation_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "immediate-MDT-only", "immediate-MDT-and-Trace", "logged-MDT-only", "logged-MBSFN-MDT"}; return convert_enum_idx(options, 4, value, "mdt_activation_e"); } @@ -24970,49 +24603,36 @@ std::string mdt_activation_opts::to_string() const // MDT-Configuration-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t mdt_cfg_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {178}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {178}; + return map_enum_number(options, 1, idx, "id"); } bool mdt_cfg_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {178}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 178 == id; } crit_e mdt_cfg_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 178: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 178) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } mdt_cfg_ext_ies_o::ext_c mdt_cfg_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 178: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 178) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e mdt_cfg_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 178: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 178) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -25020,8 +24640,8 @@ void mdt_cfg_ext_ies_o::ext_c::to_json(json_writer& j) const { j.start_obj(); j.start_array("MDTPLMNList"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - j.write_str(c[i1].to_string()); + for (const auto& e1 : c) { + j.write_str(e1.to_string()); } j.end_array(); j.end_obj(); @@ -25041,7 +24661,7 @@ SRSASN_CODE mdt_cfg_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string mdt_cfg_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"MDTPLMNList"}; + static const char* options[] = {"MDTPLMNList"}; return convert_enum_idx(options, 1, value, "mdt_cfg_ext_ies_o::ext_c::types"); } @@ -25191,11 +24811,11 @@ SRSASN_CODE mdt_mode_c::unpack(cbit_ref& bref) std::string mdt_mode_c::types_opts::to_string() const { - static constexpr const char* options[] = {"immediateMDT", "loggedMDT", "mDTMode-Extension"}; + static const char* options[] = {"immediateMDT", "loggedMDT", "mDTMode-Extension"}; return convert_enum_idx(options, 3, value, "mdt_mode_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; mdt_cfg_ext_ies_container::mdt_cfg_ext_ies_container() : sig_based_mdtplmn_list(178, crit_e::ignore) {} SRSASN_CODE mdt_cfg_ext_ies_container::pack(bit_ref& bref) const @@ -25218,16 +24838,14 @@ SRSASN_CODE mdt_cfg_ext_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 178: - sig_based_mdtplmn_list_present = true; - sig_based_mdtplmn_list.id = c.id; - sig_based_mdtplmn_list.crit = c.crit; - sig_based_mdtplmn_list.ext = c.ext_value.sig_based_mdtplmn_list(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 178) { + sig_based_mdtplmn_list_present = true; + sig_based_mdtplmn_list.id = c.id; + sig_based_mdtplmn_list.crit = c.crit; + sig_based_mdtplmn_list.ext = c.ext_value.sig_based_mdtplmn_list(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -25290,70 +24908,57 @@ void mdt_cfg_s::to_json(json_writer& j) const // ProSeUEtoNetworkRelaying ::= ENUMERATED std::string pro_se_ueto_network_relaying_opts::to_string() const { - static constexpr const char* options[] = {"authorized", "not-authorized"}; + static const char* options[] = {"authorized", "not-authorized"}; return convert_enum_idx(options, 2, value, "pro_se_ueto_network_relaying_e"); } // EventType ::= ENUMERATED std::string event_type_opts::to_string() const { - static constexpr const char* options[] = {"direct", "change-of-serve-cell", "stop-change-of-serve-cell"}; + static const char* options[] = {"direct", "change-of-serve-cell", "stop-change-of-serve-cell"}; return convert_enum_idx(options, 3, value, "event_type_e"); } // PedestrianUE ::= ENUMERATED std::string pedestrian_ue_opts::to_string() const { - static constexpr const char* options[] = {"authorized", "not-authorized"}; + static const char* options[] = {"authorized", "not-authorized"}; return convert_enum_idx(options, 2, value, "pedestrian_ue_e"); } // ProSeAuthorized-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t pro_se_authorized_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {216}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {216}; + return map_enum_number(options, 1, idx, "id"); } bool pro_se_authorized_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {216}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 216 == id; } crit_e pro_se_authorized_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 216: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 216) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } pro_se_authorized_ext_ies_o::ext_c pro_se_authorized_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 216: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 216) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e pro_se_authorized_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 216: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 216) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -25378,82 +24983,69 @@ SRSASN_CODE pro_se_authorized_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string pro_se_authorized_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"ProSeUEtoNetworkRelaying"}; + static const char* options[] = {"ProSeUEtoNetworkRelaying"}; return convert_enum_idx(options, 1, value, "pro_se_authorized_ext_ies_o::ext_c::types"); } uint8_t pro_se_authorized_ext_ies_o::ext_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {2}; - return convert_enum_idx(options, 1, value, "pro_se_authorized_ext_ies_o::ext_c::types"); + static const uint8_t options[] = {2}; + return map_enum_number(options, 1, value, "pro_se_authorized_ext_ies_o::ext_c::types"); } // ProSeDirectCommunication ::= ENUMERATED std::string pro_se_direct_communication_opts::to_string() const { - static constexpr const char* options[] = {"authorized", "not-authorized"}; + static const char* options[] = {"authorized", "not-authorized"}; return convert_enum_idx(options, 2, value, "pro_se_direct_communication_e"); } // ProSeDirectDiscovery ::= ENUMERATED std::string pro_se_direct_discovery_opts::to_string() const { - static constexpr const char* options[] = {"authorized", "not-authorized"}; + static const char* options[] = {"authorized", "not-authorized"}; return convert_enum_idx(options, 2, value, "pro_se_direct_discovery_e"); } // ReportArea ::= ENUMERATED std::string report_area_opts::to_string() const { - static constexpr const char* options[] = {"ecgi"}; + static const char* options[] = {"ecgi"}; return convert_enum_idx(options, 1, value, "report_area_e"); } // TraceActivation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t trace_activation_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {162}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {162}; + return map_enum_number(options, 1, idx, "id"); } bool trace_activation_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {162}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 162 == id; } crit_e trace_activation_ext_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 162: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 162) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } trace_activation_ext_ies_o::ext_c trace_activation_ext_ies_o::get_ext(const uint32_t& id) { ext_c ret{}; - switch (id) { - case 162: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 162) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e trace_activation_ext_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 162: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 162) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Extension ::= OPEN TYPE @@ -25479,37 +25071,37 @@ SRSASN_CODE trace_activation_ext_ies_o::ext_c::unpack(cbit_ref& bref) std::string trace_activation_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"MDT-Configuration"}; + static const char* options[] = {"MDT-Configuration"}; return convert_enum_idx(options, 1, value, "trace_activation_ext_ies_o::ext_c::types"); } // TraceDepth ::= ENUMERATED std::string trace_depth_opts::to_string() const { - static constexpr const char* options[] = {"minimum", - "medium", - "maximum", - "minimumWithoutVendorSpecificExtension", - "mediumWithoutVendorSpecificExtension", - "maximumWithoutVendorSpecificExtension"}; + static const char* options[] = {"minimum", + "medium", + "maximum", + "minimumWithoutVendorSpecificExtension", + "mediumWithoutVendorSpecificExtension", + "maximumWithoutVendorSpecificExtension"}; return convert_enum_idx(options, 6, value, "trace_depth_e"); } // VehicleUE ::= ENUMERATED std::string vehicle_ue_opts::to_string() const { - static constexpr const char* options[] = {"authorized", "not-authorized"}; + static const char* options[] = {"authorized", "not-authorized"}; return convert_enum_idx(options, 2, value, "vehicle_ue_e"); } // ManagementBasedMDTAllowed ::= ENUMERATED std::string management_based_mdt_allowed_opts::to_string() const { - static constexpr const char* options[] = {"allowed"}; + static const char* options[] = {"allowed"}; return convert_enum_idx(options, 1, value, "management_based_mdt_allowed_e"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; pro_se_authorized_ext_ies_container::pro_se_authorized_ext_ies_container() : pro_se_ueto_network_relaying(216, crit_e::ignore) @@ -25535,16 +25127,14 @@ SRSASN_CODE pro_se_authorized_ext_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 216: - pro_se_ueto_network_relaying_present = true; - pro_se_ueto_network_relaying.id = c.id; - pro_se_ueto_network_relaying.crit = c.crit; - pro_se_ueto_network_relaying.ext = c.ext_value.pro_se_ueto_network_relaying(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 216) { + pro_se_ueto_network_relaying_present = true; + pro_se_ueto_network_relaying.id = c.id; + pro_se_ueto_network_relaying.crit = c.crit; + pro_se_ueto_network_relaying.ext = c.ext_value.pro_se_ueto_network_relaying(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -25693,7 +25283,7 @@ void security_context_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; trace_activation_ext_ies_container::trace_activation_ext_ies_container() : mdt_cfg(162, crit_e::ignore) {} SRSASN_CODE trace_activation_ext_ies_container::pack(bit_ref& bref) const @@ -25716,16 +25306,14 @@ SRSASN_CODE trace_activation_ext_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ext_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 162: - mdt_cfg_present = true; - mdt_cfg.id = c.id; - mdt_cfg.crit = c.crit; - mdt_cfg.ext = c.ext_value.mdt_cfg(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 162) { + mdt_cfg_present = true; + mdt_cfg.id = c.id; + mdt_cfg.crit = c.crit; + mdt_cfg.ext = c.ext_value.mdt_cfg(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -25866,7 +25454,7 @@ void ue_sidelink_aggregate_maximum_bitrate_s::to_json(json_writer& j) const // UEUserPlaneCIoTSupportIndicator ::= ENUMERATED std::string ueuser_plane_cio_tsupport_ind_opts::to_string() const { - static constexpr const char* options[] = {"supported"}; + static const char* options[] = {"supported"}; return convert_enum_idx(options, 1, value, "ueuser_plane_cio_tsupport_ind_e"); } @@ -25928,16 +25516,16 @@ void v2xservices_authorized_s::to_json(json_writer& j) const // HandoverRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ho_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 1, 2, 66, 53, 104, 107, 41, 25, 98, 124, 40, 136, 127, - 146, 75, 158, 165, 177, 192, 196, 195, 241, 240, 248, 251, 271, 283}; - return convert_enum_idx(options, 28, idx, "id"); + static const uint32_t options[] = {0, 1, 2, 66, 53, 104, 107, 41, 25, 98, 124, 40, 136, 127, + 146, 75, 158, 165, 177, 192, 196, 195, 241, 240, 248, 251, 271, 283}; + return map_enum_number(options, 28, idx, "id"); } bool ho_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 1, 2, 66, 53, 104, 107, 41, 25, 98, 124, 40, 136, 127, - 146, 75, 158, 165, 177, 192, 196, 195, 241, 240, 248, 251, 271, 283}; - for (uint32_t i = 0; i < 28; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 1, 2, 66, 53, 104, 107, 41, 25, 98, 124, 40, 136, 127, + 146, 75, 158, 165, 177, 192, 196, 195, 241, 240, 248, 251, 271, 283}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -26003,9 +25591,9 @@ crit_e ho_request_ies_o::get_crit(const uint32_t& id) case 283: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_request_ies_o::value_c ho_request_ies_o::get_value(const uint32_t& id) { @@ -26096,7 +25684,7 @@ ho_request_ies_o::value_c ho_request_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::pending_data_ind); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -26160,9 +25748,9 @@ presence_e ho_request_ies_o::get_presence(const uint32_t& id) case 283: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -26854,8 +26442,8 @@ void ho_request_ies_o::value_c::to_json(json_writer& j) const break; case types::management_based_mdtplmn_list: j.start_array("MDTPLMNList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -27086,38 +26674,38 @@ SRSASN_CODE ho_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "HandoverType", - "Cause", - "UEAggregateMaximumBitrate", - "", - "OCTET STRING", - "UESecurityCapabilities", - "HandoverRestrictionList", - "TraceActivation", - "RequestType", - "SRVCCOperationPossible", - "SecurityContext", - "OCTET STRING", - "BIT STRING", - "CSGMembershipStatus", - "GUMMEI", - "INTEGER (0..4294967295)", - "ManagementBasedMDTAllowed", - "MDTPLMNList", - "BIT STRING", - "ExpectedUEBehaviour", - "ProSeAuthorized", - "UEUserPlaneCIoTSupportIndicator", - "V2XServicesAuthorized", - "UESidelinkAggregateMaximumBitrate", - "EnhancedCoverageRestricted", - "CE-ModeBRestricted", - "PendingDataIndication"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "HandoverType", + "Cause", + "UEAggregateMaximumBitrate", + "", + "OCTET STRING", + "UESecurityCapabilities", + "HandoverRestrictionList", + "TraceActivation", + "RequestType", + "SRVCCOperationPossible", + "SecurityContext", + "OCTET STRING", + "BIT STRING", + "CSGMembershipStatus", + "GUMMEI", + "INTEGER (0..4294967295)", + "ManagementBasedMDTAllowed", + "MDTPLMNList", + "BIT STRING", + "ExpectedUEBehaviour", + "ProSeAuthorized", + "UEUserPlaneCIoTSupportIndicator", + "V2XServicesAuthorized", + "UESidelinkAggregateMaximumBitrate", + "EnhancedCoverageRestricted", + "CE-ModeBRestricted", + "PendingDataIndication"}; return convert_enum_idx(options, 28, value, "ho_request_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ho_request_ies_container::ho_request_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -27426,12 +27014,13 @@ SRSASN_CODE ho_request_ies_container::unpack(cbit_ref& bref) pending_data_ind.value = c.value.pending_data_ind(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -27564,21 +27153,21 @@ void ho_request_s::to_json(json_writer& j) const // CE-mode-B-SupportIndicator ::= ENUMERATED std::string ce_mode_b_support_ind_opts::to_string() const { - static constexpr const char* options[] = {"supported"}; + static const char* options[] = {"supported"}; return convert_enum_idx(options, 1, value, "ce_mode_b_support_ind_e"); } // HandoverRequestAcknowledgeIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ho_request_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 18, 19, 123, 127, 58, 145, 242}; - return convert_enum_idx(options, 9, idx, "id"); + static const uint32_t options[] = {0, 8, 18, 19, 123, 127, 58, 145, 242}; + return map_enum_number(options, 9, idx, "id"); } bool ho_request_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 18, 19, 123, 127, 58, 145, 242}; - for (uint32_t i = 0; i < 9; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 18, 19, 123, 127, 58, 145, 242}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -27606,9 +27195,9 @@ crit_e ho_request_ack_ies_o::get_crit(const uint32_t& id) case 242: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_request_ack_ies_o::value_c ho_request_ack_ies_o::get_value(const uint32_t& id) { @@ -27642,7 +27231,7 @@ ho_request_ack_ies_o::value_c ho_request_ack_ies_o::get_value(const uint32_t& id ret.set(value_c::types::ce_mode_b_support_ind); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -27668,9 +27257,9 @@ presence_e ho_request_ack_ies_o::get_presence(const uint32_t& id) case 242: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -28016,19 +27605,19 @@ SRSASN_CODE ho_request_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_request_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "", - "", - "OCTET STRING", - "BIT STRING", - "CriticalityDiagnostics", - "CellAccessMode", - "CE-mode-B-SupportIndicator"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "", + "", + "OCTET STRING", + "BIT STRING", + "CriticalityDiagnostics", + "CellAccessMode", + "CE-mode-B-SupportIndicator"}; return convert_enum_idx(options, 9, value, "ho_request_ack_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ho_request_ack_ies_container::ho_request_ack_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -28140,12 +27729,13 @@ SRSASN_CODE ho_request_ack_ies_container::unpack(cbit_ref& bref) ce_mode_b_support_ind.value = c.value.ce_mode_b_support_ind(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -28210,21 +27800,21 @@ void ho_request_ack_s::to_json(json_writer& j) const // Direct-Forwarding-Path-Availability ::= ENUMERATED std::string direct_forwarding_path_availability_opts::to_string() const { - static constexpr const char* options[] = {"directPathAvailable"}; + static const char* options[] = {"directPathAvailable"}; return convert_enum_idx(options, 1, value, "direct_forwarding_path_availability_e"); } // PS-ServiceNotAvailable ::= ENUMERATED std::string ps_service_not_available_opts::to_string() const { - static constexpr const char* options[] = {"ps-service-not-available"}; + static const char* options[] = {"ps-service-not-available"}; return convert_enum_idx(options, 1, value, "ps_service_not_available_e"); } // SRVCCHOIndication ::= ENUMERATED std::string srvccho_ind_opts::to_string() const { - static constexpr const char* options[] = {"pSandCS", "cSonly"}; + static const char* options[] = {"pSandCS", "cSonly"}; return convert_enum_idx(options, 2, value, "srvccho_ind_e"); } @@ -28372,21 +27962,21 @@ SRSASN_CODE target_id_c::unpack(cbit_ref& bref) std::string target_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"targeteNB-ID", "targetRNC-ID", "cGI"}; + static const char* options[] = {"targeteNB-ID", "targetRNC-ID", "cGI"}; return convert_enum_idx(options, 3, value, "target_id_c::types"); } // HandoverRequiredIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ho_required_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 1, 2, 4, 79, 125, 104, 138, 132, 133, 127, 145, 150}; - return convert_enum_idx(options, 14, idx, "id"); + static const uint32_t options[] = {0, 8, 1, 2, 4, 79, 125, 104, 138, 132, 133, 127, 145, 150}; + return map_enum_number(options, 14, idx, "id"); } bool ho_required_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 1, 2, 4, 79, 125, 104, 138, 132, 133, 127, 145, 150}; - for (uint32_t i = 0; i < 14; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 1, 2, 4, 79, 125, 104, 138, 132, 133, 127, 145, 150}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -28424,9 +28014,9 @@ crit_e ho_required_ies_o::get_crit(const uint32_t& id) case 150: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ho_required_ies_o::value_c ho_required_ies_o::get_value(const uint32_t& id) { @@ -28475,7 +28065,7 @@ ho_required_ies_o::value_c ho_required_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::ps_service_not_available); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -28511,9 +28101,9 @@ presence_e ho_required_ies_o::get_presence(const uint32_t& id) case 150: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -29000,24 +28590,24 @@ SRSASN_CODE ho_required_ies_o::value_c::unpack(cbit_ref& bref) std::string ho_required_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "HandoverType", - "Cause", - "TargetID", - "Direct-Forwarding-Path-Availability", - "SRVCCHOIndication", - "OCTET STRING", - "OCTET STRING", - "OCTET STRING", - "OCTET STRING", - "BIT STRING", - "CellAccessMode", - "PS-ServiceNotAvailable"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "HandoverType", + "Cause", + "TargetID", + "Direct-Forwarding-Path-Availability", + "SRVCCHOIndication", + "OCTET STRING", + "OCTET STRING", + "OCTET STRING", + "OCTET STRING", + "BIT STRING", + "CellAccessMode", + "PS-ServiceNotAvailable"}; return convert_enum_idx(options, 14, value, "ho_required_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ho_required_ies_container::ho_required_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -29179,12 +28769,13 @@ SRSASN_CODE ho_required_ies_container::unpack(cbit_ref& bref) ps_service_not_available.value = c.value.ps_service_not_available(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -29384,7 +28975,7 @@ SRSASN_CODE mme_paging_target_c::unpack(cbit_ref& bref) std::string mme_paging_target_c::types_opts::to_string() const { - static constexpr const char* options[] = {"global-ENB-ID", "tAI"}; + static const char* options[] = {"global-ENB-ID", "tAI"}; return convert_enum_idx(options, 2, value, "mme_paging_target_c::types"); } @@ -29428,49 +29019,36 @@ void recommended_enb_item_s::to_json(json_writer& j) const // RecommendedENBItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t recommended_enb_item_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {215}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {215}; + return map_enum_number(options, 1, idx, "id"); } bool recommended_enb_item_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {215}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 215 == id; } crit_e recommended_enb_item_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 215: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 215) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } recommended_enb_item_ies_o::value_c recommended_enb_item_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 215: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 215) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e recommended_enb_item_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 215: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 215) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -29496,11 +29074,11 @@ SRSASN_CODE recommended_enb_item_ies_o::value_c::unpack(cbit_ref& bref) std::string recommended_enb_item_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"RecommendedENBItem"}; + static const char* options[] = {"RecommendedENBItem"}; return convert_enum_idx(options, 1, value, "recommended_enb_item_ies_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // RecommendedENBsForPaging ::= SEQUENCE SRSASN_CODE recommended_enbs_for_paging_s::pack(bit_ref& bref) const @@ -29531,8 +29109,8 @@ void recommended_enbs_for_paging_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("recommendedENBList"); - for (uint32_t i1 = 0; i1 < recommended_enb_list.size(); ++i1) { - recommended_enb_list[i1].to_json(j); + for (const auto& e1 : recommended_enb_list) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { @@ -29586,14 +29164,14 @@ void info_on_recommended_cells_and_enbs_for_paging_s::to_json(json_writer& j) co // InitialContextSetupFailureIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t init_context_setup_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 2, 58}; + return map_enum_number(options, 4, idx, "id"); } bool init_context_setup_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 2, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -29611,9 +29189,9 @@ crit_e init_context_setup_fail_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } init_context_setup_fail_ies_o::value_c init_context_setup_fail_ies_o::get_value(const uint32_t& id) { @@ -29632,7 +29210,7 @@ init_context_setup_fail_ies_o::value_c init_context_setup_fail_ies_o::get_value( ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -29648,9 +29226,9 @@ presence_e init_context_setup_fail_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -29848,12 +29426,12 @@ SRSASN_CODE init_context_setup_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string init_context_setup_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "init_context_setup_fail_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; init_context_setup_fail_ies_container::init_context_setup_fail_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -29913,12 +29491,13 @@ SRSASN_CODE init_context_setup_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -29965,30 +29544,30 @@ void init_context_setup_fail_s::to_json(json_writer& j) const // AdditionalCSFallbackIndicator ::= ENUMERATED std::string add_cs_fallback_ind_opts::to_string() const { - static constexpr const char* options[] = {"no-restriction", "restriction"}; + static const char* options[] = {"no-restriction", "restriction"}; return convert_enum_idx(options, 2, value, "add_cs_fallback_ind_e"); } // CSFallbackIndicator ::= ENUMERATED std::string cs_fallback_ind_opts::to_string() const { - static constexpr const char* options[] = {"cs-fallback-required", "cs-fallback-high-priority"}; + static const char* options[] = {"cs-fallback-required", "cs-fallback-high-priority"}; return convert_enum_idx(options, 2, value, "cs_fallback_ind_e"); } // InitialContextSetupRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t init_context_setup_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 66, 24, 107, 73, 25, 41, 74, 106, 108, 124, 146, 159, - 75, 158, 165, 177, 187, 192, 196, 195, 241, 240, 248, 251, 271, 283}; - return convert_enum_idx(options, 28, idx, "id"); + static const uint32_t options[] = {0, 8, 66, 24, 107, 73, 25, 41, 74, 106, 108, 124, 146, 159, + 75, 158, 165, 177, 187, 192, 196, 195, 241, 240, 248, 251, 271, 283}; + return map_enum_number(options, 28, idx, "id"); } bool init_context_setup_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 66, 24, 107, 73, 25, 41, 74, 106, 108, 124, 146, 159, - 75, 158, 165, 177, 187, 192, 196, 195, 241, 240, 248, 251, 271, 283}; - for (uint32_t i = 0; i < 28; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 66, 24, 107, 73, 25, 41, 74, 106, 108, 124, 146, 159, + 75, 158, 165, 177, 187, 192, 196, 195, 241, 240, 248, 251, 271, 283}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -30054,9 +29633,9 @@ crit_e init_context_setup_request_ies_o::get_crit(const uint32_t& id) case 283: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } init_context_setup_request_ies_o::value_c init_context_setup_request_ies_o::get_value(const uint32_t& id) { @@ -30147,7 +29726,7 @@ init_context_setup_request_ies_o::value_c init_context_setup_request_ies_o::get_ ret.set(value_c::types::pending_data_ind); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -30211,9 +29790,9 @@ presence_e init_context_setup_request_ies_o::get_presence(const uint32_t& id) case 283: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -30844,8 +30423,8 @@ void init_context_setup_request_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_to_be_setup_list_ctxt_su_req: j.start_array("E-RABToBeSetupListCtxtSUReq"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -30895,8 +30474,8 @@ void init_context_setup_request_ies_o::value_c::to_json(json_writer& j) const break; case types::management_based_mdtplmn_list: j.start_array("MDTPLMNList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -31130,38 +30709,38 @@ SRSASN_CODE init_context_setup_request_ies_o::value_c::unpack(cbit_ref& bref) std::string init_context_setup_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "UEAggregateMaximumBitrate", - "E-RABToBeSetupListCtxtSUReq", - "UESecurityCapabilities", - "BIT STRING", - "TraceActivation", - "HandoverRestrictionList", - "OCTET STRING", - "INTEGER (1..256)", - "CSFallbackIndicator", - "SRVCCOperationPossible", - "CSGMembershipStatus", - "LAI", - "GUMMEI", - "INTEGER (0..4294967295)", - "ManagementBasedMDTAllowed", - "MDTPLMNList", - "AdditionalCSFallbackIndicator", - "BIT STRING", - "ExpectedUEBehaviour", - "ProSeAuthorized", - "UEUserPlaneCIoTSupportIndicator", - "V2XServicesAuthorized", - "UESidelinkAggregateMaximumBitrate", - "EnhancedCoverageRestricted", - "CE-ModeBRestricted", - "PendingDataIndication"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "UEAggregateMaximumBitrate", + "E-RABToBeSetupListCtxtSUReq", + "UESecurityCapabilities", + "BIT STRING", + "TraceActivation", + "HandoverRestrictionList", + "OCTET STRING", + "INTEGER (1..256)", + "CSFallbackIndicator", + "SRVCCOperationPossible", + "CSGMembershipStatus", + "LAI", + "GUMMEI", + "INTEGER (0..4294967295)", + "ManagementBasedMDTAllowed", + "MDTPLMNList", + "AdditionalCSFallbackIndicator", + "BIT STRING", + "ExpectedUEBehaviour", + "ProSeAuthorized", + "UEUserPlaneCIoTSupportIndicator", + "V2XServicesAuthorized", + "UESidelinkAggregateMaximumBitrate", + "EnhancedCoverageRestricted", + "CE-ModeBRestricted", + "PendingDataIndication"}; return convert_enum_idx(options, 28, value, "init_context_setup_request_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; init_context_setup_request_ies_container::init_context_setup_request_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -31476,12 +31055,13 @@ SRSASN_CODE init_context_setup_request_ies_container::unpack(cbit_ref& bref) pending_data_ind.value = c.value.pending_data_ind(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -31618,14 +31198,14 @@ void init_context_setup_request_s::to_json(json_writer& j) const // InitialContextSetupResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t init_context_setup_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 51, 48, 58}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {0, 8, 51, 48, 58}; + return map_enum_number(options, 5, idx, "id"); } bool init_context_setup_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 51, 48, 58}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 51, 48, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -31645,9 +31225,9 @@ crit_e init_context_setup_resp_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } init_context_setup_resp_ies_o::value_c init_context_setup_resp_ies_o::get_value(const uint32_t& id) { @@ -31669,7 +31249,7 @@ init_context_setup_resp_ies_o::value_c init_context_setup_resp_ies_o::get_value( ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -31687,9 +31267,9 @@ presence_e init_context_setup_resp_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -31851,15 +31431,15 @@ void init_context_setup_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_setup_list_ctxt_su_res: j.start_array("E-RABSetupListCtxtSURes"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::erab_failed_to_setup_list_ctxt_su_res: j.start_array("E-RABList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -31925,15 +31505,15 @@ SRSASN_CODE init_context_setup_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string init_context_setup_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "E-RABSetupListCtxtSURes", - "E-RABList", - "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "E-RABSetupListCtxtSURes", + "E-RABList", + "CriticalityDiagnostics"}; return convert_enum_idx(options, 5, value, "init_context_setup_resp_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; init_context_setup_resp_ies_container::init_context_setup_resp_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -32004,12 +31584,13 @@ SRSASN_CODE init_context_setup_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -32060,51 +31641,51 @@ void init_context_setup_resp_s::to_json(json_writer& j) const // Coverage-Level ::= ENUMERATED std::string coverage_level_opts::to_string() const { - static constexpr const char* options[] = {"extendedcoverage"}; + static const char* options[] = {"extendedcoverage"}; return convert_enum_idx(options, 1, value, "coverage_level_e"); } // GUMMEIType ::= ENUMERATED std::string gummei_type_opts::to_string() const { - static constexpr const char* options[] = {"native", "mapped"}; + static const char* options[] = {"native", "mapped"}; return convert_enum_idx(options, 2, value, "gummei_type_e"); } // RRC-Establishment-Cause ::= ENUMERATED std::string rrc_establishment_cause_opts::to_string() const { - static constexpr const char* options[] = {"emergency", - "highPriorityAccess", - "mt-Access", - "mo-Signalling", - "mo-Data", - "delay-TolerantAccess", - "mo-VoiceCall", - "mo-ExceptionData"}; + static const char* options[] = {"emergency", + "highPriorityAccess", + "mt-Access", + "mo-Signalling", + "mo-Data", + "delay-TolerantAccess", + "mo-VoiceCall", + "mo-ExceptionData"}; return convert_enum_idx(options, 8, value, "rrc_establishment_cause_e"); } // RelayNode-Indicator ::= ENUMERATED std::string relay_node_ind_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "relay_node_ind_e"); } // InitialUEMessage-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t init_ue_msg_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {8, 26, 67, 100, 134, 96, 127, 75, 145, 155, - 160, 170, 176, 184, 186, 223, 230, 242, 246, 250}; - return convert_enum_idx(options, 20, idx, "id"); + static const uint32_t options[] = {8, 26, 67, 100, 134, 96, 127, 75, 145, 155, + 160, 170, 176, 184, 186, 223, 230, 242, 246, 250}; + return map_enum_number(options, 20, idx, "id"); } bool init_ue_msg_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {8, 26, 67, 100, 134, 96, 127, 75, 145, 155, - 160, 170, 176, 184, 186, 223, 230, 242, 246, 250}; - for (uint32_t i = 0; i < 20; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {8, 26, 67, 100, 134, 96, 127, 75, 145, 155, + 160, 170, 176, 184, 186, 223, 230, 242, 246, 250}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -32154,9 +31735,9 @@ crit_e init_ue_msg_ies_o::get_crit(const uint32_t& id) case 250: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } init_ue_msg_ies_o::value_c init_ue_msg_ies_o::get_value(const uint32_t& id) { @@ -32223,7 +31804,7 @@ init_ue_msg_ies_o::value_c init_ue_msg_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::coverage_level); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -32271,9 +31852,9 @@ presence_e init_ue_msg_ies_o::get_presence(const uint32_t& id) case 250: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -32941,30 +32522,30 @@ SRSASN_CODE init_ue_msg_ies_o::value_c::unpack(cbit_ref& bref) std::string init_ue_msg_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..16777215)", - "OCTET STRING", - "TAI", - "EUTRAN-CGI", - "RRC-Establishment-Cause", - "S-TMSI", - "BIT STRING", - "GUMMEI", - "CellAccessMode", - "BIT STRING", - "RelayNode-Indicator", - "GUMMEIType", - "TunnelInformation", - "BIT STRING", - "OCTET STRING", - "OCTET STRING", - "INTEGER (0..255)", - "CE-mode-B-SupportIndicator", - "INTEGER (0..65535)", - "Coverage-Level"}; + static const char* options[] = {"INTEGER (0..16777215)", + "OCTET STRING", + "TAI", + "EUTRAN-CGI", + "RRC-Establishment-Cause", + "S-TMSI", + "BIT STRING", + "GUMMEI", + "CellAccessMode", + "BIT STRING", + "RelayNode-Indicator", + "GUMMEIType", + "TunnelInformation", + "BIT STRING", + "OCTET STRING", + "OCTET STRING", + "INTEGER (0..255)", + "CE-mode-B-SupportIndicator", + "INTEGER (0..65535)", + "Coverage-Level"}; return convert_enum_idx(options, 20, value, "init_ue_msg_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; init_ue_msg_ies_container::init_ue_msg_ies_container() : enb_ue_s1ap_id(8, crit_e::reject), @@ -33194,12 +32775,13 @@ SRSASN_CODE init_ue_msg_ies_container::unpack(cbit_ref& bref) coverage_level.value = c.value.coverage_level(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -33406,49 +32988,36 @@ void tai_item_s::to_json(json_writer& j) const // UE-associatedLogicalS1-ConnectionItemRes ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_associated_lc_s1_conn_item_res_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {91}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {91}; + return map_enum_number(options, 1, idx, "id"); } bool ue_associated_lc_s1_conn_item_res_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {91}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 91 == id; } crit_e ue_associated_lc_s1_conn_item_res_o::get_crit(const uint32_t& id) { - switch (id) { - case 91: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 91) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } ue_associated_lc_s1_conn_item_res_o::value_c ue_associated_lc_s1_conn_item_res_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 91: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 91) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e ue_associated_lc_s1_conn_item_res_o::get_presence(const uint32_t& id) { - switch (id) { - case 91: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 91) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -33474,45 +33043,45 @@ SRSASN_CODE ue_associated_lc_s1_conn_item_res_o::value_c::unpack(cbit_ref& bref) std::string ue_associated_lc_s1_conn_item_res_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"UE-associatedLogicalS1-ConnectionItem"}; + static const char* options[] = {"UE-associatedLogicalS1-ConnectionItem"}; return convert_enum_idx(options, 1, value, "ue_associated_lc_s1_conn_item_res_o::value_c::types"); } uint8_t ue_associated_lc_s1_conn_item_res_o::value_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ue_associated_lc_s1_conn_item_res_o::value_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ue_associated_lc_s1_conn_item_res_o::value_c::types"); } // NB-IoT-Paging-eDRX-Cycle ::= ENUMERATED std::string nb_io_t_paging_e_drx_cycle_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "hf2", "hf4", "hf6", "hf8", "hf10", "hf12", "hf14", "hf16", "hf32", "hf64", "hf128", "hf256", "hf512", "hf1024"}; return convert_enum_idx(options, 14, value, "nb_io_t_paging_e_drx_cycle_e"); } uint16_t nb_io_t_paging_e_drx_cycle_opts::to_number() const { - static constexpr uint16_t options[] = {2, 4, 6, 8, 10, 12, 14, 16, 32, 64, 128, 256, 512, 1024}; - return convert_enum_idx(options, 14, value, "nb_io_t_paging_e_drx_cycle_e"); + static const uint16_t options[] = {2, 4, 6, 8, 10, 12, 14, 16, 32, 64, 128, 256, 512, 1024}; + return map_enum_number(options, 14, value, "nb_io_t_paging_e_drx_cycle_e"); } // NB-IoT-PagingTimeWindow ::= ENUMERATED std::string nb_io_t_paging_time_win_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16"}; return convert_enum_idx(options, 16, value, "nb_io_t_paging_time_win_e"); } uint8_t nb_io_t_paging_time_win_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - return convert_enum_idx(options, 16, value, "nb_io_t_paging_time_win_e"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + return map_enum_number(options, 16, value, "nb_io_t_paging_time_win_e"); } // OverloadAction ::= ENUMERATED std::string overload_action_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "reject-non-emergency-mo-dt", "reject-rrc-cr-signalling", "permit-emergency-sessions-and-mobile-terminated-services-only", @@ -33526,39 +33095,38 @@ std::string overload_action_opts::to_string() const // Paging-eDRX-Cycle ::= ENUMERATED std::string paging_e_drx_cycle_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "hfhalf", "hf1", "hf2", "hf4", "hf6", "hf8", "hf10", "hf12", "hf14", "hf16", "hf32", "hf64", "hf128", "hf256"}; return convert_enum_idx(options, 14, value, "paging_e_drx_cycle_e"); } float paging_e_drx_cycle_opts::to_number() const { - static constexpr float options[] = {0.5, 1.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 32.0, 64.0, 128.0, 256.0}; - return convert_enum_idx(options, 14, value, "paging_e_drx_cycle_e"); + static const float options[] = {0.5, 1.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 32.0, 64.0, 128.0, 256.0}; + return map_enum_number(options, 14, value, "paging_e_drx_cycle_e"); } std::string paging_e_drx_cycle_opts::to_number_string() const { - static constexpr const char* options[] = { - "0.5", "1", "2", "4", "6", "8", "10", "12", "14", "16", "32", "64", "128", "256"}; + static const char* options[] = {"0.5", "1", "2", "4", "6", "8", "10", "12", "14", "16", "32", "64", "128", "256"}; return convert_enum_idx(options, 14, value, "paging_e_drx_cycle_e"); } // PagingTimeWindow ::= ENUMERATED std::string paging_time_win_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16"}; return convert_enum_idx(options, 16, value, "paging_time_win_e"); } uint8_t paging_time_win_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - return convert_enum_idx(options, 16, value, "paging_time_win_e"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + return map_enum_number(options, 16, value, "paging_time_win_e"); } // ResetAll ::= ENUMERATED std::string reset_all_opts::to_string() const { - static constexpr const char* options[] = {"reset-all"}; + static const char* options[] = {"reset-all"}; return convert_enum_idx(options, 1, value, "reset_all_e"); } @@ -33634,18 +33202,18 @@ void served_gummeis_item_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("servedPLMNs"); - for (uint32_t i1 = 0; i1 < served_plmns.size(); ++i1) { - j.write_str(served_plmns[i1].to_string()); + for (const auto& e1 : served_plmns) { + j.write_str(e1.to_string()); } j.end_array(); j.start_array("servedGroupIDs"); - for (uint32_t i1 = 0; i1 < served_group_ids.size(); ++i1) { - j.write_str(served_group_ids[i1].to_string()); + for (const auto& e1 : served_group_ids) { + j.write_str(e1.to_string()); } j.end_array(); j.start_array("servedMMECs"); - for (uint32_t i1 = 0; i1 < served_mmecs.size(); ++i1) { - j.write_str(served_mmecs[i1].to_string()); + for (const auto& e1 : served_mmecs) { + j.write_str(e1.to_string()); } j.end_array(); if (ie_exts_present) { @@ -33658,49 +33226,36 @@ void served_gummeis_item_s::to_json(json_writer& j) const // TAIItemIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t tai_item_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {47}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {47}; + return map_enum_number(options, 1, idx, "id"); } bool tai_item_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {47}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 47 == id; } crit_e tai_item_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 47: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 47) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } tai_item_ies_o::value_c tai_item_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 47: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 47) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e tai_item_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 47: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 47) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -33726,7 +33281,7 @@ SRSASN_CODE tai_item_ies_o::value_c::unpack(cbit_ref& bref) std::string tai_item_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"TAIItem"}; + static const char* options[] = {"TAIItem"}; return convert_enum_idx(options, 1, value, "tai_item_ies_o::value_c::types"); } @@ -33772,49 +33327,36 @@ void ue_s1ap_id_pair_s::to_json(json_writer& j) const // UE-associatedLogicalS1-ConnectionItemResAck ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_associated_lc_s1_conn_item_res_ack_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {91}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {91}; + return map_enum_number(options, 1, idx, "id"); } bool ue_associated_lc_s1_conn_item_res_ack_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {91}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 91 == id; } crit_e ue_associated_lc_s1_conn_item_res_ack_o::get_crit(const uint32_t& id) { - switch (id) { - case 91: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 91) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } ue_associated_lc_s1_conn_item_res_ack_o::value_c ue_associated_lc_s1_conn_item_res_ack_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 91: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 91) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e ue_associated_lc_s1_conn_item_res_ack_o::get_presence(const uint32_t& id) { - switch (id) { - case 91: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 91) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -33840,56 +33382,56 @@ SRSASN_CODE ue_associated_lc_s1_conn_item_res_ack_o::value_c::unpack(cbit_ref& b std::string ue_associated_lc_s1_conn_item_res_ack_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"UE-associatedLogicalS1-ConnectionItem"}; + static const char* options[] = {"UE-associatedLogicalS1-ConnectionItem"}; return convert_enum_idx(options, 1, value, "ue_associated_lc_s1_conn_item_res_ack_o::value_c::types"); } uint8_t ue_associated_lc_s1_conn_item_res_ack_o::value_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ue_associated_lc_s1_conn_item_res_ack_o::value_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ue_associated_lc_s1_conn_item_res_ack_o::value_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // CNDomain ::= ENUMERATED std::string cn_domain_opts::to_string() const { - static constexpr const char* options[] = {"ps", "cs"}; + static const char* options[] = {"ps", "cs"}; return convert_enum_idx(options, 2, value, "cn_domain_e"); } // Cdma2000HORequiredIndication ::= ENUMERATED std::string cdma2000_ho_required_ind_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "cdma2000_ho_required_ind_e"); } // ConcurrentWarningMessageIndicator ::= ENUMERATED std::string concurrent_warning_msg_ind_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "concurrent_warning_msg_ind_e"); } // GWContextReleaseIndication ::= ENUMERATED std::string gw_context_release_ind_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "gw_context_release_ind_e"); } // KillAllWarningMessages ::= ENUMERATED std::string kill_all_warning_msgs_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "kill_all_warning_msgs_e"); } // MMERelaySupportIndicator ::= ENUMERATED std::string mme_relay_support_ind_opts::to_string() const { - static constexpr const char* options[] = {"true"}; + static const char* options[] = {"true"}; return convert_enum_idx(options, 1, value, "mme_relay_support_ind_e"); } @@ -33967,7 +33509,7 @@ SRSASN_CODE overload_resp_c::unpack(cbit_ref& bref) std::string overload_resp_c::types_opts::to_string() const { - static constexpr const char* options[] = {"overloadAction"}; + static const char* options[] = {"overloadAction"}; return convert_enum_idx(options, 1, value, "overload_resp_c::types"); } @@ -34021,14 +33563,14 @@ void paging_e_drx_info_s::to_json(json_writer& j) const // PagingPriority ::= ENUMERATED std::string paging_prio_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "priolevel1", "priolevel2", "priolevel3", "priolevel4", "priolevel5", "priolevel6", "priolevel7", "priolevel8"}; return convert_enum_idx(options, 8, value, "paging_prio_e"); } uint8_t paging_prio_opts::to_number() const { - static constexpr uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8}; - return convert_enum_idx(options, 8, value, "paging_prio_e"); + static const uint8_t options[] = {1, 2, 3, 4, 5, 6, 7, 8}; + return map_enum_number(options, 8, value, "paging_prio_e"); } // ResetType ::= CHOICE @@ -34104,8 +33646,8 @@ void reset_type_c::to_json(json_writer& j) const break; case types::part_of_s1_interface: j.start_array("partOfS1-Interface"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -34151,23 +33693,23 @@ SRSASN_CODE reset_type_c::unpack(cbit_ref& bref) std::string reset_type_c::types_opts::to_string() const { - static constexpr const char* options[] = {"s1-Interface", "partOfS1-Interface"}; + static const char* options[] = {"s1-Interface", "partOfS1-Interface"}; return convert_enum_idx(options, 2, value, "reset_type_c::types"); } // SRVCCOperationNotPossible ::= ENUMERATED std::string srvcc_operation_not_possible_opts::to_string() const { - static constexpr const char* options[] = {"notPossible"}; + static const char* options[] = {"notPossible"}; return convert_enum_idx(options, 1, value, "srvcc_operation_not_possible_e"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // UE-RetentionInformation ::= ENUMERATED std::string ue_retention_info_opts::to_string() const { - static constexpr const char* options[] = {"ues-retained"}; + static const char* options[] = {"ues-retained"}; return convert_enum_idx(options, 1, value, "ue_retention_info_e"); } @@ -34288,11 +33830,11 @@ SRSASN_CODE ue_s1ap_ids_c::unpack(cbit_ref& bref) std::string ue_s1ap_ids_c::types_opts::to_string() const { - static constexpr const char* options[] = {"uE-S1AP-ID-pair", "mME-UE-S1AP-ID"}; + static const char* options[] = {"uE-S1AP-ID-pair", "mME-UE-S1AP-ID"}; return convert_enum_idx(options, 2, value, "ue_s1ap_ids_c::types"); } -template struct protocol_ie_single_container_s; +template struct asn1::s1ap::protocol_ie_single_container_s; // UEPagingID ::= CHOICE void ue_paging_id_c::destroy_() @@ -34415,14 +33957,14 @@ SRSASN_CODE ue_paging_id_c::unpack(cbit_ref& bref) std::string ue_paging_id_c::types_opts::to_string() const { - static constexpr const char* options[] = {"s-TMSI", "iMSI"}; + static const char* options[] = {"s-TMSI", "iMSI"}; return convert_enum_idx(options, 2, value, "ue_paging_id_c::types"); } // VoiceSupportMatchIndicator ::= ENUMERATED std::string voice_support_match_ind_opts::to_string() const { - static constexpr const char* options[] = {"supported", "not-supported"}; + static const char* options[] = {"supported", "not-supported"}; return convert_enum_idx(options, 2, value, "voice_support_match_ind_e"); } @@ -34512,22 +34054,22 @@ void warning_area_list_c::to_json(json_writer& j) const switch (type_) { case types::cell_id_list: j.start_array("cellIDList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::tracking_area_listfor_warning: j.start_array("trackingAreaListforWarning"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::emergency_area_id_list: j.start_array("emergencyAreaIDList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -34579,21 +34121,21 @@ SRSASN_CODE warning_area_list_c::unpack(cbit_ref& bref) std::string warning_area_list_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellIDList", "trackingAreaListforWarning", "emergencyAreaIDList"}; + static const char* options[] = {"cellIDList", "trackingAreaListforWarning", "emergencyAreaIDList"}; return convert_enum_idx(options, 3, value, "warning_area_list_c::types"); } // KillRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t kill_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {111, 112, 113, 191}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {111, 112, 113, 191}; + return map_enum_number(options, 4, idx, "id"); } bool kill_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {111, 112, 113, 191}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {111, 112, 113, 191}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -34611,9 +34153,9 @@ crit_e kill_request_ies_o::get_crit(const uint32_t& id) case 191: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } kill_request_ies_o::value_c kill_request_ies_o::get_value(const uint32_t& id) { @@ -34632,7 +34174,7 @@ kill_request_ies_o::value_c kill_request_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::kill_all_warning_msgs); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -34648,9 +34190,9 @@ presence_e kill_request_ies_o::get_presence(const uint32_t& id) case 191: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -34850,21 +34392,21 @@ SRSASN_CODE kill_request_ies_o::value_c::unpack(cbit_ref& bref) std::string kill_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"BIT STRING", "BIT STRING", "WarningAreaList", "KillAllWarningMessages"}; + static const char* options[] = {"BIT STRING", "BIT STRING", "WarningAreaList", "KillAllWarningMessages"}; return convert_enum_idx(options, 4, value, "kill_request_ies_o::value_c::types"); } // KillResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t kill_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {111, 112, 141, 58}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {111, 112, 141, 58}; + return map_enum_number(options, 4, idx, "id"); } bool kill_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {111, 112, 141, 58}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {111, 112, 141, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -34882,9 +34424,9 @@ crit_e kill_resp_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } kill_resp_ies_o::value_c kill_resp_ies_o::get_value(const uint32_t& id) { @@ -34903,7 +34445,7 @@ kill_resp_ies_o::value_c kill_resp_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -34919,9 +34461,9 @@ presence_e kill_resp_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -35126,22 +34668,21 @@ SRSASN_CODE kill_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string kill_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "BIT STRING", "BIT STRING", "BroadcastCancelledAreaList", "CriticalityDiagnostics"}; + static const char* options[] = {"BIT STRING", "BIT STRING", "BroadcastCancelledAreaList", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "kill_resp_ies_o::value_c::types"); } // LocationReportIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t location_report_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 100, 67, 98}; - return convert_enum_idx(options, 5, idx, "id"); + static const uint32_t options[] = {0, 8, 100, 67, 98}; + return map_enum_number(options, 5, idx, "id"); } bool location_report_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 100, 67, 98}; - for (uint32_t i = 0; i < 5; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 100, 67, 98}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -35161,9 +34702,9 @@ crit_e location_report_ies_o::get_crit(const uint32_t& id) case 98: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } location_report_ies_o::value_c location_report_ies_o::get_value(const uint32_t& id) { @@ -35185,7 +34726,7 @@ location_report_ies_o::value_c location_report_ies_o::get_value(const uint32_t& ret.set(value_c::types::request_type); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -35203,9 +34744,9 @@ presence_e location_report_ies_o::get_presence(const uint32_t& id) case 98: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -35434,7 +34975,7 @@ SRSASN_CODE location_report_ies_o::value_c::unpack(cbit_ref& bref) std::string location_report_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "EUTRAN-CGI", "TAI", "RequestType"}; return convert_enum_idx(options, 5, value, "location_report_ies_o::value_c::types"); } @@ -35442,14 +34983,14 @@ std::string location_report_ies_o::value_c::types_opts::to_string() const // LocationReportingControlIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t location_report_ctrl_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 98}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 8, 98}; + return map_enum_number(options, 3, idx, "id"); } bool location_report_ctrl_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 98}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 98}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -35465,9 +35006,9 @@ crit_e location_report_ctrl_ies_o::get_crit(const uint32_t& id) case 98: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } location_report_ctrl_ies_o::value_c location_report_ctrl_ies_o::get_value(const uint32_t& id) { @@ -35483,7 +35024,7 @@ location_report_ctrl_ies_o::value_c location_report_ctrl_ies_o::get_value(const ret.set(value_c::types::request_type); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -35497,9 +35038,9 @@ presence_e location_report_ctrl_ies_o::get_presence(const uint32_t& id) case 98: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -35665,21 +35206,21 @@ SRSASN_CODE location_report_ctrl_ies_o::value_c::unpack(cbit_ref& bref) std::string location_report_ctrl_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "RequestType"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "RequestType"}; return convert_enum_idx(options, 3, value, "location_report_ctrl_ies_o::value_c::types"); } // LocationReportingFailureIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t location_report_fail_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 2}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 8, 2}; + return map_enum_number(options, 3, idx, "id"); } bool location_report_fail_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 2}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 2}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -35695,9 +35236,9 @@ crit_e location_report_fail_ind_ies_o::get_crit(const uint32_t& id) case 2: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } location_report_fail_ind_ies_o::value_c location_report_fail_ind_ies_o::get_value(const uint32_t& id) { @@ -35713,7 +35254,7 @@ location_report_fail_ind_ies_o::value_c location_report_fail_ind_ies_o::get_valu ret.set(value_c::types::cause); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -35727,9 +35268,9 @@ presence_e location_report_fail_ind_ies_o::get_presence(const uint32_t& id) case 2: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -35895,21 +35436,21 @@ SRSASN_CODE location_report_fail_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string location_report_fail_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause"}; return convert_enum_idx(options, 3, value, "location_report_fail_ind_ies_o::value_c::types"); } // MMECPRelocationIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t mmecp_relocation_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {0, 8}; + return map_enum_number(options, 2, idx, "id"); } bool mmecp_relocation_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -35923,9 +35464,9 @@ crit_e mmecp_relocation_ind_ies_o::get_crit(const uint32_t& id) case 8: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } mmecp_relocation_ind_ies_o::value_c mmecp_relocation_ind_ies_o::get_value(const uint32_t& id) { @@ -35938,7 +35479,7 @@ mmecp_relocation_ind_ies_o::value_c mmecp_relocation_ind_ies_o::get_value(const ret.set(value_c::types::enb_ue_s1ap_id); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -35950,9 +35491,9 @@ presence_e mmecp_relocation_ind_ies_o::get_presence(const uint32_t& id) case 8: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -36070,56 +35611,43 @@ SRSASN_CODE mmecp_relocation_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string mmecp_relocation_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)"}; return convert_enum_idx(options, 2, value, "mmecp_relocation_ind_ies_o::value_c::types"); } // MMEConfigurationTransferIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t mme_cfg_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {130}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {130}; + return map_enum_number(options, 1, idx, "id"); } bool mme_cfg_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {130}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 130 == id; } crit_e mme_cfg_transfer_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 130: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 130) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } mme_cfg_transfer_ies_o::value_c mme_cfg_transfer_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 130: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 130) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e mme_cfg_transfer_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 130: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 130) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -36145,56 +35673,43 @@ SRSASN_CODE mme_cfg_transfer_ies_o::value_c::unpack(cbit_ref& bref) std::string mme_cfg_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"SONConfigurationTransfer"}; + static const char* options[] = {"SONConfigurationTransfer"}; return convert_enum_idx(options, 1, value, "mme_cfg_transfer_ies_o::value_c::types"); } // MMEConfigurationUpdateAcknowledgeIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t mme_cfg_upd_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {58}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {58}; + return map_enum_number(options, 1, idx, "id"); } bool mme_cfg_upd_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {58}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 58 == id; } crit_e mme_cfg_upd_ack_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 58: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 58) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } mme_cfg_upd_ack_ies_o::value_c mme_cfg_upd_ack_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 58: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 58) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e mme_cfg_upd_ack_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 58: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 58) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -36220,21 +35735,21 @@ SRSASN_CODE mme_cfg_upd_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string mme_cfg_upd_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"CriticalityDiagnostics"}; + static const char* options[] = {"CriticalityDiagnostics"}; return convert_enum_idx(options, 1, value, "mme_cfg_upd_ack_ies_o::value_c::types"); } // MMEConfigurationUpdateFailureIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t mme_cfg_upd_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {2, 65, 58}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {2, 65, 58}; + return map_enum_number(options, 3, idx, "id"); } bool mme_cfg_upd_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {2, 65, 58}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {2, 65, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -36250,9 +35765,9 @@ crit_e mme_cfg_upd_fail_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } mme_cfg_upd_fail_ies_o::value_c mme_cfg_upd_fail_ies_o::get_value(const uint32_t& id) { @@ -36268,7 +35783,7 @@ mme_cfg_upd_fail_ies_o::value_c mme_cfg_upd_fail_ies_o::get_value(const uint32_t ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -36282,9 +35797,9 @@ presence_e mme_cfg_upd_fail_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -36455,21 +35970,21 @@ SRSASN_CODE mme_cfg_upd_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string mme_cfg_upd_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; + static const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "mme_cfg_upd_fail_ies_o::value_c::types"); } // MMEConfigurationUpdateIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t mme_cfg_upd_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {61, 105, 87, 247}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {61, 105, 87, 247}; + return map_enum_number(options, 4, idx, "id"); } bool mme_cfg_upd_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {61, 105, 87, 247}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {61, 105, 87, 247}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -36487,9 +36002,9 @@ crit_e mme_cfg_upd_ies_o::get_crit(const uint32_t& id) case 247: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } mme_cfg_upd_ies_o::value_c mme_cfg_upd_ies_o::get_value(const uint32_t& id) { @@ -36508,7 +36023,7 @@ mme_cfg_upd_ies_o::value_c mme_cfg_upd_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::served_dcns); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -36524,9 +36039,9 @@ presence_e mme_cfg_upd_ies_o::get_presence(const uint32_t& id) case 247: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -36666,8 +36181,8 @@ void mme_cfg_upd_ies_o::value_c::to_json(json_writer& j) const break; case types::served_gummeis: j.start_array("ServedGUMMEIs"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -36676,8 +36191,8 @@ void mme_cfg_upd_ies_o::value_c::to_json(json_writer& j) const break; case types::served_dcns: j.start_array("ServedDCNs"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -36733,66 +36248,51 @@ SRSASN_CODE mme_cfg_upd_ies_o::value_c::unpack(cbit_ref& bref) std::string mme_cfg_upd_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"PrintableString", "ServedGUMMEIs", "INTEGER (0..255)", "ServedDCNs"}; + static const char* options[] = {"PrintableString", "ServedGUMMEIs", "INTEGER (0..255)", "ServedDCNs"}; return convert_enum_idx(options, 4, value, "mme_cfg_upd_ies_o::value_c::types"); } uint8_t mme_cfg_upd_ies_o::value_c::types_opts::to_number() const { - switch (value) { - case relative_mme_capacity: - return 0; - default: - invalid_enum_number(value, "mme_cfg_upd_ies_o::value_c::types"); + if (value == relative_mme_capacity) { + return 0; } + invalid_enum_number(value, "mme_cfg_upd_ies_o::value_c::types"); return 0; } // MMEDirectInformationTransferIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t mme_direct_info_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {122}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {122}; + return map_enum_number(options, 1, idx, "id"); } bool mme_direct_info_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {122}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 122 == id; } crit_e mme_direct_info_transfer_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 122: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 122) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } mme_direct_info_transfer_ies_o::value_c mme_direct_info_transfer_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 122: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 122) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e mme_direct_info_transfer_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 122: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 122) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -36818,21 +36318,21 @@ SRSASN_CODE mme_direct_info_transfer_ies_o::value_c::unpack(cbit_ref& bref) std::string mme_direct_info_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Inter-SystemInformationTransferType"}; + static const char* options[] = {"Inter-SystemInformationTransferType"}; return convert_enum_idx(options, 1, value, "mme_direct_info_transfer_ies_o::value_c::types"); } // MMEStatusTransferIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t mme_status_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 90}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 8, 90}; + return map_enum_number(options, 3, idx, "id"); } bool mme_status_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 90}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 90}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -36848,9 +36348,9 @@ crit_e mme_status_transfer_ies_o::get_crit(const uint32_t& id) case 90: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } mme_status_transfer_ies_o::value_c mme_status_transfer_ies_o::get_value(const uint32_t& id) { @@ -36866,7 +36366,7 @@ mme_status_transfer_ies_o::value_c mme_status_transfer_ies_o::get_value(const ui ret.set(value_c::types::enb_status_transfer_transparent_container); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -36880,9 +36380,9 @@ presence_e mme_status_transfer_ies_o::get_presence(const uint32_t& id) case 90: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -37050,7 +36550,7 @@ SRSASN_CODE mme_status_transfer_ies_o::value_c::unpack(cbit_ref& bref) std::string mme_status_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "ENB-StatusTransfer-TransparentContainer"}; return convert_enum_idx(options, 3, value, "mme_status_transfer_ies_o::value_c::types"); } @@ -37058,14 +36558,14 @@ std::string mme_status_transfer_ies_o::value_c::types_opts::to_string() const // NASDeliveryIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t nas_delivery_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {0, 8}; + return map_enum_number(options, 2, idx, "id"); } bool nas_delivery_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -37079,9 +36579,9 @@ crit_e nas_delivery_ind_ies_o::get_crit(const uint32_t& id) case 8: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } nas_delivery_ind_ies_o::value_c nas_delivery_ind_ies_o::get_value(const uint32_t& id) { @@ -37094,7 +36594,7 @@ nas_delivery_ind_ies_o::value_c nas_delivery_ind_ies_o::get_value(const uint32_t ret.set(value_c::types::enb_ue_s1ap_id); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -37106,9 +36606,9 @@ presence_e nas_delivery_ind_ies_o::get_presence(const uint32_t& id) case 8: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -37226,21 +36726,21 @@ SRSASN_CODE nas_delivery_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string nas_delivery_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)"}; return convert_enum_idx(options, 2, value, "nas_delivery_ind_ies_o::value_c::types"); } // NASNonDeliveryIndication-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t nas_non_delivery_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 26, 2}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 26, 2}; + return map_enum_number(options, 4, idx, "id"); } bool nas_non_delivery_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 26, 2}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 26, 2}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -37258,9 +36758,9 @@ crit_e nas_non_delivery_ind_ies_o::get_crit(const uint32_t& id) case 2: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } nas_non_delivery_ind_ies_o::value_c nas_non_delivery_ind_ies_o::get_value(const uint32_t& id) { @@ -37279,7 +36779,7 @@ nas_non_delivery_ind_ies_o::value_c nas_non_delivery_ind_ies_o::get_value(const ret.set(value_c::types::cause); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -37295,9 +36795,9 @@ presence_e nas_non_delivery_ind_ies_o::get_presence(const uint32_t& id) case 2: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -37494,22 +36994,21 @@ SRSASN_CODE nas_non_delivery_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string nas_non_delivery_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "OCTET STRING", "Cause"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "OCTET STRING", "Cause"}; return convert_enum_idx(options, 4, value, "nas_non_delivery_ind_ies_o::value_c::types"); } // OverloadStartIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t overload_start_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {101, 154, 161}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {101, 154, 161}; + return map_enum_number(options, 3, idx, "id"); } bool overload_start_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {101, 154, 161}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {101, 154, 161}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -37525,9 +37024,9 @@ crit_e overload_start_ies_o::get_crit(const uint32_t& id) case 161: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } overload_start_ies_o::value_c overload_start_ies_o::get_value(const uint32_t& id) { @@ -37543,7 +37042,7 @@ overload_start_ies_o::value_c overload_start_ies_o::get_value(const uint32_t& id ret.set(value_c::types::traffic_load_reduction_ind); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -37557,9 +37056,9 @@ presence_e overload_start_ies_o::get_presence(const uint32_t& id) case 161: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -37678,8 +37177,8 @@ void overload_start_ies_o::value_c::to_json(json_writer& j) const break; case types::gummei_list: j.start_array("GUMMEIList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -37732,66 +37231,51 @@ SRSASN_CODE overload_start_ies_o::value_c::unpack(cbit_ref& bref) std::string overload_start_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"OverloadResponse", "GUMMEIList", "INTEGER (1..99)"}; + static const char* options[] = {"OverloadResponse", "GUMMEIList", "INTEGER (1..99)"}; return convert_enum_idx(options, 3, value, "overload_start_ies_o::value_c::types"); } uint8_t overload_start_ies_o::value_c::types_opts::to_number() const { - switch (value) { - case traffic_load_reduction_ind: - return 1; - default: - invalid_enum_number(value, "overload_start_ies_o::value_c::types"); + if (value == traffic_load_reduction_ind) { + return 1; } + invalid_enum_number(value, "overload_start_ies_o::value_c::types"); return 0; } // OverloadStopIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t overload_stop_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {154}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {154}; + return map_enum_number(options, 1, idx, "id"); } bool overload_stop_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {154}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 154 == id; } crit_e overload_stop_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 154: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 154) { + return crit_e::ignore; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } overload_stop_ies_o::value_c overload_stop_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 154: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 154) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e overload_stop_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 154: - return presence_e::optional; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 154) { + return presence_e::optional; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -37799,8 +37283,8 @@ void overload_stop_ies_o::value_c::to_json(json_writer& j) const { j.start_obj(); j.start_array("GUMMEIList"); - for (uint32_t i1 = 0; i1 < c.size(); ++i1) { - c[i1].to_json(j); + for (const auto& e1 : c) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -37820,21 +37304,21 @@ SRSASN_CODE overload_stop_ies_o::value_c::unpack(cbit_ref& bref) std::string overload_stop_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"GUMMEIList"}; + static const char* options[] = {"GUMMEIList"}; return convert_enum_idx(options, 1, value, "overload_stop_ies_o::value_c::types"); } // PWSFailureIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t pws_fail_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {222, 59}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {222, 59}; + return map_enum_number(options, 2, idx, "id"); } bool pws_fail_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {222, 59}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {222, 59}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -37848,9 +37332,9 @@ crit_e pws_fail_ind_ies_o::get_crit(const uint32_t& id) case 59: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pws_fail_ind_ies_o::value_c pws_fail_ind_ies_o::get_value(const uint32_t& id) { @@ -37863,7 +37347,7 @@ pws_fail_ind_ies_o::value_c pws_fail_ind_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::global_enb_id); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -37875,9 +37359,9 @@ presence_e pws_fail_ind_ies_o::get_presence(const uint32_t& id) case 59: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -37974,8 +37458,8 @@ void pws_fail_ind_ies_o::value_c::to_json(json_writer& j) const switch (type_) { case types::pw_sfailed_ecgi_list: j.start_array("PWSfailedECGIList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -38023,21 +37507,21 @@ SRSASN_CODE pws_fail_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string pws_fail_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"PWSfailedECGIList", "Global-ENB-ID"}; + static const char* options[] = {"PWSfailedECGIList", "Global-ENB-ID"}; return convert_enum_idx(options, 2, value, "pws_fail_ind_ies_o::value_c::types"); } // PWSRestartIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t pws_restart_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {182, 59, 188, 190}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {182, 59, 188, 190}; + return map_enum_number(options, 4, idx, "id"); } bool pws_restart_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {182, 59, 188, 190}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {182, 59, 188, 190}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -38055,9 +37539,9 @@ crit_e pws_restart_ind_ies_o::get_crit(const uint32_t& id) case 190: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } pws_restart_ind_ies_o::value_c pws_restart_ind_ies_o::get_value(const uint32_t& id) { @@ -38076,7 +37560,7 @@ pws_restart_ind_ies_o::value_c pws_restart_ind_ies_o::get_value(const uint32_t& ret.set(value_c::types::emergency_area_id_list_for_restart); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -38092,9 +37576,9 @@ presence_e pws_restart_ind_ies_o::get_presence(const uint32_t& id) case 190: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -38235,8 +37719,8 @@ void pws_restart_ind_ies_o::value_c::to_json(json_writer& j) const switch (type_) { case types::ecgi_list_for_restart: j.start_array("ECGIListForRestart"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -38246,15 +37730,15 @@ void pws_restart_ind_ies_o::value_c::to_json(json_writer& j) const break; case types::tai_list_for_restart: j.start_array("TAIListForRestart"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::emergency_area_id_list_for_restart: j.start_array("EmergencyAreaIDListForRestart"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - j.write_str(c.get()[i1].to_string()); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); } j.end_array(); break; @@ -38310,7 +37794,7 @@ SRSASN_CODE pws_restart_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string pws_restart_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "ECGIListForRestart", "Global-ENB-ID", "TAIListForRestart", "EmergencyAreaIDListForRestart"}; return convert_enum_idx(options, 4, value, "pws_restart_ind_ies_o::value_c::types"); } @@ -38318,14 +37802,14 @@ std::string pws_restart_ind_ies_o::value_c::types_opts::to_string() const // PagingIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t paging_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {80, 43, 44, 109, 46, 128, 151, 198, 211, 227, 231, 239, 244, 251, 271}; - return convert_enum_idx(options, 15, idx, "id"); + static const uint32_t options[] = {80, 43, 44, 109, 46, 128, 151, 198, 211, 227, 231, 239, 244, 251, 271}; + return map_enum_number(options, 15, idx, "id"); } bool paging_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {80, 43, 44, 109, 46, 128, 151, 198, 211, 227, 231, 239, 244, 251, 271}; - for (uint32_t i = 0; i < 15; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {80, 43, 44, 109, 46, 128, 151, 198, 211, 227, 231, 239, 244, 251, 271}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -38365,9 +37849,9 @@ crit_e paging_ies_o::get_crit(const uint32_t& id) case 271: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } paging_ies_o::value_c paging_ies_o::get_value(const uint32_t& id) { @@ -38419,7 +37903,7 @@ paging_ies_o::value_c paging_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::ce_mode_brestricted); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -38457,9 +37941,9 @@ presence_e paging_ies_o::get_presence(const uint32_t& id) case 271: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -38835,15 +38319,15 @@ void paging_ies_o::value_c::to_json(json_writer& j) const break; case types::tai_list: j.start_array("TAIList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; case types::csg_id_list: j.start_array("CSG-IdList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -38995,35 +38479,35 @@ SRSASN_CODE paging_ies_o::value_c::unpack(cbit_ref& bref) std::string paging_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"BIT STRING", - "UEPagingID", - "PagingDRX", - "CNDomain", - "TAIList", - "CSG-IdList", - "PagingPriority", - "OCTET STRING", - "AssistanceDataForPaging", - "Paging-eDRXInformation", - "BIT STRING", - "NB-IoT-Paging-eDRXInformation", - "BIT STRING", - "EnhancedCoverageRestricted", - "CE-ModeBRestricted"}; + static const char* options[] = {"BIT STRING", + "UEPagingID", + "PagingDRX", + "CNDomain", + "TAIList", + "CSG-IdList", + "PagingPriority", + "OCTET STRING", + "AssistanceDataForPaging", + "Paging-eDRXInformation", + "BIT STRING", + "NB-IoT-Paging-eDRXInformation", + "BIT STRING", + "EnhancedCoverageRestricted", + "CE-ModeBRestricted"}; return convert_enum_idx(options, 15, value, "paging_ies_o::value_c::types"); } // PathSwitchRequestAcknowledgeIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t path_switch_request_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 66, 95, 33, 40, 58, 158, 146, 195, 241, 240, 248, 251, 271, 283}; - return convert_enum_idx(options, 16, idx, "id"); + static const uint32_t options[] = {0, 8, 66, 95, 33, 40, 58, 158, 146, 195, 241, 240, 248, 251, 271, 283}; + return map_enum_number(options, 16, idx, "id"); } bool path_switch_request_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 66, 95, 33, 40, 58, 158, 146, 195, 241, 240, 248, 251, 271, 283}; - for (uint32_t i = 0; i < 16; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 66, 95, 33, 40, 58, 158, 146, 195, 241, 240, 248, 251, 271, 283}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -39065,9 +38549,9 @@ crit_e path_switch_request_ack_ies_o::get_crit(const uint32_t& id) case 283: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } path_switch_request_ack_ies_o::value_c path_switch_request_ack_ies_o::get_value(const uint32_t& id) { @@ -39122,7 +38606,7 @@ path_switch_request_ack_ies_o::value_c path_switch_request_ack_ies_o::get_value( ret.set(value_c::types::pending_data_ind); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -39162,9 +38646,9 @@ presence_e path_switch_request_ack_ies_o::get_presence(const uint32_t& id) case 283: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -39554,8 +39038,8 @@ void path_switch_request_ack_ies_o::value_c::to_json(json_writer& j) const break; case types::erab_to_be_released_list: j.start_array("E-RABList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -39721,36 +39205,36 @@ SRSASN_CODE path_switch_request_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string path_switch_request_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "UEAggregateMaximumBitrate", - "", - "E-RABList", - "SecurityContext", - "CriticalityDiagnostics", - "INTEGER (0..4294967295)", - "CSGMembershipStatus", - "ProSeAuthorized", - "UEUserPlaneCIoTSupportIndicator", - "V2XServicesAuthorized", - "UESidelinkAggregateMaximumBitrate", - "EnhancedCoverageRestricted", - "CE-ModeBRestricted", - "PendingDataIndication"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "UEAggregateMaximumBitrate", + "", + "E-RABList", + "SecurityContext", + "CriticalityDiagnostics", + "INTEGER (0..4294967295)", + "CSGMembershipStatus", + "ProSeAuthorized", + "UEUserPlaneCIoTSupportIndicator", + "V2XServicesAuthorized", + "UESidelinkAggregateMaximumBitrate", + "EnhancedCoverageRestricted", + "CE-ModeBRestricted", + "PendingDataIndication"}; return convert_enum_idx(options, 16, value, "path_switch_request_ack_ies_o::value_c::types"); } // PathSwitchRequestFailureIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t path_switch_request_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 2, 58}; + return map_enum_number(options, 4, idx, "id"); } bool path_switch_request_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 2, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -39768,9 +39252,9 @@ crit_e path_switch_request_fail_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } path_switch_request_fail_ies_o::value_c path_switch_request_fail_ies_o::get_value(const uint32_t& id) { @@ -39789,7 +39273,7 @@ path_switch_request_fail_ies_o::value_c path_switch_request_fail_ies_o::get_valu ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -39805,9 +39289,9 @@ presence_e path_switch_request_fail_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -40005,7 +39489,7 @@ SRSASN_CODE path_switch_request_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string path_switch_request_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "path_switch_request_fail_ies_o::value_c::types"); } @@ -40013,14 +39497,14 @@ std::string path_switch_request_fail_ies_o::value_c::types_opts::to_string() con // PathSwitchRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t path_switch_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {8, 22, 88, 100, 67, 107, 127, 145, 157, 146, 176, 186, 245}; - return convert_enum_idx(options, 13, idx, "id"); + static const uint32_t options[] = {8, 22, 88, 100, 67, 107, 127, 145, 157, 146, 176, 186, 245}; + return map_enum_number(options, 13, idx, "id"); } bool path_switch_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {8, 22, 88, 100, 67, 107, 127, 145, 157, 146, 176, 186, 245}; - for (uint32_t i = 0; i < 13; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {8, 22, 88, 100, 67, 107, 127, 145, 157, 146, 176, 186, 245}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -40056,9 +39540,9 @@ crit_e path_switch_request_ies_o::get_crit(const uint32_t& id) case 245: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } path_switch_request_ies_o::value_c path_switch_request_ies_o::get_value(const uint32_t& id) { @@ -40104,7 +39588,7 @@ path_switch_request_ies_o::value_c path_switch_request_ies_o::get_value(const ui ret.set(value_c::types::rrc_resume_cause); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -40138,9 +39622,9 @@ presence_e path_switch_request_ies_o::get_presence(const uint32_t& id) case 245: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -40609,19 +40093,19 @@ SRSASN_CODE path_switch_request_ies_o::value_c::unpack(cbit_ref& bref) std::string path_switch_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..16777215)", - "", - "INTEGER (0..4294967295)", - "EUTRAN-CGI", - "TAI", - "UESecurityCapabilities", - "BIT STRING", - "CellAccessMode", - "GUMMEI", - "CSGMembershipStatus", - "TunnelInformation", - "OCTET STRING", - "RRC-Establishment-Cause"}; + static const char* options[] = {"INTEGER (0..16777215)", + "", + "INTEGER (0..4294967295)", + "EUTRAN-CGI", + "TAI", + "UESecurityCapabilities", + "BIT STRING", + "CellAccessMode", + "GUMMEI", + "CSGMembershipStatus", + "TunnelInformation", + "OCTET STRING", + "RRC-Establishment-Cause"}; return convert_enum_idx(options, 13, value, "path_switch_request_ies_o::value_c::types"); } @@ -40644,21 +40128,21 @@ SRSASN_CODE s1ap_private_ies_empty_o::value_c::unpack(cbit_ref& bref) std::string s1ap_private_ies_empty_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {}; + static const char* options[] = {}; return convert_enum_idx(options, 0, value, "s1ap_private_ies_empty_o::value_c::types"); } // RerouteNASRequest-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t reroute_nas_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {8, 0, 225, 223, 224, 230}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {8, 0, 225, 223, 224, 230}; + return map_enum_number(options, 6, idx, "id"); } bool reroute_nas_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {8, 0, 225, 223, 224, 230}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {8, 0, 225, 223, 224, 230}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -40680,9 +40164,9 @@ crit_e reroute_nas_request_ies_o::get_crit(const uint32_t& id) case 230: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } reroute_nas_request_ies_o::value_c reroute_nas_request_ies_o::get_value(const uint32_t& id) { @@ -40707,7 +40191,7 @@ reroute_nas_request_ies_o::value_c reroute_nas_request_ies_o::get_value(const ui ret.set(value_c::types::ue_usage_type); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -40727,9 +40211,9 @@ presence_e reroute_nas_request_ies_o::get_presence(const uint32_t& id) case 230: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -40984,26 +40468,26 @@ SRSASN_CODE reroute_nas_request_ies_o::value_c::unpack(cbit_ref& bref) std::string reroute_nas_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..16777215)", - "INTEGER (0..4294967295)", - "OCTET STRING", - "OCTET STRING", - "Additional-GUTI", - "INTEGER (0..255)"}; + static const char* options[] = {"INTEGER (0..16777215)", + "INTEGER (0..4294967295)", + "OCTET STRING", + "OCTET STRING", + "Additional-GUTI", + "INTEGER (0..255)"}; return convert_enum_idx(options, 6, value, "reroute_nas_request_ies_o::value_c::types"); } // ResetAcknowledgeIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t reset_ack_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {93, 58}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {93, 58}; + return map_enum_number(options, 2, idx, "id"); } bool reset_ack_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {93, 58}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {93, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -41017,9 +40501,9 @@ crit_e reset_ack_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } reset_ack_ies_o::value_c reset_ack_ies_o::get_value(const uint32_t& id) { @@ -41032,7 +40516,7 @@ reset_ack_ies_o::value_c reset_ack_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -41044,9 +40528,9 @@ presence_e reset_ack_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -41143,8 +40627,8 @@ void reset_ack_ies_o::value_c::to_json(json_writer& j) const switch (type_) { case types::ue_associated_lc_s1_conn_list_res_ack: j.start_array("UE-associatedLogicalS1-ConnectionListResAck"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -41192,26 +40676,26 @@ SRSASN_CODE reset_ack_ies_o::value_c::unpack(cbit_ref& bref) std::string reset_ack_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"UE-associatedLogicalS1-ConnectionListResAck", "CriticalityDiagnostics"}; + static const char* options[] = {"UE-associatedLogicalS1-ConnectionListResAck", "CriticalityDiagnostics"}; return convert_enum_idx(options, 2, value, "reset_ack_ies_o::value_c::types"); } uint8_t reset_ack_ies_o::value_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "reset_ack_ies_o::value_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "reset_ack_ies_o::value_c::types"); } // ResetIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t reset_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {2, 92}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {2, 92}; + return map_enum_number(options, 2, idx, "id"); } bool reset_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {2, 92}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {2, 92}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -41225,9 +40709,9 @@ crit_e reset_ies_o::get_crit(const uint32_t& id) case 92: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } reset_ies_o::value_c reset_ies_o::get_value(const uint32_t& id) { @@ -41240,7 +40724,7 @@ reset_ies_o::value_c reset_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::reset_type); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -41252,9 +40736,9 @@ presence_e reset_ies_o::get_presence(const uint32_t& id) case 92: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -41397,56 +40881,43 @@ SRSASN_CODE reset_ies_o::value_c::unpack(cbit_ref& bref) std::string reset_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Cause", "ResetType"}; + static const char* options[] = {"Cause", "ResetType"}; return convert_enum_idx(options, 2, value, "reset_ies_o::value_c::types"); } // RetrieveUEInformationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t retrieve_ue_info_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {96}; - return convert_enum_idx(options, 1, idx, "id"); + static const uint32_t options[] = {96}; + return map_enum_number(options, 1, idx, "id"); } bool retrieve_ue_info_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {96}; - for (uint32_t i = 0; i < 1; ++i) { - if (options[i] == id) { - return true; - } - } - return false; + return 96 == id; } crit_e retrieve_ue_info_ies_o::get_crit(const uint32_t& id) { - switch (id) { - case 96: - return crit_e::reject; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 96) { + return crit_e::reject; } - return crit_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } retrieve_ue_info_ies_o::value_c retrieve_ue_info_ies_o::get_value(const uint32_t& id) { value_c ret{}; - switch (id) { - case 96: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id != 96) { + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } presence_e retrieve_ue_info_ies_o::get_presence(const uint32_t& id) { - switch (id) { - case 96: - return presence_e::mandatory; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + if (id == 96) { + return presence_e::mandatory; } - return presence_e(); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); + return {}; } // Value ::= OPEN TYPE @@ -41472,21 +40943,21 @@ SRSASN_CODE retrieve_ue_info_ies_o::value_c::unpack(cbit_ref& bref) std::string retrieve_ue_info_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"S-TMSI"}; + static const char* options[] = {"S-TMSI"}; return convert_enum_idx(options, 1, value, "retrieve_ue_info_ies_o::value_c::types"); } // S1SetupFailureIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t s1_setup_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {2, 65, 58}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {2, 65, 58}; + return map_enum_number(options, 3, idx, "id"); } bool s1_setup_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {2, 65, 58}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {2, 65, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -41502,9 +40973,9 @@ crit_e s1_setup_fail_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } s1_setup_fail_ies_o::value_c s1_setup_fail_ies_o::get_value(const uint32_t& id) { @@ -41520,7 +40991,7 @@ s1_setup_fail_ies_o::value_c s1_setup_fail_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -41534,9 +41005,9 @@ presence_e s1_setup_fail_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -41706,21 +41177,21 @@ SRSASN_CODE s1_setup_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string s1_setup_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; + static const char* options[] = {"Cause", "TimeToWait", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "s1_setup_fail_ies_o::value_c::types"); } // S1SetupRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t s1_setup_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {59, 60, 64, 137, 128, 228, 234}; - return convert_enum_idx(options, 7, idx, "id"); + static const uint32_t options[] = {59, 60, 64, 137, 128, 228, 234}; + return map_enum_number(options, 7, idx, "id"); } bool s1_setup_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {59, 60, 64, 137, 128, 228, 234}; - for (uint32_t i = 0; i < 7; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {59, 60, 64, 137, 128, 228, 234}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -41744,9 +41215,9 @@ crit_e s1_setup_request_ies_o::get_crit(const uint32_t& id) case 234: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } s1_setup_request_ies_o::value_c s1_setup_request_ies_o::get_value(const uint32_t& id) { @@ -41774,7 +41245,7 @@ s1_setup_request_ies_o::value_c s1_setup_request_ies_o::get_value(const uint32_t ret.set(value_c::types::nb_io_t_default_paging_drx); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -41796,9 +41267,9 @@ presence_e s1_setup_request_ies_o::get_presence(const uint32_t& id) case 234: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -42001,8 +41472,8 @@ void s1_setup_request_ies_o::value_c::to_json(json_writer& j) const break; case types::supported_tas: j.start_array("SupportedTAs"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -42011,8 +41482,8 @@ void s1_setup_request_ies_o::value_c::to_json(json_writer& j) const break; case types::csg_id_list: j.start_array("CSG-IdList"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -42092,27 +41563,27 @@ SRSASN_CODE s1_setup_request_ies_o::value_c::unpack(cbit_ref& bref) std::string s1_setup_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"Global-ENB-ID", - "PrintableString", - "SupportedTAs", - "PagingDRX", - "CSG-IdList", - "UE-RetentionInformation", - "NB-IoT-DefaultPagingDRX"}; + static const char* options[] = {"Global-ENB-ID", + "PrintableString", + "SupportedTAs", + "PagingDRX", + "CSG-IdList", + "UE-RetentionInformation", + "NB-IoT-DefaultPagingDRX"}; return convert_enum_idx(options, 7, value, "s1_setup_request_ies_o::value_c::types"); } // S1SetupResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t s1_setup_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {61, 105, 87, 163, 58, 228, 247}; - return convert_enum_idx(options, 7, idx, "id"); + static const uint32_t options[] = {61, 105, 87, 163, 58, 228, 247}; + return map_enum_number(options, 7, idx, "id"); } bool s1_setup_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {61, 105, 87, 163, 58, 228, 247}; - for (uint32_t i = 0; i < 7; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {61, 105, 87, 163, 58, 228, 247}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -42136,9 +41607,9 @@ crit_e s1_setup_resp_ies_o::get_crit(const uint32_t& id) case 247: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } s1_setup_resp_ies_o::value_c s1_setup_resp_ies_o::get_value(const uint32_t& id) { @@ -42166,7 +41637,7 @@ s1_setup_resp_ies_o::value_c s1_setup_resp_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::served_dcns); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -42188,9 +41659,9 @@ presence_e s1_setup_resp_ies_o::get_presence(const uint32_t& id) case 247: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -42388,8 +41859,8 @@ void s1_setup_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::served_gummeis: j.start_array("ServedGUMMEIs"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -42408,8 +41879,8 @@ void s1_setup_resp_ies_o::value_c::to_json(json_writer& j) const break; case types::served_dcns: j.start_array("ServedDCNs"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -42483,37 +41954,35 @@ SRSASN_CODE s1_setup_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string s1_setup_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"PrintableString", - "ServedGUMMEIs", - "INTEGER (0..255)", - "MMERelaySupportIndicator", - "CriticalityDiagnostics", - "UE-RetentionInformation", - "ServedDCNs"}; + static const char* options[] = {"PrintableString", + "ServedGUMMEIs", + "INTEGER (0..255)", + "MMERelaySupportIndicator", + "CriticalityDiagnostics", + "UE-RetentionInformation", + "ServedDCNs"}; return convert_enum_idx(options, 7, value, "s1_setup_resp_ies_o::value_c::types"); } uint8_t s1_setup_resp_ies_o::value_c::types_opts::to_number() const { - switch (value) { - case relative_mme_capacity: - return 0; - default: - invalid_enum_number(value, "s1_setup_resp_ies_o::value_c::types"); + if (value == relative_mme_capacity) { + return 0; } + invalid_enum_number(value, "s1_setup_resp_ies_o::value_c::types"); return 0; } // TraceFailureIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t trace_fail_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 86, 2}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 86, 2}; + return map_enum_number(options, 4, idx, "id"); } bool trace_fail_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 86, 2}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 86, 2}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -42531,9 +42000,9 @@ crit_e trace_fail_ind_ies_o::get_crit(const uint32_t& id) case 2: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } trace_fail_ind_ies_o::value_c trace_fail_ind_ies_o::get_value(const uint32_t& id) { @@ -42552,7 +42021,7 @@ trace_fail_ind_ies_o::value_c trace_fail_ind_ies_o::get_value(const uint32_t& id ret.set(value_c::types::cause); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -42568,9 +42037,9 @@ presence_e trace_fail_ind_ies_o::get_presence(const uint32_t& id) case 2: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -42766,22 +42235,21 @@ SRSASN_CODE trace_fail_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string trace_fail_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "OCTET STRING", "Cause"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "OCTET STRING", "Cause"}; return convert_enum_idx(options, 4, value, "trace_fail_ind_ies_o::value_c::types"); } // TraceStartIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t trace_start_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 25}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 8, 25}; + return map_enum_number(options, 3, idx, "id"); } bool trace_start_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 25}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 25}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -42797,9 +42265,9 @@ crit_e trace_start_ies_o::get_crit(const uint32_t& id) case 25: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } trace_start_ies_o::value_c trace_start_ies_o::get_value(const uint32_t& id) { @@ -42815,7 +42283,7 @@ trace_start_ies_o::value_c trace_start_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::trace_activation); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -42829,9 +42297,9 @@ presence_e trace_start_ies_o::get_presence(const uint32_t& id) case 25: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -42996,21 +42464,21 @@ SRSASN_CODE trace_start_ies_o::value_c::unpack(cbit_ref& bref) std::string trace_start_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "TraceActivation"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "TraceActivation"}; return convert_enum_idx(options, 3, value, "trace_start_ies_o::value_c::types"); } // UECapabilityInfoIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_cap_info_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 74, 198}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 74, 198}; + return map_enum_number(options, 4, idx, "id"); } bool ue_cap_info_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 74, 198}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 74, 198}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -43028,9 +42496,9 @@ crit_e ue_cap_info_ind_ies_o::get_crit(const uint32_t& id) case 198: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_cap_info_ind_ies_o::value_c ue_cap_info_ind_ies_o::get_value(const uint32_t& id) { @@ -43049,7 +42517,7 @@ ue_cap_info_ind_ies_o::value_c ue_cap_info_ind_ies_o::get_value(const uint32_t& ret.set(value_c::types::ue_radio_cap_for_paging); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -43065,9 +42533,9 @@ presence_e ue_cap_info_ind_ies_o::get_presence(const uint32_t& id) case 198: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -43262,22 +42730,21 @@ SRSASN_CODE ue_cap_info_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_cap_info_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "OCTET STRING", "OCTET STRING"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "OCTET STRING", "OCTET STRING"}; return convert_enum_idx(options, 4, value, "ue_cap_info_ind_ies_o::value_c::types"); } // UEContextModificationConfirmIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_mod_confirm_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 146, 58}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 146, 58}; + return map_enum_number(options, 4, idx, "id"); } bool ue_context_mod_confirm_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 146, 58}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 146, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -43295,9 +42762,9 @@ crit_e ue_context_mod_confirm_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_mod_confirm_ies_o::value_c ue_context_mod_confirm_ies_o::get_value(const uint32_t& id) { @@ -43316,7 +42783,7 @@ ue_context_mod_confirm_ies_o::value_c ue_context_mod_confirm_ies_o::get_value(co ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -43332,9 +42799,9 @@ presence_e ue_context_mod_confirm_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -43527,7 +42994,7 @@ SRSASN_CODE ue_context_mod_confirm_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_mod_confirm_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "CSGMembershipStatus", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "ue_context_mod_confirm_ies_o::value_c::types"); } @@ -43535,14 +43002,14 @@ std::string ue_context_mod_confirm_ies_o::value_c::types_opts::to_string() const // UEContextModificationFailureIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_mod_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 2, 58}; + return map_enum_number(options, 4, idx, "id"); } bool ue_context_mod_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 2, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -43560,9 +43027,9 @@ crit_e ue_context_mod_fail_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_mod_fail_ies_o::value_c ue_context_mod_fail_ies_o::get_value(const uint32_t& id) { @@ -43581,7 +43048,7 @@ ue_context_mod_fail_ies_o::value_c ue_context_mod_fail_ies_o::get_value(const ui ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -43597,9 +43064,9 @@ presence_e ue_context_mod_fail_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -43797,7 +43264,7 @@ SRSASN_CODE ue_context_mod_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_mod_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "ue_context_mod_fail_ies_o::value_c::types"); } @@ -43805,14 +43272,14 @@ std::string ue_context_mod_fail_ies_o::value_c::types_opts::to_string() const // UEContextModificationIndicationIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_mod_ind_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 226}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 8, 226}; + return map_enum_number(options, 3, idx, "id"); } bool ue_context_mod_ind_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 226}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 226}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -43828,9 +43295,9 @@ crit_e ue_context_mod_ind_ies_o::get_crit(const uint32_t& id) case 226: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_mod_ind_ies_o::value_c ue_context_mod_ind_ies_o::get_value(const uint32_t& id) { @@ -43846,7 +43313,7 @@ ue_context_mod_ind_ies_o::value_c ue_context_mod_ind_ies_o::get_value(const uint ret.set(value_c::types::csg_membership_info); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -43860,9 +43327,9 @@ presence_e ue_context_mod_ind_ies_o::get_presence(const uint32_t& id) case 226: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -44028,21 +43495,21 @@ SRSASN_CODE ue_context_mod_ind_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_mod_ind_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "CSGMembershipInfo"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "CSGMembershipInfo"}; return convert_enum_idx(options, 3, value, "ue_context_mod_ind_ies_o::value_c::types"); } // UEContextModificationRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_mod_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 73, 106, 66, 108, 107, 146, 159, 187, 195, 124, 243, 240, 248}; - return convert_enum_idx(options, 15, idx, "id"); + static const uint32_t options[] = {0, 8, 73, 106, 66, 108, 107, 146, 159, 187, 195, 124, 243, 240, 248}; + return map_enum_number(options, 15, idx, "id"); } bool ue_context_mod_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 73, 106, 66, 108, 107, 146, 159, 187, 195, 124, 243, 240, 248}; - for (uint32_t i = 0; i < 15; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 73, 106, 66, 108, 107, 146, 159, 187, 195, 124, 243, 240, 248}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -44082,9 +43549,9 @@ crit_e ue_context_mod_request_ies_o::get_crit(const uint32_t& id) case 248: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_mod_request_ies_o::value_c ue_context_mod_request_ies_o::get_value(const uint32_t& id) { @@ -44136,7 +43603,7 @@ ue_context_mod_request_ies_o::value_c ue_context_mod_request_ies_o::get_value(co ret.set(value_c::types::ue_sidelink_aggregate_maximum_bitrate); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -44174,9 +43641,9 @@ presence_e ue_context_mod_request_ies_o::get_presence(const uint32_t& id) case 248: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -44696,35 +44163,35 @@ SRSASN_CODE ue_context_mod_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_mod_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "BIT STRING", - "INTEGER (1..256)", - "UEAggregateMaximumBitrate", - "CSFallbackIndicator", - "UESecurityCapabilities", - "CSGMembershipStatus", - "LAI", - "AdditionalCSFallbackIndicator", - "ProSeAuthorized", - "SRVCCOperationPossible", - "SRVCCOperationNotPossible", - "V2XServicesAuthorized", - "UESidelinkAggregateMaximumBitrate"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "BIT STRING", + "INTEGER (1..256)", + "UEAggregateMaximumBitrate", + "CSFallbackIndicator", + "UESecurityCapabilities", + "CSGMembershipStatus", + "LAI", + "AdditionalCSFallbackIndicator", + "ProSeAuthorized", + "SRVCCOperationPossible", + "SRVCCOperationNotPossible", + "V2XServicesAuthorized", + "UESidelinkAggregateMaximumBitrate"}; return convert_enum_idx(options, 15, value, "ue_context_mod_request_ies_o::value_c::types"); } // UEContextModificationResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_mod_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 58}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 8, 58}; + return map_enum_number(options, 3, idx, "id"); } bool ue_context_mod_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 58}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -44740,9 +44207,9 @@ crit_e ue_context_mod_resp_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_mod_resp_ies_o::value_c ue_context_mod_resp_ies_o::get_value(const uint32_t& id) { @@ -44758,7 +44225,7 @@ ue_context_mod_resp_ies_o::value_c ue_context_mod_resp_ies_o::get_value(const ui ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -44772,9 +44239,9 @@ presence_e ue_context_mod_resp_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -44940,22 +44407,21 @@ SRSASN_CODE ue_context_mod_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_mod_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "CriticalityDiagnostics"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "CriticalityDiagnostics"}; return convert_enum_idx(options, 3, value, "ue_context_mod_resp_ies_o::value_c::types"); } // UEContextReleaseCommand-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_release_cmd_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {99, 2}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {99, 2}; + return map_enum_number(options, 2, idx, "id"); } bool ue_context_release_cmd_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {99, 2}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {99, 2}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -44969,9 +44435,9 @@ crit_e ue_context_release_cmd_ies_o::get_crit(const uint32_t& id) case 2: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_release_cmd_ies_o::value_c ue_context_release_cmd_ies_o::get_value(const uint32_t& id) { @@ -44984,7 +44450,7 @@ ue_context_release_cmd_ies_o::value_c ue_context_release_cmd_ies_o::get_value(co ret.set(value_c::types::cause); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -44996,9 +44462,9 @@ presence_e ue_context_release_cmd_ies_o::get_presence(const uint32_t& id) case 2: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -45142,26 +44608,26 @@ SRSASN_CODE ue_context_release_cmd_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_release_cmd_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"UE-S1AP-IDs", "Cause"}; + static const char* options[] = {"UE-S1AP-IDs", "Cause"}; return convert_enum_idx(options, 2, value, "ue_context_release_cmd_ies_o::value_c::types"); } uint8_t ue_context_release_cmd_ies_o::value_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {1}; - return convert_enum_idx(options, 1, value, "ue_context_release_cmd_ies_o::value_c::types"); + static const uint8_t options[] = {1}; + return map_enum_number(options, 1, value, "ue_context_release_cmd_ies_o::value_c::types"); } // UEContextReleaseComplete-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_release_complete_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 58, 189, 213, 212}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {0, 8, 58, 189, 213, 212}; + return map_enum_number(options, 6, idx, "id"); } bool ue_context_release_complete_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 58, 189, 213, 212}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 58, 189, 213, 212}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -45183,9 +44649,9 @@ crit_e ue_context_release_complete_ies_o::get_crit(const uint32_t& id) case 212: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_release_complete_ies_o::value_c ue_context_release_complete_ies_o::get_value(const uint32_t& id) { @@ -45210,7 +44676,7 @@ ue_context_release_complete_ies_o::value_c ue_context_release_complete_ies_o::ge ret.set(value_c::types::cell_id_and_ce_level_for_ce_capable_ues); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -45230,9 +44696,9 @@ presence_e ue_context_release_complete_ies_o::get_presence(const uint32_t& id) case 212: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -45498,26 +44964,26 @@ SRSASN_CODE ue_context_release_complete_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_release_complete_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "CriticalityDiagnostics", - "UserLocationInformation", - "InformationOnRecommendedCellsAndENBsForPaging", - "CellIdentifierAndCELevelForCECapableUEs"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "CriticalityDiagnostics", + "UserLocationInformation", + "InformationOnRecommendedCellsAndENBsForPaging", + "CellIdentifierAndCELevelForCECapableUEs"}; return convert_enum_idx(options, 6, value, "ue_context_release_complete_ies_o::value_c::types"); } // UEContextReleaseRequest-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_release_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 2, 164}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 2, 164}; + return map_enum_number(options, 4, idx, "id"); } bool ue_context_release_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 2, 164}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 2, 164}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -45535,9 +45001,9 @@ crit_e ue_context_release_request_ies_o::get_crit(const uint32_t& id) case 164: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_release_request_ies_o::value_c ue_context_release_request_ies_o::get_value(const uint32_t& id) { @@ -45556,7 +45022,7 @@ ue_context_release_request_ies_o::value_c ue_context_release_request_ies_o::get_ ret.set(value_c::types::gw_context_release_ind); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -45572,9 +45038,9 @@ presence_e ue_context_release_request_ies_o::get_presence(const uint32_t& id) case 164: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -45767,7 +45233,7 @@ SRSASN_CODE ue_context_release_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_release_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause", "GWContextReleaseIndication"}; return convert_enum_idx(options, 4, value, "ue_context_release_request_ies_o::value_c::types"); } @@ -45775,14 +45241,14 @@ std::string ue_context_release_request_ies_o::value_c::types_opts::to_string() c // UEContextResumeFailureIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_resume_fail_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 2, 58}; + return map_enum_number(options, 4, idx, "id"); } bool ue_context_resume_fail_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 2, 58}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 2, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -45800,9 +45266,9 @@ crit_e ue_context_resume_fail_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_resume_fail_ies_o::value_c ue_context_resume_fail_ies_o::get_value(const uint32_t& id) { @@ -45821,7 +45287,7 @@ ue_context_resume_fail_ies_o::value_c ue_context_resume_fail_ies_o::get_value(co ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -45837,9 +45303,9 @@ presence_e ue_context_resume_fail_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -46037,7 +45503,7 @@ SRSASN_CODE ue_context_resume_fail_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_resume_fail_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "Cause", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "ue_context_resume_fail_ies_o::value_c::types"); } @@ -46045,14 +45511,14 @@ std::string ue_context_resume_fail_ies_o::value_c::types_opts::to_string() const // UEContextResumeRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_resume_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 235, 245}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 235, 245}; + return map_enum_number(options, 4, idx, "id"); } bool ue_context_resume_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 235, 245}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 235, 245}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -46070,9 +45536,9 @@ crit_e ue_context_resume_request_ies_o::get_crit(const uint32_t& id) case 245: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_resume_request_ies_o::value_c ue_context_resume_request_ies_o::get_value(const uint32_t& id) { @@ -46091,7 +45557,7 @@ ue_context_resume_request_ies_o::value_c ue_context_resume_request_ies_o::get_va ret.set(value_c::types::rrc_resume_cause); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -46107,9 +45573,9 @@ presence_e ue_context_resume_request_ies_o::get_presence(const uint32_t& id) case 245: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -46304,22 +45770,21 @@ SRSASN_CODE ue_context_resume_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_resume_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "", "RRC-Establishment-Cause"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "", "RRC-Establishment-Cause"}; return convert_enum_idx(options, 4, value, "ue_context_resume_request_ies_o::value_c::types"); } // UEContextResumeResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_resume_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 237, 58, 40, 283}; - return convert_enum_idx(options, 6, idx, "id"); + static const uint32_t options[] = {0, 8, 237, 58, 40, 283}; + return map_enum_number(options, 6, idx, "id"); } bool ue_context_resume_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 237, 58, 40, 283}; - for (uint32_t i = 0; i < 6; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 237, 58, 40, 283}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -46341,9 +45806,9 @@ crit_e ue_context_resume_resp_ies_o::get_crit(const uint32_t& id) case 283: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_resume_resp_ies_o::value_c ue_context_resume_resp_ies_o::get_value(const uint32_t& id) { @@ -46368,7 +45833,7 @@ ue_context_resume_resp_ies_o::value_c ue_context_resume_resp_ies_o::get_value(co ret.set(value_c::types::pending_data_ind); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -46388,9 +45853,9 @@ presence_e ue_context_resume_resp_ies_o::get_presence(const uint32_t& id) case 283: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -46649,26 +46114,26 @@ SRSASN_CODE ue_context_resume_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_resume_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "", - "CriticalityDiagnostics", - "SecurityContext", - "PendingDataIndication"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "", + "CriticalityDiagnostics", + "SecurityContext", + "PendingDataIndication"}; return convert_enum_idx(options, 6, value, "ue_context_resume_resp_ies_o::value_c::types"); } // UEContextSuspendRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_suspend_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 213, 212}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 213, 212}; + return map_enum_number(options, 4, idx, "id"); } bool ue_context_suspend_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 213, 212}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 213, 212}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -46686,9 +46151,9 @@ crit_e ue_context_suspend_request_ies_o::get_crit(const uint32_t& id) case 212: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_suspend_request_ies_o::value_c ue_context_suspend_request_ies_o::get_value(const uint32_t& id) { @@ -46707,7 +46172,7 @@ ue_context_suspend_request_ies_o::value_c ue_context_suspend_request_ies_o::get_ ret.set(value_c::types::cell_id_and_ce_level_for_ce_capable_ues); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -46723,9 +46188,9 @@ presence_e ue_context_suspend_request_ies_o::get_presence(const uint32_t& id) case 212: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -46927,24 +46392,24 @@ SRSASN_CODE ue_context_suspend_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_suspend_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "InformationOnRecommendedCellsAndENBsForPaging", - "CellIdentifierAndCELevelForCECapableUEs"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "InformationOnRecommendedCellsAndENBsForPaging", + "CellIdentifierAndCELevelForCECapableUEs"}; return convert_enum_idx(options, 4, value, "ue_context_suspend_request_ies_o::value_c::types"); } // UEContextSuspendResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_context_suspend_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 58, 40}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 58, 40}; + return map_enum_number(options, 4, idx, "id"); } bool ue_context_suspend_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 58, 40}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 58, 40}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -46962,9 +46427,9 @@ crit_e ue_context_suspend_resp_ies_o::get_crit(const uint32_t& id) case 40: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_context_suspend_resp_ies_o::value_c ue_context_suspend_resp_ies_o::get_value(const uint32_t& id) { @@ -46983,7 +46448,7 @@ ue_context_suspend_resp_ies_o::value_c ue_context_suspend_resp_ies_o::get_value( ret.set(value_c::types::security_context); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -46999,9 +46464,9 @@ presence_e ue_context_suspend_resp_ies_o::get_presence(const uint32_t& id) case 40: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -47199,7 +46664,7 @@ SRSASN_CODE ue_context_suspend_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_context_suspend_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "CriticalityDiagnostics", "SecurityContext"}; return convert_enum_idx(options, 4, value, "ue_context_suspend_resp_ies_o::value_c::types"); } @@ -47207,14 +46672,14 @@ std::string ue_context_suspend_resp_ies_o::value_c::types_opts::to_string() cons // UEInformationTransferIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_info_transfer_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {96, 252, 74, 283}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {96, 252, 74, 283}; + return map_enum_number(options, 4, idx, "id"); } bool ue_info_transfer_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {96, 252, 74, 283}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {96, 252, 74, 283}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -47232,9 +46697,9 @@ crit_e ue_info_transfer_ies_o::get_crit(const uint32_t& id) case 283: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_info_transfer_ies_o::value_c ue_info_transfer_ies_o::get_value(const uint32_t& id) { @@ -47253,7 +46718,7 @@ ue_info_transfer_ies_o::value_c ue_info_transfer_ies_o::get_value(const uint32_t ret.set(value_c::types::pending_data_ind); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -47269,9 +46734,9 @@ presence_e ue_info_transfer_ies_o::get_presence(const uint32_t& id) case 283: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -47473,22 +46938,21 @@ SRSASN_CODE ue_info_transfer_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_info_transfer_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "S-TMSI", "E-RABLevelQoSParameters", "OCTET STRING", "PendingDataIndication"}; + static const char* options[] = {"S-TMSI", "E-RABLevelQoSParameters", "OCTET STRING", "PendingDataIndication"}; return convert_enum_idx(options, 4, value, "ue_info_transfer_ies_o::value_c::types"); } // UERadioCapabilityMatchRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_radio_cap_match_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 74}; - return convert_enum_idx(options, 3, idx, "id"); + static const uint32_t options[] = {0, 8, 74}; + return map_enum_number(options, 3, idx, "id"); } bool ue_radio_cap_match_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 74}; - for (uint32_t i = 0; i < 3; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 74}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -47504,9 +46968,9 @@ crit_e ue_radio_cap_match_request_ies_o::get_crit(const uint32_t& id) case 74: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_radio_cap_match_request_ies_o::value_c ue_radio_cap_match_request_ies_o::get_value(const uint32_t& id) { @@ -47522,7 +46986,7 @@ ue_radio_cap_match_request_ies_o::value_c ue_radio_cap_match_request_ies_o::get_ ret.set(value_c::types::ue_radio_cap); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -47536,9 +47000,9 @@ presence_e ue_radio_cap_match_request_ies_o::get_presence(const uint32_t& id) case 74: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -47703,21 +47167,21 @@ SRSASN_CODE ue_radio_cap_match_request_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_radio_cap_match_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "OCTET STRING"}; + static const char* options[] = {"INTEGER (0..4294967295)", "INTEGER (0..16777215)", "OCTET STRING"}; return convert_enum_idx(options, 3, value, "ue_radio_cap_match_request_ies_o::value_c::types"); } // UERadioCapabilityMatchResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ue_radio_cap_match_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 169, 58}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 169, 58}; + return map_enum_number(options, 4, idx, "id"); } bool ue_radio_cap_match_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 169, 58}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 169, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -47735,9 +47199,9 @@ crit_e ue_radio_cap_match_resp_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ue_radio_cap_match_resp_ies_o::value_c ue_radio_cap_match_resp_ies_o::get_value(const uint32_t& id) { @@ -47756,7 +47220,7 @@ ue_radio_cap_match_resp_ies_o::value_c ue_radio_cap_match_resp_ies_o::get_value( ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -47772,9 +47236,9 @@ presence_e ue_radio_cap_match_resp_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -47967,7 +47431,7 @@ SRSASN_CODE ue_radio_cap_match_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string ue_radio_cap_match_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "VoiceSupportMatchIndicator", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "ue_radio_cap_match_resp_ies_o::value_c::types"); } @@ -47975,14 +47439,14 @@ std::string ue_radio_cap_match_resp_ies_o::value_c::types_opts::to_string() cons // UplinkNASTransport-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ul_nas_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 26, 100, 67, 155, 184, 186}; - return convert_enum_idx(options, 8, idx, "id"); + static const uint32_t options[] = {0, 8, 26, 100, 67, 155, 184, 186}; + return map_enum_number(options, 8, idx, "id"); } bool ul_nas_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 26, 100, 67, 155, 184, 186}; - for (uint32_t i = 0; i < 8; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 26, 100, 67, 155, 184, 186}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -48008,9 +47472,9 @@ crit_e ul_nas_transport_ies_o::get_crit(const uint32_t& id) case 186: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ul_nas_transport_ies_o::value_c ul_nas_transport_ies_o::get_value(const uint32_t& id) { @@ -48041,7 +47505,7 @@ ul_nas_transport_ies_o::value_c ul_nas_transport_ies_o::get_value(const uint32_t ret.set(value_c::types::lhn_id); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -48065,9 +47529,9 @@ presence_e ul_nas_transport_ies_o::get_presence(const uint32_t& id) case 186: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -48389,28 +47853,28 @@ SRSASN_CODE ul_nas_transport_ies_o::value_c::unpack(cbit_ref& bref) std::string ul_nas_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "OCTET STRING", - "EUTRAN-CGI", - "TAI", - "BIT STRING", - "BIT STRING", - "OCTET STRING"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "OCTET STRING", + "EUTRAN-CGI", + "TAI", + "BIT STRING", + "BIT STRING", + "OCTET STRING"}; return convert_enum_idx(options, 8, value, "ul_nas_transport_ies_o::value_c::types"); } // UplinkNonUEAssociatedLPPaTransport-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ul_non_ueassociated_lp_pa_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {148, 147}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {148, 147}; + return map_enum_number(options, 2, idx, "id"); } bool ul_non_ueassociated_lp_pa_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {148, 147}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {148, 147}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -48424,9 +47888,9 @@ crit_e ul_non_ueassociated_lp_pa_transport_ies_o::get_crit(const uint32_t& id) case 147: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ul_non_ueassociated_lp_pa_transport_ies_o::value_c ul_non_ueassociated_lp_pa_transport_ies_o::get_value(const uint32_t& id) @@ -48440,7 +47904,7 @@ ul_non_ueassociated_lp_pa_transport_ies_o::get_value(const uint32_t& id) ret.set(value_c::types::lp_pa_pdu); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -48452,9 +47916,9 @@ presence_e ul_non_ueassociated_lp_pa_transport_ies_o::get_presence(const uint32_ case 147: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -48593,26 +48057,26 @@ SRSASN_CODE ul_non_ueassociated_lp_pa_transport_ies_o::value_c::unpack(cbit_ref& std::string ul_non_ueassociated_lp_pa_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..255)", "OCTET STRING"}; + static const char* options[] = {"INTEGER (0..255)", "OCTET STRING"}; return convert_enum_idx(options, 2, value, "ul_non_ueassociated_lp_pa_transport_ies_o::value_c::types"); } uint8_t ul_non_ueassociated_lp_pa_transport_ies_o::value_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {0}; - return convert_enum_idx(options, 1, value, "ul_non_ueassociated_lp_pa_transport_ies_o::value_c::types"); + static const uint8_t options[] = {0}; + return map_enum_number(options, 1, value, "ul_non_ueassociated_lp_pa_transport_ies_o::value_c::types"); } // UplinkS1cdma2000tunnellingIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ul_s1cdma2000tunnelling_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 71, 72, 84, 102, 97, 70, 140}; - return convert_enum_idx(options, 9, idx, "id"); + static const uint32_t options[] = {0, 8, 71, 72, 84, 102, 97, 70, 140}; + return map_enum_number(options, 9, idx, "id"); } bool ul_s1cdma2000tunnelling_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 71, 72, 84, 102, 97, 70, 140}; - for (uint32_t i = 0; i < 9; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 71, 72, 84, 102, 97, 70, 140}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -48640,9 +48104,9 @@ crit_e ul_s1cdma2000tunnelling_ies_o::get_crit(const uint32_t& id) case 140: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ul_s1cdma2000tunnelling_ies_o::value_c ul_s1cdma2000tunnelling_ies_o::get_value(const uint32_t& id) { @@ -48676,7 +48140,7 @@ ul_s1cdma2000tunnelling_ies_o::value_c ul_s1cdma2000tunnelling_ies_o::get_value( ret.set(value_c::types::eutran_round_trip_delay_estimation_info); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -48702,9 +48166,9 @@ presence_e ul_s1cdma2000tunnelling_ies_o::get_presence(const uint32_t& id) case 140: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -49044,29 +48508,29 @@ SRSASN_CODE ul_s1cdma2000tunnelling_ies_o::value_c::unpack(cbit_ref& bref) std::string ul_s1cdma2000tunnelling_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..4294967295)", - "INTEGER (0..16777215)", - "Cdma2000RATType", - "OCTET STRING", - "Cdma2000HORequiredIndication", - "Cdma2000OneXSRVCCInfo", - "OCTET STRING", - "OCTET STRING", - "INTEGER (0..2047)"}; + static const char* options[] = {"INTEGER (0..4294967295)", + "INTEGER (0..16777215)", + "Cdma2000RATType", + "OCTET STRING", + "Cdma2000HORequiredIndication", + "Cdma2000OneXSRVCCInfo", + "OCTET STRING", + "OCTET STRING", + "INTEGER (0..2047)"}; return convert_enum_idx(options, 9, value, "ul_s1cdma2000tunnelling_ies_o::value_c::types"); } // UplinkUEAssociatedLPPaTransport-IEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t ul_ueassociated_lp_pa_transport_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {0, 8, 148, 147}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {0, 8, 148, 147}; + return map_enum_number(options, 4, idx, "id"); } bool ul_ueassociated_lp_pa_transport_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {0, 8, 148, 147}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {0, 8, 148, 147}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -49084,9 +48548,9 @@ crit_e ul_ueassociated_lp_pa_transport_ies_o::get_crit(const uint32_t& id) case 147: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } ul_ueassociated_lp_pa_transport_ies_o::value_c ul_ueassociated_lp_pa_transport_ies_o::get_value(const uint32_t& id) { @@ -49105,7 +48569,7 @@ ul_ueassociated_lp_pa_transport_ies_o::value_c ul_ueassociated_lp_pa_transport_i ret.set(value_c::types::lp_pa_pdu); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -49121,9 +48585,9 @@ presence_e ul_ueassociated_lp_pa_transport_ies_o::get_presence(const uint32_t& i case 147: return presence_e::mandatory; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -49315,7 +48779,7 @@ SRSASN_CODE ul_ueassociated_lp_pa_transport_ies_o::value_c::unpack(cbit_ref& bre std::string ul_ueassociated_lp_pa_transport_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "INTEGER (0..4294967295)", "INTEGER (0..16777215)", "INTEGER (0..255)", "OCTET STRING"}; return convert_enum_idx(options, 4, value, "ul_ueassociated_lp_pa_transport_ies_o::value_c::types"); } @@ -49323,14 +48787,14 @@ std::string ul_ueassociated_lp_pa_transport_ies_o::value_c::types_opts::to_strin // WriteReplaceWarningRequestIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t write_replace_warning_request_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {111, 112, 113, 114, 144, 115, 116, 117, 118, 119, 142}; - return convert_enum_idx(options, 11, idx, "id"); + static const uint32_t options[] = {111, 112, 113, 114, 144, 115, 116, 117, 118, 119, 142}; + return map_enum_number(options, 11, idx, "id"); } bool write_replace_warning_request_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {111, 112, 113, 114, 144, 115, 116, 117, 118, 119, 142}; - for (uint32_t i = 0; i < 11; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {111, 112, 113, 114, 144, 115, 116, 117, 118, 119, 142}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -49362,9 +48826,9 @@ crit_e write_replace_warning_request_ies_o::get_crit(const uint32_t& id) case 142: return crit_e::reject; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } write_replace_warning_request_ies_o::value_c write_replace_warning_request_ies_o::get_value(const uint32_t& id) { @@ -49404,7 +48868,7 @@ write_replace_warning_request_ies_o::value_c write_replace_warning_request_ies_o ret.set(value_c::types::concurrent_warning_msg_ind); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -49434,9 +48898,9 @@ presence_e write_replace_warning_request_ies_o::get_presence(const uint32_t& id) case 142: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -49842,31 +49306,31 @@ SRSASN_CODE write_replace_warning_request_ies_o::value_c::unpack(cbit_ref& bref) std::string write_replace_warning_request_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = {"BIT STRING", - "BIT STRING", - "WarningAreaList", - "INTEGER (0..4095)", - "INTEGER (4096..131071)", - "INTEGER (0..65535)", - "OCTET STRING", - "OCTET STRING", - "BIT STRING", - "OCTET STRING", - "ConcurrentWarningMessageIndicator"}; + static const char* options[] = {"BIT STRING", + "BIT STRING", + "WarningAreaList", + "INTEGER (0..4095)", + "INTEGER (4096..131071)", + "INTEGER (0..65535)", + "OCTET STRING", + "OCTET STRING", + "BIT STRING", + "OCTET STRING", + "ConcurrentWarningMessageIndicator"}; return convert_enum_idx(options, 11, value, "write_replace_warning_request_ies_o::value_c::types"); } // WriteReplaceWarningResponseIEs ::= OBJECT SET OF S1AP-PROTOCOL-IES uint32_t write_replace_warning_resp_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {111, 112, 120, 58}; - return convert_enum_idx(options, 4, idx, "id"); + static const uint32_t options[] = {111, 112, 120, 58}; + return map_enum_number(options, 4, idx, "id"); } bool write_replace_warning_resp_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {111, 112, 120, 58}; - for (uint32_t i = 0; i < 4; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {111, 112, 120, 58}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -49884,9 +49348,9 @@ crit_e write_replace_warning_resp_ies_o::get_crit(const uint32_t& id) case 58: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } write_replace_warning_resp_ies_o::value_c write_replace_warning_resp_ies_o::get_value(const uint32_t& id) { @@ -49905,7 +49369,7 @@ write_replace_warning_resp_ies_o::value_c write_replace_warning_resp_ies_o::get_ ret.set(value_c::types::crit_diagnostics); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -49921,9 +49385,9 @@ presence_e write_replace_warning_resp_ies_o::get_presence(const uint32_t& id) case 58: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Value ::= OPEN TYPE @@ -50129,12 +49593,11 @@ SRSASN_CODE write_replace_warning_resp_ies_o::value_c::unpack(cbit_ref& bref) std::string write_replace_warning_resp_ies_o::value_c::types_opts::to_string() const { - static constexpr const char* options[] = { - "BIT STRING", "BIT STRING", "BroadcastCompletedAreaList", "CriticalityDiagnostics"}; + static const char* options[] = {"BIT STRING", "BIT STRING", "BroadcastCompletedAreaList", "CriticalityDiagnostics"}; return convert_enum_idx(options, 4, value, "write_replace_warning_resp_ies_o::value_c::types"); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; kill_request_ies_container::kill_request_ies_container() : msg_id(111, crit_e::reject), @@ -50197,12 +49660,13 @@ SRSASN_CODE kill_request_ies_container::unpack(cbit_ref& bref) kill_all_warning_msgs.value = c.value.kill_all_warning_msgs(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -50248,7 +49712,7 @@ void kill_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; kill_resp_ies_container::kill_resp_ies_container() : msg_id(111, crit_e::reject), @@ -50311,12 +49775,13 @@ SRSASN_CODE kill_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -50362,7 +49827,7 @@ void kill_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; location_report_ies_container::location_report_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -50427,12 +49892,13 @@ SRSASN_CODE location_report_ies_container::unpack(cbit_ref& bref) request_type.value = c.value.request_type(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -50476,7 +49942,7 @@ void location_report_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; location_report_ctrl_ies_container::location_report_ctrl_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -50525,12 +49991,13 @@ SRSASN_CODE location_report_ctrl_ies_container::unpack(cbit_ref& bref) request_type.value = c.value.request_type(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -50570,7 +50037,7 @@ void location_report_ctrl_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; location_report_fail_ind_ies_container::location_report_fail_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -50619,12 +50086,13 @@ SRSASN_CODE location_report_fail_ind_ies_container::unpack(cbit_ref& bref) cause.value = c.value.cause(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -50664,7 +50132,7 @@ void location_report_fail_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; mmecp_relocation_ind_ies_container::mmecp_relocation_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -50705,12 +50173,13 @@ SRSASN_CODE mmecp_relocation_ind_ies_container::unpack(cbit_ref& bref) enb_ue_s1ap_id.value = c.value.enb_ue_s1ap_id(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -50748,7 +50217,7 @@ void mmecp_relocation_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; mme_cfg_transfer_ies_container::mme_cfg_transfer_ies_container() : son_cfg_transfer_mct(130, crit_e::ignore) {} SRSASN_CODE mme_cfg_transfer_ies_container::pack(bit_ref& bref) const @@ -50771,16 +50240,14 @@ SRSASN_CODE mme_cfg_transfer_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 130: - son_cfg_transfer_mct_present = true; - son_cfg_transfer_mct.id = c.id; - son_cfg_transfer_mct.crit = c.crit; - son_cfg_transfer_mct.value = c.value.son_cfg_transfer_mct(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 130) { + son_cfg_transfer_mct_present = true; + son_cfg_transfer_mct.id = c.id; + son_cfg_transfer_mct.crit = c.crit; + son_cfg_transfer_mct.value = c.value.son_cfg_transfer_mct(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -50819,7 +50286,7 @@ void mme_cfg_transfer_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; mme_cfg_upd_ies_container::mme_cfg_upd_ies_container() : mm_ename(61, crit_e::ignore), @@ -50886,7 +50353,7 @@ SRSASN_CODE mme_cfg_upd_ies_container::unpack(cbit_ref& bref) served_dcns.value = c.value.served_dcns(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -50938,7 +50405,7 @@ void mme_cfg_upd_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; mme_cfg_upd_ack_ies_container::mme_cfg_upd_ack_ies_container() : crit_diagnostics(58, crit_e::ignore) {} SRSASN_CODE mme_cfg_upd_ack_ies_container::pack(bit_ref& bref) const @@ -50961,16 +50428,14 @@ SRSASN_CODE mme_cfg_upd_ack_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 58: - crit_diagnostics_present = true; - crit_diagnostics.id = c.id; - crit_diagnostics.crit = c.crit; - crit_diagnostics.value = c.value.crit_diagnostics(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 58) { + crit_diagnostics_present = true; + crit_diagnostics.id = c.id; + crit_diagnostics.crit = c.crit; + crit_diagnostics.value = c.value.crit_diagnostics(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -51009,7 +50474,7 @@ void mme_cfg_upd_ack_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; mme_cfg_upd_fail_ies_container::mme_cfg_upd_fail_ies_container() : cause(2, crit_e::ignore), @@ -51064,12 +50529,13 @@ SRSASN_CODE mme_cfg_upd_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -51113,7 +50579,7 @@ void mme_cfg_upd_fail_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; mme_direct_info_transfer_ies_container::mme_direct_info_transfer_ies_container() : inter_sys_info_transfer_type_mdt(122, crit_e::reject) @@ -51138,20 +50604,19 @@ SRSASN_CODE mme_direct_info_transfer_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 122: - nof_mandatory_ies--; - inter_sys_info_transfer_type_mdt.id = c.id; - inter_sys_info_transfer_type_mdt.crit = c.crit; - inter_sys_info_transfer_type_mdt.value = c.value.inter_sys_info_transfer_type_mdt(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 122) { + nof_mandatory_ies--; + inter_sys_info_transfer_type_mdt.id = c.id; + inter_sys_info_transfer_type_mdt.crit = c.crit; + inter_sys_info_transfer_type_mdt.value = c.value.inter_sys_info_transfer_type_mdt(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -51187,7 +50652,7 @@ void mme_direct_info_transfer_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; mme_status_transfer_ies_container::mme_status_transfer_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -51236,12 +50701,13 @@ SRSASN_CODE mme_status_transfer_ies_container::unpack(cbit_ref& bref) enb_status_transfer_transparent_container.value = c.value.enb_status_transfer_transparent_container(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -51281,7 +50747,7 @@ void mme_status_transfer_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; nas_delivery_ind_ies_container::nas_delivery_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -51322,12 +50788,13 @@ SRSASN_CODE nas_delivery_ind_ies_container::unpack(cbit_ref& bref) enb_ue_s1ap_id.value = c.value.enb_ue_s1ap_id(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -51365,7 +50832,7 @@ void nas_delivery_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; nas_non_delivery_ind_ies_container::nas_non_delivery_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -51422,12 +50889,13 @@ SRSASN_CODE nas_non_delivery_ind_ies_container::unpack(cbit_ref& bref) cause.value = c.value.cause(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -51469,7 +50937,7 @@ void nas_non_delivery_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; overload_start_ies_container::overload_start_ies_container() : overload_resp(101, crit_e::reject), @@ -51524,12 +50992,13 @@ SRSASN_CODE overload_start_ies_container::unpack(cbit_ref& bref) traffic_load_reduction_ind.value = c.value.traffic_load_reduction_ind(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -51573,7 +51042,7 @@ void overload_start_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; overload_stop_ies_container::overload_stop_ies_container() : gummei_list(154, crit_e::ignore) {} SRSASN_CODE overload_stop_ies_container::pack(bit_ref& bref) const @@ -51596,16 +51065,14 @@ SRSASN_CODE overload_stop_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 154: - gummei_list_present = true; - gummei_list.id = c.id; - gummei_list.crit = c.crit; - gummei_list.value = c.value.gummei_list(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 154) { + gummei_list_present = true; + gummei_list.id = c.id; + gummei_list.crit = c.crit; + gummei_list.value = c.value.gummei_list(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } @@ -51644,7 +51111,7 @@ void overload_stop_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; pws_fail_ind_ies_container::pws_fail_ind_ies_container() : pw_sfailed_ecgi_list(222, crit_e::reject), @@ -51685,12 +51152,13 @@ SRSASN_CODE pws_fail_ind_ies_container::unpack(cbit_ref& bref) global_enb_id.value = c.value.global_enb_id(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -51728,7 +51196,7 @@ void pws_fail_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; pws_restart_ind_ies_container::pws_restart_ind_ies_container() : ecgi_list_for_restart(182, crit_e::reject), @@ -51788,12 +51256,13 @@ SRSASN_CODE pws_restart_ind_ies_container::unpack(cbit_ref& bref) emergency_area_id_list_for_restart.value = c.value.emergency_area_id_list_for_restart(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -51837,7 +51306,7 @@ void pws_restart_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; paging_ies_container::paging_ies_container() : ue_id_idx_value(80, crit_e::ignore), @@ -52015,12 +51484,13 @@ SRSASN_CODE paging_ies_container::unpack(cbit_ref& bref) ce_mode_brestricted.value = c.value.ce_mode_brestricted(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -52106,7 +51576,7 @@ void paging_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; path_switch_request_ies_container::path_switch_request_ies_container() : enb_ue_s1ap_id(8, crit_e::reject), @@ -52256,12 +51726,13 @@ SRSASN_CODE path_switch_request_ies_container::unpack(cbit_ref& bref) rrc_resume_cause.value = c.value.rrc_resume_cause(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -52335,7 +51806,7 @@ void path_switch_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; path_switch_request_ack_ies_container::path_switch_request_ack_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -52527,12 +51998,13 @@ SRSASN_CODE path_switch_request_ack_ies_container::unpack(cbit_ref& bref) pending_data_ind.value = c.value.pending_data_ind(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -52624,7 +52096,7 @@ void path_switch_request_ack_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; path_switch_request_fail_ies_container::path_switch_request_fail_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -52684,12 +52156,13 @@ SRSASN_CODE path_switch_request_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -52825,7 +52298,7 @@ void private_msg_s::to_json(json_writer& j) const j.end_array(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; reroute_nas_request_ies_container::reroute_nas_request_ies_container() : enb_ue_s1ap_id(8, crit_e::reject), @@ -52907,12 +52380,13 @@ SRSASN_CODE reroute_nas_request_ies_container::unpack(cbit_ref& bref) ue_usage_type.value = c.value.ue_usage_type(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -52964,7 +52438,7 @@ void reroute_nas_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; reset_ies_container::reset_ies_container() : cause(2, crit_e::ignore), reset_type(92, crit_e::reject) {} SRSASN_CODE reset_ies_container::pack(bit_ref& bref) const @@ -53001,12 +52475,13 @@ SRSASN_CODE reset_ies_container::unpack(cbit_ref& bref) reset_type.value = c.value.reset_type(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -53044,7 +52519,7 @@ void reset_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; reset_ack_ies_container::reset_ack_ies_container() : ue_associated_lc_s1_conn_list_res_ack(93, crit_e::ignore), @@ -53089,7 +52564,7 @@ SRSASN_CODE reset_ack_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -53133,7 +52608,7 @@ void reset_ack_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; retrieve_ue_info_ies_container::retrieve_ue_info_ies_container() : s_tmsi(96, crit_e::reject) {} SRSASN_CODE retrieve_ue_info_ies_container::pack(bit_ref& bref) const @@ -53155,20 +52630,19 @@ SRSASN_CODE retrieve_ue_info_ies_container::unpack(cbit_ref& bref) for (; nof_ies > 0; --nof_ies) { protocol_ie_field_s c; HANDLE_CODE(c.unpack(bref)); - switch (c.id) { - case 96: - nof_mandatory_ies--; - s_tmsi.id = c.id; - s_tmsi.crit = c.crit; - s_tmsi.value = c.value.s_tmsi(); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); - return SRSASN_ERROR_DECODE_FAIL; + if (c.id == 96) { + nof_mandatory_ies--; + s_tmsi.id = c.id; + s_tmsi.crit = c.crit; + s_tmsi.value = c.value.s_tmsi(); + } else { + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); + return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -53204,7 +52678,7 @@ void retrieve_ue_info_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; s1_setup_fail_ies_container::s1_setup_fail_ies_container() : cause(2, crit_e::ignore), @@ -53259,12 +52733,13 @@ SRSASN_CODE s1_setup_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -53308,7 +52783,7 @@ void s1_setup_fail_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; s1_setup_request_ies_container::s1_setup_request_ies_container() : global_enb_id(59, crit_e::reject), @@ -53401,12 +52876,13 @@ SRSASN_CODE s1_setup_request_ies_container::unpack(cbit_ref& bref) nb_io_t_default_paging_drx.value = c.value.nb_io_t_default_paging_drx(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -53462,7 +52938,7 @@ void s1_setup_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; s1_setup_resp_ies_container::s1_setup_resp_ies_container() : mm_ename(61, crit_e::ignore), @@ -53558,12 +53034,13 @@ SRSASN_CODE s1_setup_resp_ies_container::unpack(cbit_ref& bref) served_dcns.value = c.value.served_dcns(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -53621,7 +53098,7 @@ void s1_setup_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; trace_fail_ind_ies_container::trace_fail_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -53678,12 +53155,13 @@ SRSASN_CODE trace_fail_ind_ies_container::unpack(cbit_ref& bref) cause.value = c.value.cause(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -53725,7 +53203,7 @@ void trace_fail_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; trace_start_ies_container::trace_start_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -53774,12 +53252,13 @@ SRSASN_CODE trace_start_ies_container::unpack(cbit_ref& bref) trace_activation.value = c.value.trace_activation(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -53819,7 +53298,7 @@ void trace_start_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_cap_info_ind_ies_container::ue_cap_info_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -53879,12 +53358,13 @@ SRSASN_CODE ue_cap_info_ind_ies_container::unpack(cbit_ref& bref) ue_radio_cap_for_paging.value = c.value.ue_radio_cap_for_paging(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -53928,7 +53408,7 @@ void ue_cap_info_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_mod_confirm_ies_container::ue_context_mod_confirm_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -53991,12 +53471,13 @@ SRSASN_CODE ue_context_mod_confirm_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -54042,7 +53523,7 @@ void ue_context_mod_confirm_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_mod_fail_ies_container::ue_context_mod_fail_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -54102,12 +53583,13 @@ SRSASN_CODE ue_context_mod_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -54151,7 +53633,7 @@ void ue_context_mod_fail_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_mod_ind_ies_container::ue_context_mod_ind_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -54203,12 +53685,13 @@ SRSASN_CODE ue_context_mod_ind_ies_container::unpack(cbit_ref& bref) csg_membership_info.value = c.value.csg_membership_info(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -54250,7 +53733,7 @@ void ue_context_mod_ind_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_mod_request_ies_container::ue_context_mod_request_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -54434,12 +53917,13 @@ SRSASN_CODE ue_context_mod_request_ies_container::unpack(cbit_ref& bref) ue_sidelink_aggregate_maximum_bitrate.value = c.value.ue_sidelink_aggregate_maximum_bitrate(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -54529,7 +54013,7 @@ void ue_context_mod_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_mod_resp_ies_container::ue_context_mod_resp_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -54581,12 +54065,13 @@ SRSASN_CODE ue_context_mod_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -54628,7 +54113,7 @@ void ue_context_mod_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_release_cmd_ies_container::ue_context_release_cmd_ies_container() : ue_s1ap_ids(99, crit_e::reject), @@ -54669,12 +54154,13 @@ SRSASN_CODE ue_context_release_cmd_ies_container::unpack(cbit_ref& bref) cause.value = c.value.cause(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -54712,7 +54198,7 @@ void ue_context_release_cmd_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_release_complete_ies_container::ue_context_release_complete_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -54797,12 +54283,13 @@ SRSASN_CODE ue_context_release_complete_ies_container::unpack(cbit_ref& bref) cell_id_and_ce_level_for_ce_capable_ues.value = c.value.cell_id_and_ce_level_for_ce_capable_ues(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -54856,7 +54343,7 @@ void ue_context_release_complete_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_release_request_ies_container::ue_context_release_request_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -54916,12 +54403,13 @@ SRSASN_CODE ue_context_release_request_ies_container::unpack(cbit_ref& bref) gw_context_release_ind.value = c.value.gw_context_release_ind(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -54965,7 +54453,7 @@ void ue_context_release_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_resume_fail_ies_container::ue_context_resume_fail_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -55025,12 +54513,13 @@ SRSASN_CODE ue_context_resume_fail_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -55074,7 +54563,7 @@ void ue_context_resume_fail_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_resume_request_ies_container::ue_context_resume_request_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -55137,12 +54626,13 @@ SRSASN_CODE ue_context_resume_request_ies_container::unpack(cbit_ref& bref) rrc_resume_cause.value = c.value.rrc_resume_cause(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -55188,7 +54678,7 @@ void ue_context_resume_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_resume_resp_ies_container::ue_context_resume_resp_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -55273,12 +54763,13 @@ SRSASN_CODE ue_context_resume_resp_ies_container::unpack(cbit_ref& bref) pending_data_ind.value = c.value.pending_data_ind(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -55332,7 +54823,7 @@ void ue_context_resume_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_suspend_request_ies_container::ue_context_suspend_request_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -55395,12 +54886,13 @@ SRSASN_CODE ue_context_suspend_request_ies_container::unpack(cbit_ref& bref) cell_id_and_ce_level_for_ce_capable_ues.value = c.value.cell_id_and_ce_level_for_ce_capable_ues(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -55446,7 +54938,7 @@ void ue_context_suspend_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_context_suspend_resp_ies_container::ue_context_suspend_resp_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -55509,12 +55001,13 @@ SRSASN_CODE ue_context_suspend_resp_ies_container::unpack(cbit_ref& bref) security_context.value = c.value.security_context(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -55560,7 +55053,7 @@ void ue_context_suspend_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_info_transfer_ies_container::ue_info_transfer_ies_container() : s_tmsi(96, crit_e::reject), @@ -55626,12 +55119,13 @@ SRSASN_CODE ue_info_transfer_ies_container::unpack(cbit_ref& bref) pending_data_ind.value = c.value.pending_data_ind(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -55679,7 +55173,7 @@ void ue_info_transfer_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_radio_cap_match_request_ies_container::ue_radio_cap_match_request_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -55731,12 +55225,13 @@ SRSASN_CODE ue_radio_cap_match_request_ies_container::unpack(cbit_ref& bref) ue_radio_cap.value = c.value.ue_radio_cap(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -55778,7 +55273,7 @@ void ue_radio_cap_match_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ue_radio_cap_match_resp_ies_container::ue_radio_cap_match_resp_ies_container() : mme_ue_s1ap_id(0, crit_e::ignore), @@ -55838,12 +55333,13 @@ SRSASN_CODE ue_radio_cap_match_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -55887,7 +55383,7 @@ void ue_radio_cap_match_resp_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ul_nas_transport_ies_container::ul_nas_transport_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -55985,12 +55481,13 @@ SRSASN_CODE ul_nas_transport_ies_container::unpack(cbit_ref& bref) lhn_id.value = c.value.lhn_id(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -56046,7 +55543,7 @@ void ul_nas_transport_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ul_non_ueassociated_lp_pa_transport_ies_container::ul_non_ueassociated_lp_pa_transport_ies_container() : routing_id(148, crit_e::reject), @@ -56087,12 +55584,13 @@ SRSASN_CODE ul_non_ueassociated_lp_pa_transport_ies_container::unpack(cbit_ref& lp_pa_pdu.value = c.value.lp_pa_pdu(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -56130,7 +55628,7 @@ void ul_non_ueassociated_lp_pa_transport_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ul_s1cdma2000tunnelling_ies_container::ul_s1cdma2000tunnelling_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -56239,12 +55737,13 @@ SRSASN_CODE ul_s1cdma2000tunnelling_ies_container::unpack(cbit_ref& bref) eutran_round_trip_delay_estimation_info.value = c.value.eutran_round_trip_delay_estimation_info(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -56304,7 +55803,7 @@ void ul_s1cdma2000tunnelling_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; ul_ueassociated_lp_pa_transport_ies_container::ul_ueassociated_lp_pa_transport_ies_container() : mme_ue_s1ap_id(0, crit_e::reject), @@ -56361,12 +55860,13 @@ SRSASN_CODE ul_ueassociated_lp_pa_transport_ies_container::unpack(cbit_ref& bref lp_pa_pdu.value = c.value.lp_pa_pdu(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -56408,7 +55908,7 @@ void ul_ueassociated_lp_pa_transport_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; write_replace_warning_request_ies_container::write_replace_warning_request_ies_container() : msg_id(111, crit_e::reject), @@ -56542,12 +56042,13 @@ SRSASN_CODE write_replace_warning_request_ies_container::unpack(cbit_ref& bref) concurrent_warning_msg_ind.value = c.value.concurrent_warning_msg_ind(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -56617,7 +56118,7 @@ void write_replace_warning_request_s::to_json(json_writer& j) const j.end_obj(); } -template struct protocol_ie_field_s; +template struct asn1::s1ap::protocol_ie_field_s; write_replace_warning_resp_ies_container::write_replace_warning_resp_ies_container() : msg_id(111, crit_e::reject), @@ -56680,12 +56181,13 @@ SRSASN_CODE write_replace_warning_resp_ies_container::unpack(cbit_ref& bref) crit_diagnostics.value = c.value.crit_diagnostics(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } if (nof_mandatory_ies > 0) { - s1ap_log_print(LOG_LEVEL_ERROR, "Mandatory fields are missing\n"); + logmap::get("ASN1::S1AP")->error("Mandatory fields are missing\n"); + return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; @@ -56731,23 +56233,27 @@ void write_replace_warning_resp_s::to_json(json_writer& j) const j.end_obj(); } -// S1AP-ELEMENTARY-PROCEDURES-CLASS-1 ::= OBJECT SET OF S1AP-ELEMENTARY-PROCEDURE -uint16_t s1ap_elem_procs_class_minus1_o::idx_to_proc_code(uint32_t idx) +// S1AP-ELEMENTARY-PROCEDURES ::= OBJECT SET OF S1AP-ELEMENTARY-PROCEDURE +uint16_t s1ap_elem_procs_o::idx_to_proc_code(uint32_t idx) { - static constexpr const uint16_t options[] = {0, 1, 3, 5, 6, 7, 9, 4, 43, 14, 17, 21, 23, 29, 30, 36}; - return convert_enum_idx(options, 16, idx, "proc_code"); + static const uint16_t options[] = {0, 1, 3, 5, 6, 7, 9, 4, 43, 14, 17, 21, 23, 29, 30, + 36, 2, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 22, 24, 25, + 26, 27, 28, 42, 31, 32, 33, 34, 35, 37, 38, 40, 41, 39}; + return map_enum_number(options, 44, idx, "proc_code"); } -bool s1ap_elem_procs_class_minus1_o::is_proc_code_valid(const uint16_t& proc_code) +bool s1ap_elem_procs_o::is_proc_code_valid(const uint16_t& proc_code) { - static constexpr const uint16_t options[] = {0, 1, 3, 5, 6, 7, 9, 4, 43, 14, 17, 21, 23, 29, 30, 36}; - for (uint32_t i = 0; i < 16; ++i) { - if (options[i] == proc_code) { + static const uint16_t options[] = {0, 1, 3, 5, 6, 7, 9, 4, 43, 14, 17, 21, 23, 29, 30, + 36, 2, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 22, 24, 25, + 26, 27, 28, 42, 31, 32, 33, 34, 35, 37, 38, 40, 41, 39}; + for (const auto& o : options) { + if (o == proc_code) { return true; } } return false; } -s1ap_elem_procs_class_minus1_o::init_msg_c s1ap_elem_procs_class_minus1_o::get_init_msg(const uint16_t& proc_code) +s1ap_elem_procs_o::init_msg_c s1ap_elem_procs_o::get_init_msg(const uint16_t& proc_code) { init_msg_c ret{}; switch (proc_code) { @@ -56799,120 +56305,186 @@ s1ap_elem_procs_class_minus1_o::init_msg_c s1ap_elem_procs_class_minus1_o::get_i case 36: ret.set(init_msg_c::types::write_replace_warning_request); break; + case 2: + ret.set(init_msg_c::types::ho_notify); + break; + case 8: + ret.set(init_msg_c::types::erab_release_ind); + break; + case 10: + ret.set(init_msg_c::types::paging); + break; + case 11: + ret.set(init_msg_c::types::dl_nas_transport); + break; + case 12: + ret.set(init_msg_c::types::init_ue_msg); + break; + case 13: + ret.set(init_msg_c::types::ul_nas_transport); + break; + case 15: + ret.set(init_msg_c::types::error_ind); + break; + case 16: + ret.set(init_msg_c::types::nas_non_delivery_ind); + break; + case 18: + ret.set(init_msg_c::types::ue_context_release_request); + break; + case 19: + ret.set(init_msg_c::types::dl_s1cdma2000tunnelling); + break; + case 20: + ret.set(init_msg_c::types::ul_s1cdma2000tunnelling); + break; + case 22: + ret.set(init_msg_c::types::ue_cap_info_ind); + break; + case 24: + ret.set(init_msg_c::types::enb_status_transfer); + break; + case 25: + ret.set(init_msg_c::types::mme_status_transfer); + break; + case 26: + ret.set(init_msg_c::types::deactiv_trace); + break; + case 27: + ret.set(init_msg_c::types::trace_start); + break; + case 28: + ret.set(init_msg_c::types::trace_fail_ind); + break; + case 42: + ret.set(init_msg_c::types::cell_traffic_trace); + break; + case 31: + ret.set(init_msg_c::types::location_report_ctrl); + break; + case 32: + ret.set(init_msg_c::types::location_report_fail_ind); + break; + case 33: + ret.set(init_msg_c::types::location_report); + break; + case 34: + ret.set(init_msg_c::types::overload_start); + break; + case 35: + ret.set(init_msg_c::types::overload_stop); + break; + case 37: + ret.set(init_msg_c::types::enb_direct_info_transfer); + break; + case 38: + ret.set(init_msg_c::types::mme_direct_info_transfer); + break; + case 40: + ret.set(init_msg_c::types::enb_cfg_transfer); + break; + case 41: + ret.set(init_msg_c::types::mme_cfg_transfer); + break; + case 39: + ret.set(init_msg_c::types::private_msg); + break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); + logmap::get("ASN1::S1AP")->error("The proc_code=%d is not recognized", proc_code); } return ret; } -s1ap_elem_procs_class_minus1_o::successful_outcome_c -s1ap_elem_procs_class_minus1_o::get_successful_outcome(const uint16_t& proc_code) +s1ap_elem_procs_o::successful_outcome_c s1ap_elem_procs_o::get_successful_outcome(const uint16_t& proc_code) { successful_outcome_c ret{}; switch (proc_code) { case 0: - ret.set(successful_outcome_c::types::ho_required); + ret.set(successful_outcome_c::types::ho_cmd); break; case 1: - ret.set(successful_outcome_c::types::ho_request); + ret.set(successful_outcome_c::types::ho_request_ack); break; case 3: - ret.set(successful_outcome_c::types::path_switch_request); + ret.set(successful_outcome_c::types::path_switch_request_ack); break; case 5: - ret.set(successful_outcome_c::types::erab_setup_request); + ret.set(successful_outcome_c::types::erab_setup_resp); break; case 6: - ret.set(successful_outcome_c::types::erab_modify_request); + ret.set(successful_outcome_c::types::erab_modify_resp); break; case 7: - ret.set(successful_outcome_c::types::erab_release_cmd); + ret.set(successful_outcome_c::types::erab_release_resp); break; case 9: - ret.set(successful_outcome_c::types::init_context_setup_request); + ret.set(successful_outcome_c::types::init_context_setup_resp); break; case 4: - ret.set(successful_outcome_c::types::ho_cancel); + ret.set(successful_outcome_c::types::ho_cancel_ack); break; case 43: - ret.set(successful_outcome_c::types::kill_request); + ret.set(successful_outcome_c::types::kill_resp); break; case 14: - ret.set(successful_outcome_c::types::reset); + ret.set(successful_outcome_c::types::reset_ack); break; case 17: - ret.set(successful_outcome_c::types::s1_setup_request); + ret.set(successful_outcome_c::types::s1_setup_resp); break; case 21: - ret.set(successful_outcome_c::types::ue_context_mod_request); + ret.set(successful_outcome_c::types::ue_context_mod_resp); break; case 23: - ret.set(successful_outcome_c::types::ue_context_release_cmd); + ret.set(successful_outcome_c::types::ue_context_release_complete); break; case 29: - ret.set(successful_outcome_c::types::enb_cfg_upd); + ret.set(successful_outcome_c::types::enb_cfg_upd_ack); break; case 30: - ret.set(successful_outcome_c::types::mme_cfg_upd); + ret.set(successful_outcome_c::types::mme_cfg_upd_ack); break; case 36: - ret.set(successful_outcome_c::types::write_replace_warning_request); + ret.set(successful_outcome_c::types::write_replace_warning_resp); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); + logmap::get("ASN1::S1AP")->error("The proc_code=%d is not recognized", proc_code); } return ret; } -s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c -s1ap_elem_procs_class_minus1_o::get_unsuccessful_outcome(const uint16_t& proc_code) +s1ap_elem_procs_o::unsuccessful_outcome_c s1ap_elem_procs_o::get_unsuccessful_outcome(const uint16_t& proc_code) { unsuccessful_outcome_c ret{}; switch (proc_code) { case 0: - ret.set(unsuccessful_outcome_c::types::ho_required); + ret.set(unsuccessful_outcome_c::types::ho_prep_fail); break; case 1: - ret.set(unsuccessful_outcome_c::types::ho_request); + ret.set(unsuccessful_outcome_c::types::ho_fail); break; case 3: - ret.set(unsuccessful_outcome_c::types::path_switch_request); - break; - case 5: - break; - case 6: - break; - case 7: + ret.set(unsuccessful_outcome_c::types::path_switch_request_fail); break; case 9: - ret.set(unsuccessful_outcome_c::types::init_context_setup_request); - break; - case 4: - break; - case 43: - break; - case 14: + ret.set(unsuccessful_outcome_c::types::init_context_setup_fail); break; case 17: - ret.set(unsuccessful_outcome_c::types::s1_setup_request); + ret.set(unsuccessful_outcome_c::types::s1_setup_fail); break; case 21: - ret.set(unsuccessful_outcome_c::types::ue_context_mod_request); - break; - case 23: + ret.set(unsuccessful_outcome_c::types::ue_context_mod_fail); break; case 29: - ret.set(unsuccessful_outcome_c::types::enb_cfg_upd); + ret.set(unsuccessful_outcome_c::types::enb_cfg_upd_fail); break; case 30: - ret.set(unsuccessful_outcome_c::types::mme_cfg_upd); - break; - case 36: + ret.set(unsuccessful_outcome_c::types::mme_cfg_upd_fail); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); + logmap::get("ASN1::S1AP")->error("The proc_code=%d is not recognized", proc_code); } return ret; } -crit_e s1ap_elem_procs_class_minus1_o::get_crit(const uint16_t& proc_code) +crit_e s1ap_elem_procs_o::get_crit(const uint16_t& proc_code) { switch (proc_code) { case 0: @@ -56947,3860 +56519,370 @@ crit_e s1ap_elem_procs_class_minus1_o::get_crit(const uint16_t& proc_code) return crit_e::reject; case 36: return crit_e::reject; + case 2: + return crit_e::ignore; + case 8: + return crit_e::ignore; + case 10: + return crit_e::ignore; + case 11: + return crit_e::ignore; + case 12: + return crit_e::ignore; + case 13: + return crit_e::ignore; + case 15: + return crit_e::ignore; + case 16: + return crit_e::ignore; + case 18: + return crit_e::ignore; + case 19: + return crit_e::ignore; + case 20: + return crit_e::ignore; + case 22: + return crit_e::ignore; + case 24: + return crit_e::ignore; + case 25: + return crit_e::ignore; + case 26: + return crit_e::ignore; + case 27: + return crit_e::ignore; + case 28: + return crit_e::ignore; + case 42: + return crit_e::ignore; + case 31: + return crit_e::ignore; + case 32: + return crit_e::ignore; + case 33: + return crit_e::ignore; + case 34: + return crit_e::ignore; + case 35: + return crit_e::reject; + case 37: + return crit_e::ignore; + case 38: + return crit_e::ignore; + case 40: + return crit_e::ignore; + case 41: + return crit_e::ignore; + case 39: + return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); + logmap::get("ASN1::S1AP")->error("The proc_code=%d is not recognized", proc_code); } - return crit_e(); + return {}; } // InitiatingMessage ::= OPEN TYPE -ho_required_s& s1ap_elem_procs_class_minus1_o::init_msg_c::ho_required() +ho_required_s& s1ap_elem_procs_o::init_msg_c::ho_required() { assert_choice_type("HandoverRequired", type_.to_string(), "InitiatingMessage"); return c.get(); } -ho_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::ho_request() +ho_request_s& s1ap_elem_procs_o::init_msg_c::ho_request() { assert_choice_type("HandoverRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -path_switch_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::path_switch_request() +path_switch_request_s& s1ap_elem_procs_o::init_msg_c::path_switch_request() { assert_choice_type("PathSwitchRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -erab_setup_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::erab_setup_request() +erab_setup_request_s& s1ap_elem_procs_o::init_msg_c::erab_setup_request() { assert_choice_type("E-RABSetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -erab_modify_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::erab_modify_request() +erab_modify_request_s& s1ap_elem_procs_o::init_msg_c::erab_modify_request() { assert_choice_type("E-RABModifyRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -erab_release_cmd_s& s1ap_elem_procs_class_minus1_o::init_msg_c::erab_release_cmd() +erab_release_cmd_s& s1ap_elem_procs_o::init_msg_c::erab_release_cmd() { assert_choice_type("E-RABReleaseCommand", type_.to_string(), "InitiatingMessage"); return c.get(); } -init_context_setup_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::init_context_setup_request() +init_context_setup_request_s& s1ap_elem_procs_o::init_msg_c::init_context_setup_request() { assert_choice_type("InitialContextSetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -ho_cancel_s& s1ap_elem_procs_class_minus1_o::init_msg_c::ho_cancel() +ho_cancel_s& s1ap_elem_procs_o::init_msg_c::ho_cancel() { assert_choice_type("HandoverCancel", type_.to_string(), "InitiatingMessage"); return c.get(); } -kill_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::kill_request() +kill_request_s& s1ap_elem_procs_o::init_msg_c::kill_request() { assert_choice_type("KillRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -reset_s& s1ap_elem_procs_class_minus1_o::init_msg_c::reset() +reset_s& s1ap_elem_procs_o::init_msg_c::reset() { assert_choice_type("Reset", type_.to_string(), "InitiatingMessage"); return c.get(); } -s1_setup_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::s1_setup_request() +s1_setup_request_s& s1ap_elem_procs_o::init_msg_c::s1_setup_request() { assert_choice_type("S1SetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -ue_context_mod_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::ue_context_mod_request() +ue_context_mod_request_s& s1ap_elem_procs_o::init_msg_c::ue_context_mod_request() { assert_choice_type("UEContextModificationRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -ue_context_release_cmd_s& s1ap_elem_procs_class_minus1_o::init_msg_c::ue_context_release_cmd() +ue_context_release_cmd_s& s1ap_elem_procs_o::init_msg_c::ue_context_release_cmd() { assert_choice_type("UEContextReleaseCommand", type_.to_string(), "InitiatingMessage"); return c.get(); } -enb_cfg_upd_s& s1ap_elem_procs_class_minus1_o::init_msg_c::enb_cfg_upd() +enb_cfg_upd_s& s1ap_elem_procs_o::init_msg_c::enb_cfg_upd() { assert_choice_type("ENBConfigurationUpdate", type_.to_string(), "InitiatingMessage"); return c.get(); } -mme_cfg_upd_s& s1ap_elem_procs_class_minus1_o::init_msg_c::mme_cfg_upd() +mme_cfg_upd_s& s1ap_elem_procs_o::init_msg_c::mme_cfg_upd() { assert_choice_type("MMEConfigurationUpdate", type_.to_string(), "InitiatingMessage"); return c.get(); } -write_replace_warning_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::write_replace_warning_request() +write_replace_warning_request_s& s1ap_elem_procs_o::init_msg_c::write_replace_warning_request() { assert_choice_type("WriteReplaceWarningRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ho_required_s& s1ap_elem_procs_class_minus1_o::init_msg_c::ho_required() const +ho_notify_s& s1ap_elem_procs_o::init_msg_c::ho_notify() +{ + assert_choice_type("HandoverNotify", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +erab_release_ind_s& s1ap_elem_procs_o::init_msg_c::erab_release_ind() +{ + assert_choice_type("E-RABReleaseIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +paging_s& s1ap_elem_procs_o::init_msg_c::paging() +{ + assert_choice_type("Paging", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +dl_nas_transport_s& s1ap_elem_procs_o::init_msg_c::dl_nas_transport() +{ + assert_choice_type("DownlinkNASTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +init_ue_msg_s& s1ap_elem_procs_o::init_msg_c::init_ue_msg() +{ + assert_choice_type("InitialUEMessage", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ul_nas_transport_s& s1ap_elem_procs_o::init_msg_c::ul_nas_transport() +{ + assert_choice_type("UplinkNASTransport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +error_ind_s& s1ap_elem_procs_o::init_msg_c::error_ind() +{ + assert_choice_type("ErrorIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +nas_non_delivery_ind_s& s1ap_elem_procs_o::init_msg_c::nas_non_delivery_ind() +{ + assert_choice_type("NASNonDeliveryIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ue_context_release_request_s& s1ap_elem_procs_o::init_msg_c::ue_context_release_request() +{ + assert_choice_type("UEContextReleaseRequest", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +dl_s1cdma2000tunnelling_s& s1ap_elem_procs_o::init_msg_c::dl_s1cdma2000tunnelling() +{ + assert_choice_type("DownlinkS1cdma2000tunnelling", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ul_s1cdma2000tunnelling_s& s1ap_elem_procs_o::init_msg_c::ul_s1cdma2000tunnelling() +{ + assert_choice_type("UplinkS1cdma2000tunnelling", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +ue_cap_info_ind_s& s1ap_elem_procs_o::init_msg_c::ue_cap_info_ind() +{ + assert_choice_type("UECapabilityInfoIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +enb_status_transfer_s& s1ap_elem_procs_o::init_msg_c::enb_status_transfer() +{ + assert_choice_type("ENBStatusTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +mme_status_transfer_s& s1ap_elem_procs_o::init_msg_c::mme_status_transfer() +{ + assert_choice_type("MMEStatusTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +deactiv_trace_s& s1ap_elem_procs_o::init_msg_c::deactiv_trace() +{ + assert_choice_type("DeactivateTrace", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +trace_start_s& s1ap_elem_procs_o::init_msg_c::trace_start() +{ + assert_choice_type("TraceStart", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +trace_fail_ind_s& s1ap_elem_procs_o::init_msg_c::trace_fail_ind() +{ + assert_choice_type("TraceFailureIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +cell_traffic_trace_s& s1ap_elem_procs_o::init_msg_c::cell_traffic_trace() +{ + assert_choice_type("CellTrafficTrace", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +location_report_ctrl_s& s1ap_elem_procs_o::init_msg_c::location_report_ctrl() +{ + assert_choice_type("LocationReportingControl", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +location_report_fail_ind_s& s1ap_elem_procs_o::init_msg_c::location_report_fail_ind() +{ + assert_choice_type("LocationReportingFailureIndication", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +location_report_s& s1ap_elem_procs_o::init_msg_c::location_report() +{ + assert_choice_type("LocationReport", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +overload_start_s& s1ap_elem_procs_o::init_msg_c::overload_start() +{ + assert_choice_type("OverloadStart", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +overload_stop_s& s1ap_elem_procs_o::init_msg_c::overload_stop() +{ + assert_choice_type("OverloadStop", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +enb_direct_info_transfer_s& s1ap_elem_procs_o::init_msg_c::enb_direct_info_transfer() +{ + assert_choice_type("ENBDirectInformationTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +mme_direct_info_transfer_s& s1ap_elem_procs_o::init_msg_c::mme_direct_info_transfer() +{ + assert_choice_type("MMEDirectInformationTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +enb_cfg_transfer_s& s1ap_elem_procs_o::init_msg_c::enb_cfg_transfer() +{ + assert_choice_type("ENBConfigurationTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +mme_cfg_transfer_s& s1ap_elem_procs_o::init_msg_c::mme_cfg_transfer() +{ + assert_choice_type("MMEConfigurationTransfer", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +private_msg_s& s1ap_elem_procs_o::init_msg_c::private_msg() +{ + assert_choice_type("PrivateMessage", type_.to_string(), "InitiatingMessage"); + return c.get(); +} +const ho_required_s& s1ap_elem_procs_o::init_msg_c::ho_required() const { assert_choice_type("HandoverRequired", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ho_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::ho_request() const +const ho_request_s& s1ap_elem_procs_o::init_msg_c::ho_request() const { assert_choice_type("HandoverRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const path_switch_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::path_switch_request() const +const path_switch_request_s& s1ap_elem_procs_o::init_msg_c::path_switch_request() const { assert_choice_type("PathSwitchRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const erab_setup_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::erab_setup_request() const +const erab_setup_request_s& s1ap_elem_procs_o::init_msg_c::erab_setup_request() const { assert_choice_type("E-RABSetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const erab_modify_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::erab_modify_request() const +const erab_modify_request_s& s1ap_elem_procs_o::init_msg_c::erab_modify_request() const { assert_choice_type("E-RABModifyRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const erab_release_cmd_s& s1ap_elem_procs_class_minus1_o::init_msg_c::erab_release_cmd() const +const erab_release_cmd_s& s1ap_elem_procs_o::init_msg_c::erab_release_cmd() const { assert_choice_type("E-RABReleaseCommand", type_.to_string(), "InitiatingMessage"); return c.get(); } -const init_context_setup_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::init_context_setup_request() const +const init_context_setup_request_s& s1ap_elem_procs_o::init_msg_c::init_context_setup_request() const { assert_choice_type("InitialContextSetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ho_cancel_s& s1ap_elem_procs_class_minus1_o::init_msg_c::ho_cancel() const +const ho_cancel_s& s1ap_elem_procs_o::init_msg_c::ho_cancel() const { assert_choice_type("HandoverCancel", type_.to_string(), "InitiatingMessage"); return c.get(); } -const kill_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::kill_request() const +const kill_request_s& s1ap_elem_procs_o::init_msg_c::kill_request() const { assert_choice_type("KillRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const reset_s& s1ap_elem_procs_class_minus1_o::init_msg_c::reset() const +const reset_s& s1ap_elem_procs_o::init_msg_c::reset() const { assert_choice_type("Reset", type_.to_string(), "InitiatingMessage"); return c.get(); } -const s1_setup_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::s1_setup_request() const +const s1_setup_request_s& s1ap_elem_procs_o::init_msg_c::s1_setup_request() const { assert_choice_type("S1SetupRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ue_context_mod_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::ue_context_mod_request() const +const ue_context_mod_request_s& s1ap_elem_procs_o::init_msg_c::ue_context_mod_request() const { assert_choice_type("UEContextModificationRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -const ue_context_release_cmd_s& s1ap_elem_procs_class_minus1_o::init_msg_c::ue_context_release_cmd() const +const ue_context_release_cmd_s& s1ap_elem_procs_o::init_msg_c::ue_context_release_cmd() const { assert_choice_type("UEContextReleaseCommand", type_.to_string(), "InitiatingMessage"); return c.get(); } -const enb_cfg_upd_s& s1ap_elem_procs_class_minus1_o::init_msg_c::enb_cfg_upd() const +const enb_cfg_upd_s& s1ap_elem_procs_o::init_msg_c::enb_cfg_upd() const { assert_choice_type("ENBConfigurationUpdate", type_.to_string(), "InitiatingMessage"); return c.get(); } -const mme_cfg_upd_s& s1ap_elem_procs_class_minus1_o::init_msg_c::mme_cfg_upd() const +const mme_cfg_upd_s& s1ap_elem_procs_o::init_msg_c::mme_cfg_upd() const { assert_choice_type("MMEConfigurationUpdate", type_.to_string(), "InitiatingMessage"); return c.get(); } -const write_replace_warning_request_s& s1ap_elem_procs_class_minus1_o::init_msg_c::write_replace_warning_request() const +const write_replace_warning_request_s& s1ap_elem_procs_o::init_msg_c::write_replace_warning_request() const { assert_choice_type("WriteReplaceWarningRequest", type_.to_string(), "InitiatingMessage"); return c.get(); } -void s1ap_elem_procs_class_minus1_o::init_msg_c::destroy_() -{ - switch (type_) { - case types::ho_required: - c.destroy(); - break; - case types::ho_request: - c.destroy(); - break; - case types::path_switch_request: - c.destroy(); - break; - case types::erab_setup_request: - c.destroy(); - break; - case types::erab_modify_request: - c.destroy(); - break; - case types::erab_release_cmd: - c.destroy(); - break; - case types::init_context_setup_request: - c.destroy(); - break; - case types::ho_cancel: - c.destroy(); - break; - case types::kill_request: - c.destroy(); - break; - case types::reset: - c.destroy(); - break; - case types::s1_setup_request: - c.destroy(); - break; - case types::ue_context_mod_request: - c.destroy(); - break; - case types::ue_context_release_cmd: - c.destroy(); - break; - case types::enb_cfg_upd: - c.destroy(); - break; - case types::mme_cfg_upd: - c.destroy(); - break; - case types::write_replace_warning_request: - c.destroy(); - break; - default: - break; - } -} -void s1ap_elem_procs_class_minus1_o::init_msg_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::ho_required: - c.init(); - break; - case types::ho_request: - c.init(); - break; - case types::path_switch_request: - c.init(); - break; - case types::erab_setup_request: - c.init(); - break; - case types::erab_modify_request: - c.init(); - break; - case types::erab_release_cmd: - c.init(); - break; - case types::init_context_setup_request: - c.init(); - break; - case types::ho_cancel: - c.init(); - break; - case types::kill_request: - c.init(); - break; - case types::reset: - c.init(); - break; - case types::s1_setup_request: - c.init(); - break; - case types::ue_context_mod_request: - c.init(); - break; - case types::ue_context_release_cmd: - c.init(); - break; - case types::enb_cfg_upd: - c.init(); - break; - case types::mme_cfg_upd: - c.init(); - break; - case types::write_replace_warning_request: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::init_msg_c"); - } -} -s1ap_elem_procs_class_minus1_o::init_msg_c::init_msg_c(const s1ap_elem_procs_class_minus1_o::init_msg_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::ho_required: - c.init(other.c.get()); - break; - case types::ho_request: - c.init(other.c.get()); - break; - case types::path_switch_request: - c.init(other.c.get()); - break; - case types::erab_setup_request: - c.init(other.c.get()); - break; - case types::erab_modify_request: - c.init(other.c.get()); - break; - case types::erab_release_cmd: - c.init(other.c.get()); - break; - case types::init_context_setup_request: - c.init(other.c.get()); - break; - case types::ho_cancel: - c.init(other.c.get()); - break; - case types::kill_request: - c.init(other.c.get()); - break; - case types::reset: - c.init(other.c.get()); - break; - case types::s1_setup_request: - c.init(other.c.get()); - break; - case types::ue_context_mod_request: - c.init(other.c.get()); - break; - case types::ue_context_release_cmd: - c.init(other.c.get()); - break; - case types::enb_cfg_upd: - c.init(other.c.get()); - break; - case types::mme_cfg_upd: - c.init(other.c.get()); - break; - case types::write_replace_warning_request: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::init_msg_c"); - } -} -s1ap_elem_procs_class_minus1_o::init_msg_c& s1ap_elem_procs_class_minus1_o::init_msg_c:: - operator=(const s1ap_elem_procs_class_minus1_o::init_msg_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ho_required: - c.set(other.c.get()); - break; - case types::ho_request: - c.set(other.c.get()); - break; - case types::path_switch_request: - c.set(other.c.get()); - break; - case types::erab_setup_request: - c.set(other.c.get()); - break; - case types::erab_modify_request: - c.set(other.c.get()); - break; - case types::erab_release_cmd: - c.set(other.c.get()); - break; - case types::init_context_setup_request: - c.set(other.c.get()); - break; - case types::ho_cancel: - c.set(other.c.get()); - break; - case types::kill_request: - c.set(other.c.get()); - break; - case types::reset: - c.set(other.c.get()); - break; - case types::s1_setup_request: - c.set(other.c.get()); - break; - case types::ue_context_mod_request: - c.set(other.c.get()); - break; - case types::ue_context_release_cmd: - c.set(other.c.get()); - break; - case types::enb_cfg_upd: - c.set(other.c.get()); - break; - case types::mme_cfg_upd: - c.set(other.c.get()); - break; - case types::write_replace_warning_request: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::init_msg_c"); - } - - return *this; -} -void s1ap_elem_procs_class_minus1_o::init_msg_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ho_required: - j.write_fieldname("HandoverRequired"); - c.get().to_json(j); - break; - case types::ho_request: - j.write_fieldname("HandoverRequest"); - c.get().to_json(j); - break; - case types::path_switch_request: - j.write_fieldname("PathSwitchRequest"); - c.get().to_json(j); - break; - case types::erab_setup_request: - j.write_fieldname("E-RABSetupRequest"); - c.get().to_json(j); - break; - case types::erab_modify_request: - j.write_fieldname("E-RABModifyRequest"); - c.get().to_json(j); - break; - case types::erab_release_cmd: - j.write_fieldname("E-RABReleaseCommand"); - c.get().to_json(j); - break; - case types::init_context_setup_request: - j.write_fieldname("InitialContextSetupRequest"); - c.get().to_json(j); - break; - case types::ho_cancel: - j.write_fieldname("HandoverCancel"); - c.get().to_json(j); - break; - case types::kill_request: - j.write_fieldname("KillRequest"); - c.get().to_json(j); - break; - case types::reset: - j.write_fieldname("Reset"); - c.get().to_json(j); - break; - case types::s1_setup_request: - j.write_fieldname("S1SetupRequest"); - c.get().to_json(j); - break; - case types::ue_context_mod_request: - j.write_fieldname("UEContextModificationRequest"); - c.get().to_json(j); - break; - case types::ue_context_release_cmd: - j.write_fieldname("UEContextReleaseCommand"); - c.get().to_json(j); - break; - case types::enb_cfg_upd: - j.write_fieldname("ENBConfigurationUpdate"); - c.get().to_json(j); - break; - case types::mme_cfg_upd: - j.write_fieldname("MMEConfigurationUpdate"); - c.get().to_json(j); - break; - case types::write_replace_warning_request: - j.write_fieldname("WriteReplaceWarningRequest"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::init_msg_c"); - } - j.end_obj(); -} -SRSASN_CODE s1ap_elem_procs_class_minus1_o::init_msg_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - switch (type_) { - case types::ho_required: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::erab_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::erab_modify_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::erab_release_cmd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_cancel: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::kill_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::reset: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::s1_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_release_cmd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::enb_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::mme_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::write_replace_warning_request: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::init_msg_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE s1ap_elem_procs_class_minus1_o::init_msg_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - switch (type_) { - case types::ho_required: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::erab_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::erab_modify_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::erab_release_cmd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_cancel: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::kill_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::reset: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::s1_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_release_cmd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::enb_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::mme_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::write_replace_warning_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::init_msg_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string s1ap_elem_procs_class_minus1_o::init_msg_c::types_opts::to_string() const -{ - static constexpr const char* options[] = {"HandoverRequired", - "HandoverRequest", - "PathSwitchRequest", - "E-RABSetupRequest", - "E-RABModifyRequest", - "E-RABReleaseCommand", - "InitialContextSetupRequest", - "HandoverCancel", - "KillRequest", - "Reset", - "S1SetupRequest", - "UEContextModificationRequest", - "UEContextReleaseCommand", - "ENBConfigurationUpdate", - "MMEConfigurationUpdate", - "WriteReplaceWarningRequest"}; - return convert_enum_idx(options, 16, value, "s1ap_elem_procs_class_minus1_o::init_msg_c::types"); -} -uint8_t s1ap_elem_procs_class_minus1_o::init_msg_c::types_opts::to_number() const -{ - switch (value) { - case s1_setup_request: - return 1; - default: - invalid_enum_number(value, "s1ap_elem_procs_class_minus1_o::init_msg_c::types"); - } - return 0; -} - -// SuccessfulOutcome ::= OPEN TYPE -ho_cmd_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::ho_required() -{ - assert_choice_type("HandoverCommand", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ho_request_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::ho_request() -{ - assert_choice_type("HandoverRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -path_switch_request_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::path_switch_request() -{ - assert_choice_type("PathSwitchRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -erab_setup_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::erab_setup_request() -{ - assert_choice_type("E-RABSetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -erab_modify_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::erab_modify_request() -{ - assert_choice_type("E-RABModifyResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -erab_release_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::erab_release_cmd() -{ - assert_choice_type("E-RABReleaseResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -init_context_setup_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::init_context_setup_request() -{ - assert_choice_type("InitialContextSetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ho_cancel_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::ho_cancel() -{ - assert_choice_type("HandoverCancelAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -kill_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::kill_request() -{ - assert_choice_type("KillResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -reset_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::reset() -{ - assert_choice_type("ResetAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -s1_setup_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::s1_setup_request() -{ - assert_choice_type("S1SetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ue_context_mod_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::ue_context_mod_request() -{ - assert_choice_type("UEContextModificationResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -ue_context_release_complete_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::ue_context_release_cmd() -{ - assert_choice_type("UEContextReleaseComplete", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -enb_cfg_upd_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::enb_cfg_upd() -{ - assert_choice_type("ENBConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -mme_cfg_upd_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::mme_cfg_upd() -{ - assert_choice_type("MMEConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -write_replace_warning_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::write_replace_warning_request() -{ - assert_choice_type("WriteReplaceWarningResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ho_cmd_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::ho_required() const -{ - assert_choice_type("HandoverCommand", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ho_request_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::ho_request() const -{ - assert_choice_type("HandoverRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const path_switch_request_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::path_switch_request() const -{ - assert_choice_type("PathSwitchRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const erab_setup_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::erab_setup_request() const -{ - assert_choice_type("E-RABSetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const erab_modify_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::erab_modify_request() const -{ - assert_choice_type("E-RABModifyResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const erab_release_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::erab_release_cmd() const -{ - assert_choice_type("E-RABReleaseResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const init_context_setup_resp_s& -s1ap_elem_procs_class_minus1_o::successful_outcome_c::init_context_setup_request() const -{ - assert_choice_type("InitialContextSetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ho_cancel_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::ho_cancel() const -{ - assert_choice_type("HandoverCancelAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const kill_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::kill_request() const -{ - assert_choice_type("KillResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const reset_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::reset() const -{ - assert_choice_type("ResetAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const s1_setup_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::s1_setup_request() const -{ - assert_choice_type("S1SetupResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ue_context_mod_resp_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::ue_context_mod_request() const -{ - assert_choice_type("UEContextModificationResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const ue_context_release_complete_s& -s1ap_elem_procs_class_minus1_o::successful_outcome_c::ue_context_release_cmd() const -{ - assert_choice_type("UEContextReleaseComplete", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const enb_cfg_upd_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::enb_cfg_upd() const -{ - assert_choice_type("ENBConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const mme_cfg_upd_ack_s& s1ap_elem_procs_class_minus1_o::successful_outcome_c::mme_cfg_upd() const -{ - assert_choice_type("MMEConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -const write_replace_warning_resp_s& -s1ap_elem_procs_class_minus1_o::successful_outcome_c::write_replace_warning_request() const -{ - assert_choice_type("WriteReplaceWarningResponse", type_.to_string(), "SuccessfulOutcome"); - return c.get(); -} -void s1ap_elem_procs_class_minus1_o::successful_outcome_c::destroy_() -{ - switch (type_) { - case types::ho_required: - c.destroy(); - break; - case types::ho_request: - c.destroy(); - break; - case types::path_switch_request: - c.destroy(); - break; - case types::erab_setup_request: - c.destroy(); - break; - case types::erab_modify_request: - c.destroy(); - break; - case types::erab_release_cmd: - c.destroy(); - break; - case types::init_context_setup_request: - c.destroy(); - break; - case types::ho_cancel: - c.destroy(); - break; - case types::kill_request: - c.destroy(); - break; - case types::reset: - c.destroy(); - break; - case types::s1_setup_request: - c.destroy(); - break; - case types::ue_context_mod_request: - c.destroy(); - break; - case types::ue_context_release_cmd: - c.destroy(); - break; - case types::enb_cfg_upd: - c.destroy(); - break; - case types::mme_cfg_upd: - c.destroy(); - break; - case types::write_replace_warning_request: - c.destroy(); - break; - default: - break; - } -} -void s1ap_elem_procs_class_minus1_o::successful_outcome_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::ho_required: - c.init(); - break; - case types::ho_request: - c.init(); - break; - case types::path_switch_request: - c.init(); - break; - case types::erab_setup_request: - c.init(); - break; - case types::erab_modify_request: - c.init(); - break; - case types::erab_release_cmd: - c.init(); - break; - case types::init_context_setup_request: - c.init(); - break; - case types::ho_cancel: - c.init(); - break; - case types::kill_request: - c.init(); - break; - case types::reset: - c.init(); - break; - case types::s1_setup_request: - c.init(); - break; - case types::ue_context_mod_request: - c.init(); - break; - case types::ue_context_release_cmd: - c.init(); - break; - case types::enb_cfg_upd: - c.init(); - break; - case types::mme_cfg_upd: - c.init(); - break; - case types::write_replace_warning_request: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::successful_outcome_c"); - } -} -s1ap_elem_procs_class_minus1_o::successful_outcome_c::successful_outcome_c( - const s1ap_elem_procs_class_minus1_o::successful_outcome_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::ho_required: - c.init(other.c.get()); - break; - case types::ho_request: - c.init(other.c.get()); - break; - case types::path_switch_request: - c.init(other.c.get()); - break; - case types::erab_setup_request: - c.init(other.c.get()); - break; - case types::erab_modify_request: - c.init(other.c.get()); - break; - case types::erab_release_cmd: - c.init(other.c.get()); - break; - case types::init_context_setup_request: - c.init(other.c.get()); - break; - case types::ho_cancel: - c.init(other.c.get()); - break; - case types::kill_request: - c.init(other.c.get()); - break; - case types::reset: - c.init(other.c.get()); - break; - case types::s1_setup_request: - c.init(other.c.get()); - break; - case types::ue_context_mod_request: - c.init(other.c.get()); - break; - case types::ue_context_release_cmd: - c.init(other.c.get()); - break; - case types::enb_cfg_upd: - c.init(other.c.get()); - break; - case types::mme_cfg_upd: - c.init(other.c.get()); - break; - case types::write_replace_warning_request: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::successful_outcome_c"); - } -} -s1ap_elem_procs_class_minus1_o::successful_outcome_c& s1ap_elem_procs_class_minus1_o::successful_outcome_c:: - operator=(const s1ap_elem_procs_class_minus1_o::successful_outcome_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ho_required: - c.set(other.c.get()); - break; - case types::ho_request: - c.set(other.c.get()); - break; - case types::path_switch_request: - c.set(other.c.get()); - break; - case types::erab_setup_request: - c.set(other.c.get()); - break; - case types::erab_modify_request: - c.set(other.c.get()); - break; - case types::erab_release_cmd: - c.set(other.c.get()); - break; - case types::init_context_setup_request: - c.set(other.c.get()); - break; - case types::ho_cancel: - c.set(other.c.get()); - break; - case types::kill_request: - c.set(other.c.get()); - break; - case types::reset: - c.set(other.c.get()); - break; - case types::s1_setup_request: - c.set(other.c.get()); - break; - case types::ue_context_mod_request: - c.set(other.c.get()); - break; - case types::ue_context_release_cmd: - c.set(other.c.get()); - break; - case types::enb_cfg_upd: - c.set(other.c.get()); - break; - case types::mme_cfg_upd: - c.set(other.c.get()); - break; - case types::write_replace_warning_request: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::successful_outcome_c"); - } - - return *this; -} -void s1ap_elem_procs_class_minus1_o::successful_outcome_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ho_required: - j.write_fieldname("HandoverCommand"); - c.get().to_json(j); - break; - case types::ho_request: - j.write_fieldname("HandoverRequestAcknowledge"); - c.get().to_json(j); - break; - case types::path_switch_request: - j.write_fieldname("PathSwitchRequestAcknowledge"); - c.get().to_json(j); - break; - case types::erab_setup_request: - j.write_fieldname("E-RABSetupResponse"); - c.get().to_json(j); - break; - case types::erab_modify_request: - j.write_fieldname("E-RABModifyResponse"); - c.get().to_json(j); - break; - case types::erab_release_cmd: - j.write_fieldname("E-RABReleaseResponse"); - c.get().to_json(j); - break; - case types::init_context_setup_request: - j.write_fieldname("InitialContextSetupResponse"); - c.get().to_json(j); - break; - case types::ho_cancel: - j.write_fieldname("HandoverCancelAcknowledge"); - c.get().to_json(j); - break; - case types::kill_request: - j.write_fieldname("KillResponse"); - c.get().to_json(j); - break; - case types::reset: - j.write_fieldname("ResetAcknowledge"); - c.get().to_json(j); - break; - case types::s1_setup_request: - j.write_fieldname("S1SetupResponse"); - c.get().to_json(j); - break; - case types::ue_context_mod_request: - j.write_fieldname("UEContextModificationResponse"); - c.get().to_json(j); - break; - case types::ue_context_release_cmd: - j.write_fieldname("UEContextReleaseComplete"); - c.get().to_json(j); - break; - case types::enb_cfg_upd: - j.write_fieldname("ENBConfigurationUpdateAcknowledge"); - c.get().to_json(j); - break; - case types::mme_cfg_upd: - j.write_fieldname("MMEConfigurationUpdateAcknowledge"); - c.get().to_json(j); - break; - case types::write_replace_warning_request: - j.write_fieldname("WriteReplaceWarningResponse"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::successful_outcome_c"); - } - j.end_obj(); -} -SRSASN_CODE s1ap_elem_procs_class_minus1_o::successful_outcome_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - switch (type_) { - case types::ho_required: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::erab_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::erab_modify_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::erab_release_cmd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_cancel: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::kill_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::reset: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::s1_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_release_cmd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::enb_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::mme_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::write_replace_warning_request: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::successful_outcome_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE s1ap_elem_procs_class_minus1_o::successful_outcome_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - switch (type_) { - case types::ho_required: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::erab_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::erab_modify_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::erab_release_cmd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_cancel: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::kill_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::reset: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::s1_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_release_cmd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::enb_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::mme_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::write_replace_warning_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::successful_outcome_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string s1ap_elem_procs_class_minus1_o::successful_outcome_c::types_opts::to_string() const -{ - static constexpr const char* options[] = {"HandoverCommand", - "HandoverRequestAcknowledge", - "PathSwitchRequestAcknowledge", - "E-RABSetupResponse", - "E-RABModifyResponse", - "E-RABReleaseResponse", - "InitialContextSetupResponse", - "HandoverCancelAcknowledge", - "KillResponse", - "ResetAcknowledge", - "S1SetupResponse", - "UEContextModificationResponse", - "UEContextReleaseComplete", - "ENBConfigurationUpdateAcknowledge", - "MMEConfigurationUpdateAcknowledge", - "WriteReplaceWarningResponse"}; - return convert_enum_idx(options, 16, value, "s1ap_elem_procs_class_minus1_o::successful_outcome_c::types"); -} -uint8_t s1ap_elem_procs_class_minus1_o::successful_outcome_c::types_opts::to_number() const -{ - switch (value) { - case s1_setup_request: - return 1; - default: - invalid_enum_number(value, "s1ap_elem_procs_class_minus1_o::successful_outcome_c::types"); - } - return 0; -} - -// UnsuccessfulOutcome ::= OPEN TYPE -ho_prep_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ho_required() -{ - assert_choice_type("HandoverPreparationFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -ho_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ho_request() -{ - assert_choice_type("HandoverFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -path_switch_request_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::path_switch_request() -{ - assert_choice_type("PathSwitchRequestFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -init_context_setup_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::init_context_setup_request() -{ - assert_choice_type("InitialContextSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -s1_setup_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::s1_setup_request() -{ - assert_choice_type("S1SetupFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -ue_context_mod_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ue_context_mod_request() -{ - assert_choice_type("UEContextModificationFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -enb_cfg_upd_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::enb_cfg_upd() -{ - assert_choice_type("ENBConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -mme_cfg_upd_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::mme_cfg_upd() -{ - assert_choice_type("MMEConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const ho_prep_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ho_required() const -{ - assert_choice_type("HandoverPreparationFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const ho_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ho_request() const -{ - assert_choice_type("HandoverFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const path_switch_request_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::path_switch_request() const -{ - assert_choice_type("PathSwitchRequestFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const init_context_setup_fail_s& -s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::init_context_setup_request() const -{ - assert_choice_type("InitialContextSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const s1_setup_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::s1_setup_request() const -{ - assert_choice_type("S1SetupFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const ue_context_mod_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::ue_context_mod_request() const -{ - assert_choice_type("UEContextModificationFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const enb_cfg_upd_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::enb_cfg_upd() const -{ - assert_choice_type("ENBConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -const mme_cfg_upd_fail_s& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::mme_cfg_upd() const -{ - assert_choice_type("MMEConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); - return c.get(); -} -void s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::destroy_() -{ - switch (type_) { - case types::ho_required: - c.destroy(); - break; - case types::ho_request: - c.destroy(); - break; - case types::path_switch_request: - c.destroy(); - break; - case types::init_context_setup_request: - c.destroy(); - break; - case types::s1_setup_request: - c.destroy(); - break; - case types::ue_context_mod_request: - c.destroy(); - break; - case types::enb_cfg_upd: - c.destroy(); - break; - case types::mme_cfg_upd: - c.destroy(); - break; - default: - break; - } -} -void s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::ho_required: - c.init(); - break; - case types::ho_request: - c.init(); - break; - case types::path_switch_request: - c.init(); - break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: - c.init(); - break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: - c.init(); - break; - case types::ue_context_mod_request: - c.init(); - break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: - c.init(); - break; - case types::mme_cfg_upd: - c.init(); - break; - case types::write_replace_warning_request: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - } -} -s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::unsuccessful_outcome_c( - const s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::ho_required: - c.init(other.c.get()); - break; - case types::ho_request: - c.init(other.c.get()); - break; - case types::path_switch_request: - c.init(other.c.get()); - break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: - c.init(other.c.get()); - break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: - c.init(other.c.get()); - break; - case types::ue_context_mod_request: - c.init(other.c.get()); - break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: - c.init(other.c.get()); - break; - case types::mme_cfg_upd: - c.init(other.c.get()); - break; - case types::write_replace_warning_request: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - } -} -s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c& s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c:: - operator=(const s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ho_required: - c.set(other.c.get()); - break; - case types::ho_request: - c.set(other.c.get()); - break; - case types::path_switch_request: - c.set(other.c.get()); - break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: - c.set(other.c.get()); - break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: - c.set(other.c.get()); - break; - case types::ue_context_mod_request: - c.set(other.c.get()); - break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: - c.set(other.c.get()); - break; - case types::mme_cfg_upd: - c.set(other.c.get()); - break; - case types::write_replace_warning_request: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - } - - return *this; -} -void s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ho_required: - j.write_fieldname("HandoverPreparationFailure"); - c.get().to_json(j); - break; - case types::ho_request: - j.write_fieldname("HandoverFailure"); - c.get().to_json(j); - break; - case types::path_switch_request: - j.write_fieldname("PathSwitchRequestFailure"); - c.get().to_json(j); - break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: - j.write_fieldname("InitialContextSetupFailure"); - c.get().to_json(j); - break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: - j.write_fieldname("S1SetupFailure"); - c.get().to_json(j); - break; - case types::ue_context_mod_request: - j.write_fieldname("UEContextModificationFailure"); - c.get().to_json(j); - break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: - j.write_fieldname("ENBConfigurationUpdateFailure"); - c.get().to_json(j); - break; - case types::mme_cfg_upd: - j.write_fieldname("MMEConfigurationUpdateFailure"); - c.get().to_json(j); - break; - case types::write_replace_warning_request: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - } - j.end_obj(); -} -SRSASN_CODE s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - switch (type_) { - case types::ho_required: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::mme_cfg_upd: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::write_replace_warning_request: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - switch (type_) { - case types::ho_required: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::path_switch_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::mme_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::write_replace_warning_request: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::types_opts::to_string() const -{ - static constexpr const char* options[] = {"HandoverPreparationFailure", - "HandoverFailure", - "PathSwitchRequestFailure", - "NULL", - "NULL", - "NULL", - "InitialContextSetupFailure", - "NULL", - "NULL", - "NULL", - "S1SetupFailure", - "UEContextModificationFailure", - "NULL", - "ENBConfigurationUpdateFailure", - "MMEConfigurationUpdateFailure", - "NULL"}; - return convert_enum_idx(options, 16, value, "s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::types"); -} -uint8_t s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::types_opts::to_number() const -{ - switch (value) { - case s1_setup_request: - return 1; - default: - invalid_enum_number(value, "s1ap_elem_procs_class_minus1_o::unsuccessful_outcome_c::types"); - } - return 0; -} - -// S1AP-ELEMENTARY-PROCEDURES-CLASS-2 ::= OBJECT SET OF S1AP-ELEMENTARY-PROCEDURE -uint16_t s1ap_elem_procs_class_minus2_o::idx_to_proc_code(uint32_t idx) -{ - static constexpr const uint16_t options[] = {2, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 22, 24, 25, - 26, 27, 28, 42, 31, 32, 33, 34, 35, 37, 38, 40, 41, 39}; - return convert_enum_idx(options, 28, idx, "proc_code"); -} -bool s1ap_elem_procs_class_minus2_o::is_proc_code_valid(const uint16_t& proc_code) -{ - static constexpr const uint16_t options[] = {2, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 22, 24, 25, - 26, 27, 28, 42, 31, 32, 33, 34, 35, 37, 38, 40, 41, 39}; - for (uint32_t i = 0; i < 28; ++i) { - if (options[i] == proc_code) { - return true; - } - } - return false; -} -s1ap_elem_procs_class_minus2_o::init_msg_c s1ap_elem_procs_class_minus2_o::get_init_msg(const uint16_t& proc_code) -{ - init_msg_c ret{}; - switch (proc_code) { - case 2: - ret.set(init_msg_c::types::ho_notify); - break; - case 8: - ret.set(init_msg_c::types::erab_release_ind); - break; - case 10: - ret.set(init_msg_c::types::paging); - break; - case 11: - ret.set(init_msg_c::types::dl_nas_transport); - break; - case 12: - ret.set(init_msg_c::types::init_ue_msg); - break; - case 13: - ret.set(init_msg_c::types::ul_nas_transport); - break; - case 15: - ret.set(init_msg_c::types::error_ind); - break; - case 16: - ret.set(init_msg_c::types::nas_non_delivery_ind); - break; - case 18: - ret.set(init_msg_c::types::ue_context_release_request); - break; - case 19: - ret.set(init_msg_c::types::dl_s1cdma2000tunnelling); - break; - case 20: - ret.set(init_msg_c::types::ul_s1cdma2000tunnelling); - break; - case 22: - ret.set(init_msg_c::types::ue_cap_info_ind); - break; - case 24: - ret.set(init_msg_c::types::enb_status_transfer); - break; - case 25: - ret.set(init_msg_c::types::mme_status_transfer); - break; - case 26: - ret.set(init_msg_c::types::deactiv_trace); - break; - case 27: - ret.set(init_msg_c::types::trace_start); - break; - case 28: - ret.set(init_msg_c::types::trace_fail_ind); - break; - case 42: - ret.set(init_msg_c::types::cell_traffic_trace); - break; - case 31: - ret.set(init_msg_c::types::location_report_ctrl); - break; - case 32: - ret.set(init_msg_c::types::location_report_fail_ind); - break; - case 33: - ret.set(init_msg_c::types::location_report); - break; - case 34: - ret.set(init_msg_c::types::overload_start); - break; - case 35: - ret.set(init_msg_c::types::overload_stop); - break; - case 37: - ret.set(init_msg_c::types::enb_direct_info_transfer); - break; - case 38: - ret.set(init_msg_c::types::mme_direct_info_transfer); - break; - case 40: - ret.set(init_msg_c::types::enb_cfg_transfer); - break; - case 41: - ret.set(init_msg_c::types::mme_cfg_transfer); - break; - case 39: - ret.set(init_msg_c::types::private_msg); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -s1ap_elem_procs_class_minus2_o::successful_outcome_c -s1ap_elem_procs_class_minus2_o::get_successful_outcome(const uint16_t& proc_code) -{ - successful_outcome_c ret{}; - switch (proc_code) { - case 2: - break; - case 8: - break; - case 10: - break; - case 11: - break; - case 12: - break; - case 13: - break; - case 15: - break; - case 16: - break; - case 18: - break; - case 19: - break; - case 20: - break; - case 22: - break; - case 24: - break; - case 25: - break; - case 26: - break; - case 27: - break; - case 28: - break; - case 42: - break; - case 31: - break; - case 32: - break; - case 33: - break; - case 34: - break; - case 35: - break; - case 37: - break; - case 38: - break; - case 40: - break; - case 41: - break; - case 39: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -s1ap_elem_procs_class_minus2_o::unsuccessful_outcome_c -s1ap_elem_procs_class_minus2_o::get_unsuccessful_outcome(const uint16_t& proc_code) -{ - unsuccessful_outcome_c ret{}; - switch (proc_code) { - case 2: - break; - case 8: - break; - case 10: - break; - case 11: - break; - case 12: - break; - case 13: - break; - case 15: - break; - case 16: - break; - case 18: - break; - case 19: - break; - case 20: - break; - case 22: - break; - case 24: - break; - case 25: - break; - case 26: - break; - case 27: - break; - case 28: - break; - case 42: - break; - case 31: - break; - case 32: - break; - case 33: - break; - case 34: - break; - case 35: - break; - case 37: - break; - case 38: - break; - case 40: - break; - case 41: - break; - case 39: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -crit_e s1ap_elem_procs_class_minus2_o::get_crit(const uint16_t& proc_code) -{ - switch (proc_code) { - case 2: - return crit_e::ignore; - case 8: - return crit_e::ignore; - case 10: - return crit_e::ignore; - case 11: - return crit_e::ignore; - case 12: - return crit_e::ignore; - case 13: - return crit_e::ignore; - case 15: - return crit_e::ignore; - case 16: - return crit_e::ignore; - case 18: - return crit_e::ignore; - case 19: - return crit_e::ignore; - case 20: - return crit_e::ignore; - case 22: - return crit_e::ignore; - case 24: - return crit_e::ignore; - case 25: - return crit_e::ignore; - case 26: - return crit_e::ignore; - case 27: - return crit_e::ignore; - case 28: - return crit_e::ignore; - case 42: - return crit_e::ignore; - case 31: - return crit_e::ignore; - case 32: - return crit_e::ignore; - case 33: - return crit_e::ignore; - case 34: - return crit_e::ignore; - case 35: - return crit_e::reject; - case 37: - return crit_e::ignore; - case 38: - return crit_e::ignore; - case 40: - return crit_e::ignore; - case 41: - return crit_e::ignore; - case 39: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return crit_e(); -} - -// InitiatingMessage ::= OPEN TYPE -ho_notify_s& s1ap_elem_procs_class_minus2_o::init_msg_c::ho_notify() -{ - assert_choice_type("HandoverNotify", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -erab_release_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::erab_release_ind() -{ - assert_choice_type("E-RABReleaseIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -paging_s& s1ap_elem_procs_class_minus2_o::init_msg_c::paging() -{ - assert_choice_type("Paging", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_nas_transport_s& s1ap_elem_procs_class_minus2_o::init_msg_c::dl_nas_transport() -{ - assert_choice_type("DownlinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -init_ue_msg_s& s1ap_elem_procs_class_minus2_o::init_msg_c::init_ue_msg() -{ - assert_choice_type("InitialUEMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_nas_transport_s& s1ap_elem_procs_class_minus2_o::init_msg_c::ul_nas_transport() -{ - assert_choice_type("UplinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -error_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::error_ind() -{ - assert_choice_type("ErrorIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -nas_non_delivery_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::nas_non_delivery_ind() -{ - assert_choice_type("NASNonDeliveryIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_context_release_request_s& s1ap_elem_procs_class_minus2_o::init_msg_c::ue_context_release_request() -{ - assert_choice_type("UEContextReleaseRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_s1cdma2000tunnelling_s& s1ap_elem_procs_class_minus2_o::init_msg_c::dl_s1cdma2000tunnelling() -{ - assert_choice_type("DownlinkS1cdma2000tunnelling", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_s1cdma2000tunnelling_s& s1ap_elem_procs_class_minus2_o::init_msg_c::ul_s1cdma2000tunnelling() -{ - assert_choice_type("UplinkS1cdma2000tunnelling", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_cap_info_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::ue_cap_info_ind() -{ - assert_choice_type("UECapabilityInfoIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -enb_status_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::enb_status_transfer() -{ - assert_choice_type("ENBStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -mme_status_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::mme_status_transfer() -{ - assert_choice_type("MMEStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -deactiv_trace_s& s1ap_elem_procs_class_minus2_o::init_msg_c::deactiv_trace() -{ - assert_choice_type("DeactivateTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -trace_start_s& s1ap_elem_procs_class_minus2_o::init_msg_c::trace_start() -{ - assert_choice_type("TraceStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -trace_fail_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::trace_fail_ind() -{ - assert_choice_type("TraceFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -cell_traffic_trace_s& s1ap_elem_procs_class_minus2_o::init_msg_c::cell_traffic_trace() -{ - assert_choice_type("CellTrafficTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_ctrl_s& s1ap_elem_procs_class_minus2_o::init_msg_c::location_report_ctrl() -{ - assert_choice_type("LocationReportingControl", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_fail_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::location_report_fail_ind() -{ - assert_choice_type("LocationReportingFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_s& s1ap_elem_procs_class_minus2_o::init_msg_c::location_report() -{ - assert_choice_type("LocationReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -overload_start_s& s1ap_elem_procs_class_minus2_o::init_msg_c::overload_start() -{ - assert_choice_type("OverloadStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -overload_stop_s& s1ap_elem_procs_class_minus2_o::init_msg_c::overload_stop() -{ - assert_choice_type("OverloadStop", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -enb_direct_info_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::enb_direct_info_transfer() -{ - assert_choice_type("ENBDirectInformationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -mme_direct_info_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::mme_direct_info_transfer() -{ - assert_choice_type("MMEDirectInformationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -enb_cfg_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::enb_cfg_transfer() -{ - assert_choice_type("ENBConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -mme_cfg_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::mme_cfg_transfer() -{ - assert_choice_type("MMEConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -private_msg_s& s1ap_elem_procs_class_minus2_o::init_msg_c::private_msg() -{ - assert_choice_type("PrivateMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ho_notify_s& s1ap_elem_procs_class_minus2_o::init_msg_c::ho_notify() const -{ - assert_choice_type("HandoverNotify", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const erab_release_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::erab_release_ind() const -{ - assert_choice_type("E-RABReleaseIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const paging_s& s1ap_elem_procs_class_minus2_o::init_msg_c::paging() const -{ - assert_choice_type("Paging", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_nas_transport_s& s1ap_elem_procs_class_minus2_o::init_msg_c::dl_nas_transport() const -{ - assert_choice_type("DownlinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const init_ue_msg_s& s1ap_elem_procs_class_minus2_o::init_msg_c::init_ue_msg() const -{ - assert_choice_type("InitialUEMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_nas_transport_s& s1ap_elem_procs_class_minus2_o::init_msg_c::ul_nas_transport() const -{ - assert_choice_type("UplinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const error_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::error_ind() const -{ - assert_choice_type("ErrorIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const nas_non_delivery_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::nas_non_delivery_ind() const -{ - assert_choice_type("NASNonDeliveryIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ue_context_release_request_s& s1ap_elem_procs_class_minus2_o::init_msg_c::ue_context_release_request() const -{ - assert_choice_type("UEContextReleaseRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const dl_s1cdma2000tunnelling_s& s1ap_elem_procs_class_minus2_o::init_msg_c::dl_s1cdma2000tunnelling() const -{ - assert_choice_type("DownlinkS1cdma2000tunnelling", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ul_s1cdma2000tunnelling_s& s1ap_elem_procs_class_minus2_o::init_msg_c::ul_s1cdma2000tunnelling() const -{ - assert_choice_type("UplinkS1cdma2000tunnelling", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ue_cap_info_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::ue_cap_info_ind() const -{ - assert_choice_type("UECapabilityInfoIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const enb_status_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::enb_status_transfer() const -{ - assert_choice_type("ENBStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const mme_status_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::mme_status_transfer() const -{ - assert_choice_type("MMEStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const deactiv_trace_s& s1ap_elem_procs_class_minus2_o::init_msg_c::deactiv_trace() const -{ - assert_choice_type("DeactivateTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const trace_start_s& s1ap_elem_procs_class_minus2_o::init_msg_c::trace_start() const -{ - assert_choice_type("TraceStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const trace_fail_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::trace_fail_ind() const -{ - assert_choice_type("TraceFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const cell_traffic_trace_s& s1ap_elem_procs_class_minus2_o::init_msg_c::cell_traffic_trace() const -{ - assert_choice_type("CellTrafficTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const location_report_ctrl_s& s1ap_elem_procs_class_minus2_o::init_msg_c::location_report_ctrl() const -{ - assert_choice_type("LocationReportingControl", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const location_report_fail_ind_s& s1ap_elem_procs_class_minus2_o::init_msg_c::location_report_fail_ind() const -{ - assert_choice_type("LocationReportingFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const location_report_s& s1ap_elem_procs_class_minus2_o::init_msg_c::location_report() const -{ - assert_choice_type("LocationReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const overload_start_s& s1ap_elem_procs_class_minus2_o::init_msg_c::overload_start() const -{ - assert_choice_type("OverloadStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const overload_stop_s& s1ap_elem_procs_class_minus2_o::init_msg_c::overload_stop() const -{ - assert_choice_type("OverloadStop", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const enb_direct_info_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::enb_direct_info_transfer() const -{ - assert_choice_type("ENBDirectInformationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const mme_direct_info_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::mme_direct_info_transfer() const -{ - assert_choice_type("MMEDirectInformationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const enb_cfg_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::enb_cfg_transfer() const -{ - assert_choice_type("ENBConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const mme_cfg_transfer_s& s1ap_elem_procs_class_minus2_o::init_msg_c::mme_cfg_transfer() const -{ - assert_choice_type("MMEConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const private_msg_s& s1ap_elem_procs_class_minus2_o::init_msg_c::private_msg() const -{ - assert_choice_type("PrivateMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -void s1ap_elem_procs_class_minus2_o::init_msg_c::destroy_() -{ - switch (type_) { - case types::ho_notify: - c.destroy(); - break; - case types::erab_release_ind: - c.destroy(); - break; - case types::paging: - c.destroy(); - break; - case types::dl_nas_transport: - c.destroy(); - break; - case types::init_ue_msg: - c.destroy(); - break; - case types::ul_nas_transport: - c.destroy(); - break; - case types::error_ind: - c.destroy(); - break; - case types::nas_non_delivery_ind: - c.destroy(); - break; - case types::ue_context_release_request: - c.destroy(); - break; - case types::dl_s1cdma2000tunnelling: - c.destroy(); - break; - case types::ul_s1cdma2000tunnelling: - c.destroy(); - break; - case types::ue_cap_info_ind: - c.destroy(); - break; - case types::enb_status_transfer: - c.destroy(); - break; - case types::mme_status_transfer: - c.destroy(); - break; - case types::deactiv_trace: - c.destroy(); - break; - case types::trace_start: - c.destroy(); - break; - case types::trace_fail_ind: - c.destroy(); - break; - case types::cell_traffic_trace: - c.destroy(); - break; - case types::location_report_ctrl: - c.destroy(); - break; - case types::location_report_fail_ind: - c.destroy(); - break; - case types::location_report: - c.destroy(); - break; - case types::overload_start: - c.destroy(); - break; - case types::overload_stop: - c.destroy(); - break; - case types::enb_direct_info_transfer: - c.destroy(); - break; - case types::mme_direct_info_transfer: - c.destroy(); - break; - case types::enb_cfg_transfer: - c.destroy(); - break; - case types::mme_cfg_transfer: - c.destroy(); - break; - case types::private_msg: - c.destroy(); - break; - default: - break; - } -} -void s1ap_elem_procs_class_minus2_o::init_msg_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::ho_notify: - c.init(); - break; - case types::erab_release_ind: - c.init(); - break; - case types::paging: - c.init(); - break; - case types::dl_nas_transport: - c.init(); - break; - case types::init_ue_msg: - c.init(); - break; - case types::ul_nas_transport: - c.init(); - break; - case types::error_ind: - c.init(); - break; - case types::nas_non_delivery_ind: - c.init(); - break; - case types::ue_context_release_request: - c.init(); - break; - case types::dl_s1cdma2000tunnelling: - c.init(); - break; - case types::ul_s1cdma2000tunnelling: - c.init(); - break; - case types::ue_cap_info_ind: - c.init(); - break; - case types::enb_status_transfer: - c.init(); - break; - case types::mme_status_transfer: - c.init(); - break; - case types::deactiv_trace: - c.init(); - break; - case types::trace_start: - c.init(); - break; - case types::trace_fail_ind: - c.init(); - break; - case types::cell_traffic_trace: - c.init(); - break; - case types::location_report_ctrl: - c.init(); - break; - case types::location_report_fail_ind: - c.init(); - break; - case types::location_report: - c.init(); - break; - case types::overload_start: - c.init(); - break; - case types::overload_stop: - c.init(); - break; - case types::enb_direct_info_transfer: - c.init(); - break; - case types::mme_direct_info_transfer: - c.init(); - break; - case types::enb_cfg_transfer: - c.init(); - break; - case types::mme_cfg_transfer: - c.init(); - break; - case types::private_msg: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus2_o::init_msg_c"); - } -} -s1ap_elem_procs_class_minus2_o::init_msg_c::init_msg_c(const s1ap_elem_procs_class_minus2_o::init_msg_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::ho_notify: - c.init(other.c.get()); - break; - case types::erab_release_ind: - c.init(other.c.get()); - break; - case types::paging: - c.init(other.c.get()); - break; - case types::dl_nas_transport: - c.init(other.c.get()); - break; - case types::init_ue_msg: - c.init(other.c.get()); - break; - case types::ul_nas_transport: - c.init(other.c.get()); - break; - case types::error_ind: - c.init(other.c.get()); - break; - case types::nas_non_delivery_ind: - c.init(other.c.get()); - break; - case types::ue_context_release_request: - c.init(other.c.get()); - break; - case types::dl_s1cdma2000tunnelling: - c.init(other.c.get()); - break; - case types::ul_s1cdma2000tunnelling: - c.init(other.c.get()); - break; - case types::ue_cap_info_ind: - c.init(other.c.get()); - break; - case types::enb_status_transfer: - c.init(other.c.get()); - break; - case types::mme_status_transfer: - c.init(other.c.get()); - break; - case types::deactiv_trace: - c.init(other.c.get()); - break; - case types::trace_start: - c.init(other.c.get()); - break; - case types::trace_fail_ind: - c.init(other.c.get()); - break; - case types::cell_traffic_trace: - c.init(other.c.get()); - break; - case types::location_report_ctrl: - c.init(other.c.get()); - break; - case types::location_report_fail_ind: - c.init(other.c.get()); - break; - case types::location_report: - c.init(other.c.get()); - break; - case types::overload_start: - c.init(other.c.get()); - break; - case types::overload_stop: - c.init(other.c.get()); - break; - case types::enb_direct_info_transfer: - c.init(other.c.get()); - break; - case types::mme_direct_info_transfer: - c.init(other.c.get()); - break; - case types::enb_cfg_transfer: - c.init(other.c.get()); - break; - case types::mme_cfg_transfer: - c.init(other.c.get()); - break; - case types::private_msg: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus2_o::init_msg_c"); - } -} -s1ap_elem_procs_class_minus2_o::init_msg_c& s1ap_elem_procs_class_minus2_o::init_msg_c:: - operator=(const s1ap_elem_procs_class_minus2_o::init_msg_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ho_notify: - c.set(other.c.get()); - break; - case types::erab_release_ind: - c.set(other.c.get()); - break; - case types::paging: - c.set(other.c.get()); - break; - case types::dl_nas_transport: - c.set(other.c.get()); - break; - case types::init_ue_msg: - c.set(other.c.get()); - break; - case types::ul_nas_transport: - c.set(other.c.get()); - break; - case types::error_ind: - c.set(other.c.get()); - break; - case types::nas_non_delivery_ind: - c.set(other.c.get()); - break; - case types::ue_context_release_request: - c.set(other.c.get()); - break; - case types::dl_s1cdma2000tunnelling: - c.set(other.c.get()); - break; - case types::ul_s1cdma2000tunnelling: - c.set(other.c.get()); - break; - case types::ue_cap_info_ind: - c.set(other.c.get()); - break; - case types::enb_status_transfer: - c.set(other.c.get()); - break; - case types::mme_status_transfer: - c.set(other.c.get()); - break; - case types::deactiv_trace: - c.set(other.c.get()); - break; - case types::trace_start: - c.set(other.c.get()); - break; - case types::trace_fail_ind: - c.set(other.c.get()); - break; - case types::cell_traffic_trace: - c.set(other.c.get()); - break; - case types::location_report_ctrl: - c.set(other.c.get()); - break; - case types::location_report_fail_ind: - c.set(other.c.get()); - break; - case types::location_report: - c.set(other.c.get()); - break; - case types::overload_start: - c.set(other.c.get()); - break; - case types::overload_stop: - c.set(other.c.get()); - break; - case types::enb_direct_info_transfer: - c.set(other.c.get()); - break; - case types::mme_direct_info_transfer: - c.set(other.c.get()); - break; - case types::enb_cfg_transfer: - c.set(other.c.get()); - break; - case types::mme_cfg_transfer: - c.set(other.c.get()); - break; - case types::private_msg: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus2_o::init_msg_c"); - } - - return *this; -} -void s1ap_elem_procs_class_minus2_o::init_msg_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ho_notify: - j.write_fieldname("HandoverNotify"); - c.get().to_json(j); - break; - case types::erab_release_ind: - j.write_fieldname("E-RABReleaseIndication"); - c.get().to_json(j); - break; - case types::paging: - j.write_fieldname("Paging"); - c.get().to_json(j); - break; - case types::dl_nas_transport: - j.write_fieldname("DownlinkNASTransport"); - c.get().to_json(j); - break; - case types::init_ue_msg: - j.write_fieldname("InitialUEMessage"); - c.get().to_json(j); - break; - case types::ul_nas_transport: - j.write_fieldname("UplinkNASTransport"); - c.get().to_json(j); - break; - case types::error_ind: - j.write_fieldname("ErrorIndication"); - c.get().to_json(j); - break; - case types::nas_non_delivery_ind: - j.write_fieldname("NASNonDeliveryIndication"); - c.get().to_json(j); - break; - case types::ue_context_release_request: - j.write_fieldname("UEContextReleaseRequest"); - c.get().to_json(j); - break; - case types::dl_s1cdma2000tunnelling: - j.write_fieldname("DownlinkS1cdma2000tunnelling"); - c.get().to_json(j); - break; - case types::ul_s1cdma2000tunnelling: - j.write_fieldname("UplinkS1cdma2000tunnelling"); - c.get().to_json(j); - break; - case types::ue_cap_info_ind: - j.write_fieldname("UECapabilityInfoIndication"); - c.get().to_json(j); - break; - case types::enb_status_transfer: - j.write_fieldname("ENBStatusTransfer"); - c.get().to_json(j); - break; - case types::mme_status_transfer: - j.write_fieldname("MMEStatusTransfer"); - c.get().to_json(j); - break; - case types::deactiv_trace: - j.write_fieldname("DeactivateTrace"); - c.get().to_json(j); - break; - case types::trace_start: - j.write_fieldname("TraceStart"); - c.get().to_json(j); - break; - case types::trace_fail_ind: - j.write_fieldname("TraceFailureIndication"); - c.get().to_json(j); - break; - case types::cell_traffic_trace: - j.write_fieldname("CellTrafficTrace"); - c.get().to_json(j); - break; - case types::location_report_ctrl: - j.write_fieldname("LocationReportingControl"); - c.get().to_json(j); - break; - case types::location_report_fail_ind: - j.write_fieldname("LocationReportingFailureIndication"); - c.get().to_json(j); - break; - case types::location_report: - j.write_fieldname("LocationReport"); - c.get().to_json(j); - break; - case types::overload_start: - j.write_fieldname("OverloadStart"); - c.get().to_json(j); - break; - case types::overload_stop: - j.write_fieldname("OverloadStop"); - c.get().to_json(j); - break; - case types::enb_direct_info_transfer: - j.write_fieldname("ENBDirectInformationTransfer"); - c.get().to_json(j); - break; - case types::mme_direct_info_transfer: - j.write_fieldname("MMEDirectInformationTransfer"); - c.get().to_json(j); - break; - case types::enb_cfg_transfer: - j.write_fieldname("ENBConfigurationTransfer"); - c.get().to_json(j); - break; - case types::mme_cfg_transfer: - j.write_fieldname("MMEConfigurationTransfer"); - c.get().to_json(j); - break; - case types::private_msg: - j.write_fieldname("PrivateMessage"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus2_o::init_msg_c"); - } - j.end_obj(); -} -SRSASN_CODE s1ap_elem_procs_class_minus2_o::init_msg_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - switch (type_) { - case types::ho_notify: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::erab_release_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::paging: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_nas_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::init_ue_msg: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_nas_transport: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::error_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::nas_non_delivery_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_context_release_request: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl_s1cdma2000tunnelling: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_s1cdma2000tunnelling: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ue_cap_info_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::enb_status_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::mme_status_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::deactiv_trace: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::trace_start: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::trace_fail_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::cell_traffic_trace: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::location_report_ctrl: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::location_report_fail_ind: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::location_report: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::overload_start: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::overload_stop: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::enb_direct_info_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::mme_direct_info_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::enb_cfg_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::mme_cfg_transfer: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::private_msg: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus2_o::init_msg_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE s1ap_elem_procs_class_minus2_o::init_msg_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - switch (type_) { - case types::ho_notify: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::erab_release_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::paging: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_nas_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::init_ue_msg: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_nas_transport: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::error_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::nas_non_delivery_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_release_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl_s1cdma2000tunnelling: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_s1cdma2000tunnelling: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_cap_info_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::enb_status_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::mme_status_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::deactiv_trace: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::trace_start: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::trace_fail_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::cell_traffic_trace: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::location_report_ctrl: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::location_report_fail_ind: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::location_report: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::overload_start: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::overload_stop: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::enb_direct_info_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::mme_direct_info_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::enb_cfg_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::mme_cfg_transfer: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::private_msg: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "s1ap_elem_procs_class_minus2_o::init_msg_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} - -std::string s1ap_elem_procs_class_minus2_o::init_msg_c::types_opts::to_string() const -{ - static constexpr const char* options[] = {"HandoverNotify", - "E-RABReleaseIndication", - "Paging", - "DownlinkNASTransport", - "InitialUEMessage", - "UplinkNASTransport", - "ErrorIndication", - "NASNonDeliveryIndication", - "UEContextReleaseRequest", - "DownlinkS1cdma2000tunnelling", - "UplinkS1cdma2000tunnelling", - "UECapabilityInfoIndication", - "ENBStatusTransfer", - "MMEStatusTransfer", - "DeactivateTrace", - "TraceStart", - "TraceFailureIndication", - "CellTrafficTrace", - "LocationReportingControl", - "LocationReportingFailureIndication", - "LocationReport", - "OverloadStart", - "OverloadStop", - "ENBDirectInformationTransfer", - "MMEDirectInformationTransfer", - "ENBConfigurationTransfer", - "MMEConfigurationTransfer", - "PrivateMessage"}; - return convert_enum_idx(options, 28, value, "s1ap_elem_procs_class_minus2_o::init_msg_c::types"); -} - -// SuccessfulOutcome ::= OPEN TYPE -void s1ap_elem_procs_class_minus2_o::successful_outcome_c::set(types::options e) -{ - type_ = e; -} -void s1ap_elem_procs_class_minus2_o::successful_outcome_c::to_json(json_writer& j) const -{ - j.start_obj(); - j.end_obj(); -} -SRSASN_CODE s1ap_elem_procs_class_minus2_o::successful_outcome_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - return SRSASN_SUCCESS; -} -SRSASN_CODE s1ap_elem_procs_class_minus2_o::successful_outcome_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - return SRSASN_SUCCESS; -} - -std::string s1ap_elem_procs_class_minus2_o::successful_outcome_c::types_opts::to_string() const -{ - static constexpr const char* options[] = { - "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", - "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL"}; - return convert_enum_idx(options, 28, value, "s1ap_elem_procs_class_minus2_o::successful_outcome_c::types"); -} - -// UnsuccessfulOutcome ::= OPEN TYPE -void s1ap_elem_procs_class_minus2_o::unsuccessful_outcome_c::set(types::options e) -{ - type_ = e; -} -void s1ap_elem_procs_class_minus2_o::unsuccessful_outcome_c::to_json(json_writer& j) const -{ - j.start_obj(); - j.end_obj(); -} -SRSASN_CODE s1ap_elem_procs_class_minus2_o::unsuccessful_outcome_c::pack(bit_ref& bref) const -{ - varlength_field_pack_guard varlen_scope(bref, true); - return SRSASN_SUCCESS; -} -SRSASN_CODE s1ap_elem_procs_class_minus2_o::unsuccessful_outcome_c::unpack(cbit_ref& bref) -{ - varlength_field_unpack_guard varlen_scope(bref, true); - return SRSASN_SUCCESS; -} - -std::string s1ap_elem_procs_class_minus2_o::unsuccessful_outcome_c::types_opts::to_string() const -{ - static constexpr const char* options[] = { - "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", - "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL"}; - return convert_enum_idx(options, 28, value, "s1ap_elem_procs_class_minus2_o::unsuccessful_outcome_c::types"); -} - -// S1AP-ELEMENTARY-PROCEDURES ::= OBJECT SET OF S1AP-ELEMENTARY-PROCEDURE -uint16_t s1ap_elem_procs_o::idx_to_proc_code(uint32_t idx) -{ - static constexpr const uint16_t options[] = {0, 1, 3, 5, 6, 7, 9, 4, 43, 14, 17, 21, 23, 29, 30, - 36, 2, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 22, 24, 25, - 26, 27, 28, 42, 31, 32, 33, 34, 35, 37, 38, 40, 41, 39}; - return convert_enum_idx(options, 44, idx, "proc_code"); -} -bool s1ap_elem_procs_o::is_proc_code_valid(const uint16_t& proc_code) -{ - static constexpr const uint16_t options[] = {0, 1, 3, 5, 6, 7, 9, 4, 43, 14, 17, 21, 23, 29, 30, - 36, 2, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 22, 24, 25, - 26, 27, 28, 42, 31, 32, 33, 34, 35, 37, 38, 40, 41, 39}; - for (uint32_t i = 0; i < 44; ++i) { - if (options[i] == proc_code) { - return true; - } - } - return false; -} -s1ap_elem_procs_o::init_msg_c s1ap_elem_procs_o::get_init_msg(const uint16_t& proc_code) -{ - init_msg_c ret{}; - switch (proc_code) { - case 0: - ret.set(init_msg_c::types::ho_required); - break; - case 1: - ret.set(init_msg_c::types::ho_request); - break; - case 3: - ret.set(init_msg_c::types::path_switch_request); - break; - case 5: - ret.set(init_msg_c::types::erab_setup_request); - break; - case 6: - ret.set(init_msg_c::types::erab_modify_request); - break; - case 7: - ret.set(init_msg_c::types::erab_release_cmd); - break; - case 9: - ret.set(init_msg_c::types::init_context_setup_request); - break; - case 4: - ret.set(init_msg_c::types::ho_cancel); - break; - case 43: - ret.set(init_msg_c::types::kill_request); - break; - case 14: - ret.set(init_msg_c::types::reset); - break; - case 17: - ret.set(init_msg_c::types::s1_setup_request); - break; - case 21: - ret.set(init_msg_c::types::ue_context_mod_request); - break; - case 23: - ret.set(init_msg_c::types::ue_context_release_cmd); - break; - case 29: - ret.set(init_msg_c::types::enb_cfg_upd); - break; - case 30: - ret.set(init_msg_c::types::mme_cfg_upd); - break; - case 36: - ret.set(init_msg_c::types::write_replace_warning_request); - break; - case 2: - ret.set(init_msg_c::types::ho_notify); - break; - case 8: - ret.set(init_msg_c::types::erab_release_ind); - break; - case 10: - ret.set(init_msg_c::types::paging); - break; - case 11: - ret.set(init_msg_c::types::dl_nas_transport); - break; - case 12: - ret.set(init_msg_c::types::init_ue_msg); - break; - case 13: - ret.set(init_msg_c::types::ul_nas_transport); - break; - case 15: - ret.set(init_msg_c::types::error_ind); - break; - case 16: - ret.set(init_msg_c::types::nas_non_delivery_ind); - break; - case 18: - ret.set(init_msg_c::types::ue_context_release_request); - break; - case 19: - ret.set(init_msg_c::types::dl_s1cdma2000tunnelling); - break; - case 20: - ret.set(init_msg_c::types::ul_s1cdma2000tunnelling); - break; - case 22: - ret.set(init_msg_c::types::ue_cap_info_ind); - break; - case 24: - ret.set(init_msg_c::types::enb_status_transfer); - break; - case 25: - ret.set(init_msg_c::types::mme_status_transfer); - break; - case 26: - ret.set(init_msg_c::types::deactiv_trace); - break; - case 27: - ret.set(init_msg_c::types::trace_start); - break; - case 28: - ret.set(init_msg_c::types::trace_fail_ind); - break; - case 42: - ret.set(init_msg_c::types::cell_traffic_trace); - break; - case 31: - ret.set(init_msg_c::types::location_report_ctrl); - break; - case 32: - ret.set(init_msg_c::types::location_report_fail_ind); - break; - case 33: - ret.set(init_msg_c::types::location_report); - break; - case 34: - ret.set(init_msg_c::types::overload_start); - break; - case 35: - ret.set(init_msg_c::types::overload_stop); - break; - case 37: - ret.set(init_msg_c::types::enb_direct_info_transfer); - break; - case 38: - ret.set(init_msg_c::types::mme_direct_info_transfer); - break; - case 40: - ret.set(init_msg_c::types::enb_cfg_transfer); - break; - case 41: - ret.set(init_msg_c::types::mme_cfg_transfer); - break; - case 39: - ret.set(init_msg_c::types::private_msg); - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -s1ap_elem_procs_o::successful_outcome_c s1ap_elem_procs_o::get_successful_outcome(const uint16_t& proc_code) -{ - successful_outcome_c ret{}; - switch (proc_code) { - case 0: - ret.set(successful_outcome_c::types::ho_required); - break; - case 1: - ret.set(successful_outcome_c::types::ho_request); - break; - case 3: - ret.set(successful_outcome_c::types::path_switch_request); - break; - case 5: - ret.set(successful_outcome_c::types::erab_setup_request); - break; - case 6: - ret.set(successful_outcome_c::types::erab_modify_request); - break; - case 7: - ret.set(successful_outcome_c::types::erab_release_cmd); - break; - case 9: - ret.set(successful_outcome_c::types::init_context_setup_request); - break; - case 4: - ret.set(successful_outcome_c::types::ho_cancel); - break; - case 43: - ret.set(successful_outcome_c::types::kill_request); - break; - case 14: - ret.set(successful_outcome_c::types::reset); - break; - case 17: - ret.set(successful_outcome_c::types::s1_setup_request); - break; - case 21: - ret.set(successful_outcome_c::types::ue_context_mod_request); - break; - case 23: - ret.set(successful_outcome_c::types::ue_context_release_cmd); - break; - case 29: - ret.set(successful_outcome_c::types::enb_cfg_upd); - break; - case 30: - ret.set(successful_outcome_c::types::mme_cfg_upd); - break; - case 36: - ret.set(successful_outcome_c::types::write_replace_warning_request); - break; - case 2: - break; - case 8: - break; - case 10: - break; - case 11: - break; - case 12: - break; - case 13: - break; - case 15: - break; - case 16: - break; - case 18: - break; - case 19: - break; - case 20: - break; - case 22: - break; - case 24: - break; - case 25: - break; - case 26: - break; - case 27: - break; - case 28: - break; - case 42: - break; - case 31: - break; - case 32: - break; - case 33: - break; - case 34: - break; - case 35: - break; - case 37: - break; - case 38: - break; - case 40: - break; - case 41: - break; - case 39: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -s1ap_elem_procs_o::unsuccessful_outcome_c s1ap_elem_procs_o::get_unsuccessful_outcome(const uint16_t& proc_code) -{ - unsuccessful_outcome_c ret{}; - switch (proc_code) { - case 0: - ret.set(unsuccessful_outcome_c::types::ho_required); - break; - case 1: - ret.set(unsuccessful_outcome_c::types::ho_request); - break; - case 3: - ret.set(unsuccessful_outcome_c::types::path_switch_request); - break; - case 5: - break; - case 6: - break; - case 7: - break; - case 9: - ret.set(unsuccessful_outcome_c::types::init_context_setup_request); - break; - case 4: - break; - case 43: - break; - case 14: - break; - case 17: - ret.set(unsuccessful_outcome_c::types::s1_setup_request); - break; - case 21: - ret.set(unsuccessful_outcome_c::types::ue_context_mod_request); - break; - case 23: - break; - case 29: - ret.set(unsuccessful_outcome_c::types::enb_cfg_upd); - break; - case 30: - ret.set(unsuccessful_outcome_c::types::mme_cfg_upd); - break; - case 36: - break; - case 2: - break; - case 8: - break; - case 10: - break; - case 11: - break; - case 12: - break; - case 13: - break; - case 15: - break; - case 16: - break; - case 18: - break; - case 19: - break; - case 20: - break; - case 22: - break; - case 24: - break; - case 25: - break; - case 26: - break; - case 27: - break; - case 28: - break; - case 42: - break; - case 31: - break; - case 32: - break; - case 33: - break; - case 34: - break; - case 35: - break; - case 37: - break; - case 38: - break; - case 40: - break; - case 41: - break; - case 39: - break; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return ret; -} -crit_e s1ap_elem_procs_o::get_crit(const uint16_t& proc_code) -{ - switch (proc_code) { - case 0: - return crit_e::reject; - case 1: - return crit_e::reject; - case 3: - return crit_e::reject; - case 5: - return crit_e::reject; - case 6: - return crit_e::reject; - case 7: - return crit_e::reject; - case 9: - return crit_e::reject; - case 4: - return crit_e::reject; - case 43: - return crit_e::reject; - case 14: - return crit_e::reject; - case 17: - return crit_e::reject; - case 21: - return crit_e::reject; - case 23: - return crit_e::reject; - case 29: - return crit_e::reject; - case 30: - return crit_e::reject; - case 36: - return crit_e::reject; - case 2: - return crit_e::ignore; - case 8: - return crit_e::ignore; - case 10: - return crit_e::ignore; - case 11: - return crit_e::ignore; - case 12: - return crit_e::ignore; - case 13: - return crit_e::ignore; - case 15: - return crit_e::ignore; - case 16: - return crit_e::ignore; - case 18: - return crit_e::ignore; - case 19: - return crit_e::ignore; - case 20: - return crit_e::ignore; - case 22: - return crit_e::ignore; - case 24: - return crit_e::ignore; - case 25: - return crit_e::ignore; - case 26: - return crit_e::ignore; - case 27: - return crit_e::ignore; - case 28: - return crit_e::ignore; - case 42: - return crit_e::ignore; - case 31: - return crit_e::ignore; - case 32: - return crit_e::ignore; - case 33: - return crit_e::ignore; - case 34: - return crit_e::ignore; - case 35: - return crit_e::reject; - case 37: - return crit_e::ignore; - case 38: - return crit_e::ignore; - case 40: - return crit_e::ignore; - case 41: - return crit_e::ignore; - case 39: - return crit_e::ignore; - default: - s1ap_log_print(LOG_LEVEL_ERROR, "The proc_code=%d is not recognized", proc_code); - } - return crit_e(); -} - -// InitiatingMessage ::= OPEN TYPE -ho_required_s& s1ap_elem_procs_o::init_msg_c::ho_required() -{ - assert_choice_type("HandoverRequired", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ho_request_s& s1ap_elem_procs_o::init_msg_c::ho_request() -{ - assert_choice_type("HandoverRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -path_switch_request_s& s1ap_elem_procs_o::init_msg_c::path_switch_request() -{ - assert_choice_type("PathSwitchRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -erab_setup_request_s& s1ap_elem_procs_o::init_msg_c::erab_setup_request() -{ - assert_choice_type("E-RABSetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -erab_modify_request_s& s1ap_elem_procs_o::init_msg_c::erab_modify_request() -{ - assert_choice_type("E-RABModifyRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -erab_release_cmd_s& s1ap_elem_procs_o::init_msg_c::erab_release_cmd() -{ - assert_choice_type("E-RABReleaseCommand", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -init_context_setup_request_s& s1ap_elem_procs_o::init_msg_c::init_context_setup_request() -{ - assert_choice_type("InitialContextSetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ho_cancel_s& s1ap_elem_procs_o::init_msg_c::ho_cancel() -{ - assert_choice_type("HandoverCancel", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -kill_request_s& s1ap_elem_procs_o::init_msg_c::kill_request() -{ - assert_choice_type("KillRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -reset_s& s1ap_elem_procs_o::init_msg_c::reset() -{ - assert_choice_type("Reset", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -s1_setup_request_s& s1ap_elem_procs_o::init_msg_c::s1_setup_request() -{ - assert_choice_type("S1SetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_context_mod_request_s& s1ap_elem_procs_o::init_msg_c::ue_context_mod_request() -{ - assert_choice_type("UEContextModificationRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_context_release_cmd_s& s1ap_elem_procs_o::init_msg_c::ue_context_release_cmd() -{ - assert_choice_type("UEContextReleaseCommand", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -enb_cfg_upd_s& s1ap_elem_procs_o::init_msg_c::enb_cfg_upd() -{ - assert_choice_type("ENBConfigurationUpdate", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -mme_cfg_upd_s& s1ap_elem_procs_o::init_msg_c::mme_cfg_upd() -{ - assert_choice_type("MMEConfigurationUpdate", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -write_replace_warning_request_s& s1ap_elem_procs_o::init_msg_c::write_replace_warning_request() -{ - assert_choice_type("WriteReplaceWarningRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ho_notify_s& s1ap_elem_procs_o::init_msg_c::ho_notify() -{ - assert_choice_type("HandoverNotify", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -erab_release_ind_s& s1ap_elem_procs_o::init_msg_c::erab_release_ind() -{ - assert_choice_type("E-RABReleaseIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -paging_s& s1ap_elem_procs_o::init_msg_c::paging() -{ - assert_choice_type("Paging", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_nas_transport_s& s1ap_elem_procs_o::init_msg_c::dl_nas_transport() -{ - assert_choice_type("DownlinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -init_ue_msg_s& s1ap_elem_procs_o::init_msg_c::init_ue_msg() -{ - assert_choice_type("InitialUEMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_nas_transport_s& s1ap_elem_procs_o::init_msg_c::ul_nas_transport() -{ - assert_choice_type("UplinkNASTransport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -error_ind_s& s1ap_elem_procs_o::init_msg_c::error_ind() -{ - assert_choice_type("ErrorIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -nas_non_delivery_ind_s& s1ap_elem_procs_o::init_msg_c::nas_non_delivery_ind() -{ - assert_choice_type("NASNonDeliveryIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_context_release_request_s& s1ap_elem_procs_o::init_msg_c::ue_context_release_request() -{ - assert_choice_type("UEContextReleaseRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -dl_s1cdma2000tunnelling_s& s1ap_elem_procs_o::init_msg_c::dl_s1cdma2000tunnelling() -{ - assert_choice_type("DownlinkS1cdma2000tunnelling", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ul_s1cdma2000tunnelling_s& s1ap_elem_procs_o::init_msg_c::ul_s1cdma2000tunnelling() -{ - assert_choice_type("UplinkS1cdma2000tunnelling", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -ue_cap_info_ind_s& s1ap_elem_procs_o::init_msg_c::ue_cap_info_ind() -{ - assert_choice_type("UECapabilityInfoIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -enb_status_transfer_s& s1ap_elem_procs_o::init_msg_c::enb_status_transfer() -{ - assert_choice_type("ENBStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -mme_status_transfer_s& s1ap_elem_procs_o::init_msg_c::mme_status_transfer() -{ - assert_choice_type("MMEStatusTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -deactiv_trace_s& s1ap_elem_procs_o::init_msg_c::deactiv_trace() -{ - assert_choice_type("DeactivateTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -trace_start_s& s1ap_elem_procs_o::init_msg_c::trace_start() -{ - assert_choice_type("TraceStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -trace_fail_ind_s& s1ap_elem_procs_o::init_msg_c::trace_fail_ind() -{ - assert_choice_type("TraceFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -cell_traffic_trace_s& s1ap_elem_procs_o::init_msg_c::cell_traffic_trace() -{ - assert_choice_type("CellTrafficTrace", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_ctrl_s& s1ap_elem_procs_o::init_msg_c::location_report_ctrl() -{ - assert_choice_type("LocationReportingControl", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_fail_ind_s& s1ap_elem_procs_o::init_msg_c::location_report_fail_ind() -{ - assert_choice_type("LocationReportingFailureIndication", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -location_report_s& s1ap_elem_procs_o::init_msg_c::location_report() -{ - assert_choice_type("LocationReport", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -overload_start_s& s1ap_elem_procs_o::init_msg_c::overload_start() -{ - assert_choice_type("OverloadStart", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -overload_stop_s& s1ap_elem_procs_o::init_msg_c::overload_stop() -{ - assert_choice_type("OverloadStop", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -enb_direct_info_transfer_s& s1ap_elem_procs_o::init_msg_c::enb_direct_info_transfer() -{ - assert_choice_type("ENBDirectInformationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -mme_direct_info_transfer_s& s1ap_elem_procs_o::init_msg_c::mme_direct_info_transfer() -{ - assert_choice_type("MMEDirectInformationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -enb_cfg_transfer_s& s1ap_elem_procs_o::init_msg_c::enb_cfg_transfer() -{ - assert_choice_type("ENBConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -mme_cfg_transfer_s& s1ap_elem_procs_o::init_msg_c::mme_cfg_transfer() -{ - assert_choice_type("MMEConfigurationTransfer", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -private_msg_s& s1ap_elem_procs_o::init_msg_c::private_msg() -{ - assert_choice_type("PrivateMessage", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ho_required_s& s1ap_elem_procs_o::init_msg_c::ho_required() const -{ - assert_choice_type("HandoverRequired", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ho_request_s& s1ap_elem_procs_o::init_msg_c::ho_request() const -{ - assert_choice_type("HandoverRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const path_switch_request_s& s1ap_elem_procs_o::init_msg_c::path_switch_request() const -{ - assert_choice_type("PathSwitchRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const erab_setup_request_s& s1ap_elem_procs_o::init_msg_c::erab_setup_request() const -{ - assert_choice_type("E-RABSetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const erab_modify_request_s& s1ap_elem_procs_o::init_msg_c::erab_modify_request() const -{ - assert_choice_type("E-RABModifyRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const erab_release_cmd_s& s1ap_elem_procs_o::init_msg_c::erab_release_cmd() const -{ - assert_choice_type("E-RABReleaseCommand", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const init_context_setup_request_s& s1ap_elem_procs_o::init_msg_c::init_context_setup_request() const -{ - assert_choice_type("InitialContextSetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ho_cancel_s& s1ap_elem_procs_o::init_msg_c::ho_cancel() const -{ - assert_choice_type("HandoverCancel", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const kill_request_s& s1ap_elem_procs_o::init_msg_c::kill_request() const -{ - assert_choice_type("KillRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const reset_s& s1ap_elem_procs_o::init_msg_c::reset() const -{ - assert_choice_type("Reset", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const s1_setup_request_s& s1ap_elem_procs_o::init_msg_c::s1_setup_request() const -{ - assert_choice_type("S1SetupRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ue_context_mod_request_s& s1ap_elem_procs_o::init_msg_c::ue_context_mod_request() const -{ - assert_choice_type("UEContextModificationRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ue_context_release_cmd_s& s1ap_elem_procs_o::init_msg_c::ue_context_release_cmd() const -{ - assert_choice_type("UEContextReleaseCommand", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const enb_cfg_upd_s& s1ap_elem_procs_o::init_msg_c::enb_cfg_upd() const -{ - assert_choice_type("ENBConfigurationUpdate", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const mme_cfg_upd_s& s1ap_elem_procs_o::init_msg_c::mme_cfg_upd() const -{ - assert_choice_type("MMEConfigurationUpdate", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const write_replace_warning_request_s& s1ap_elem_procs_o::init_msg_c::write_replace_warning_request() const -{ - assert_choice_type("WriteReplaceWarningRequest", type_.to_string(), "InitiatingMessage"); - return c.get(); -} -const ho_notify_s& s1ap_elem_procs_o::init_msg_c::ho_notify() const +const ho_notify_s& s1ap_elem_procs_o::init_msg_c::ho_notify() const { assert_choice_type("HandoverNotify", type_.to_string(), "InitiatingMessage"); return c.get(); @@ -61983,210 +58065,210 @@ SRSASN_CODE s1ap_elem_procs_o::init_msg_c::unpack(cbit_ref& bref) std::string s1ap_elem_procs_o::init_msg_c::types_opts::to_string() const { - static constexpr const char* options[] = {"HandoverRequired", - "HandoverRequest", - "PathSwitchRequest", - "E-RABSetupRequest", - "E-RABModifyRequest", - "E-RABReleaseCommand", - "InitialContextSetupRequest", - "HandoverCancel", - "KillRequest", - "Reset", - "S1SetupRequest", - "UEContextModificationRequest", - "UEContextReleaseCommand", - "ENBConfigurationUpdate", - "MMEConfigurationUpdate", - "WriteReplaceWarningRequest", - "HandoverNotify", - "E-RABReleaseIndication", - "Paging", - "DownlinkNASTransport", - "InitialUEMessage", - "UplinkNASTransport", - "ErrorIndication", - "NASNonDeliveryIndication", - "UEContextReleaseRequest", - "DownlinkS1cdma2000tunnelling", - "UplinkS1cdma2000tunnelling", - "UECapabilityInfoIndication", - "ENBStatusTransfer", - "MMEStatusTransfer", - "DeactivateTrace", - "TraceStart", - "TraceFailureIndication", - "CellTrafficTrace", - "LocationReportingControl", - "LocationReportingFailureIndication", - "LocationReport", - "OverloadStart", - "OverloadStop", - "ENBDirectInformationTransfer", - "MMEDirectInformationTransfer", - "ENBConfigurationTransfer", - "MMEConfigurationTransfer", - "PrivateMessage"}; + static const char* options[] = {"HandoverRequired", + "HandoverRequest", + "PathSwitchRequest", + "E-RABSetupRequest", + "E-RABModifyRequest", + "E-RABReleaseCommand", + "InitialContextSetupRequest", + "HandoverCancel", + "KillRequest", + "Reset", + "S1SetupRequest", + "UEContextModificationRequest", + "UEContextReleaseCommand", + "ENBConfigurationUpdate", + "MMEConfigurationUpdate", + "WriteReplaceWarningRequest", + "HandoverNotify", + "E-RABReleaseIndication", + "Paging", + "DownlinkNASTransport", + "InitialUEMessage", + "UplinkNASTransport", + "ErrorIndication", + "NASNonDeliveryIndication", + "UEContextReleaseRequest", + "DownlinkS1cdma2000tunnelling", + "UplinkS1cdma2000tunnelling", + "UECapabilityInfoIndication", + "ENBStatusTransfer", + "MMEStatusTransfer", + "DeactivateTrace", + "TraceStart", + "TraceFailureIndication", + "CellTrafficTrace", + "LocationReportingControl", + "LocationReportingFailureIndication", + "LocationReport", + "OverloadStart", + "OverloadStop", + "ENBDirectInformationTransfer", + "MMEDirectInformationTransfer", + "ENBConfigurationTransfer", + "MMEConfigurationTransfer", + "PrivateMessage"}; return convert_enum_idx(options, 44, value, "s1ap_elem_procs_o::init_msg_c::types"); } // SuccessfulOutcome ::= OPEN TYPE -ho_cmd_s& s1ap_elem_procs_o::successful_outcome_c::ho_required() +ho_cmd_s& s1ap_elem_procs_o::successful_outcome_c::ho_cmd() { assert_choice_type("HandoverCommand", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ho_request_ack_s& s1ap_elem_procs_o::successful_outcome_c::ho_request() +ho_request_ack_s& s1ap_elem_procs_o::successful_outcome_c::ho_request_ack() { assert_choice_type("HandoverRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -path_switch_request_ack_s& s1ap_elem_procs_o::successful_outcome_c::path_switch_request() +path_switch_request_ack_s& s1ap_elem_procs_o::successful_outcome_c::path_switch_request_ack() { assert_choice_type("PathSwitchRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -erab_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_setup_request() +erab_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_setup_resp() { assert_choice_type("E-RABSetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -erab_modify_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_modify_request() +erab_modify_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_modify_resp() { assert_choice_type("E-RABModifyResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -erab_release_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_release_cmd() +erab_release_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_release_resp() { assert_choice_type("E-RABReleaseResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -init_context_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::init_context_setup_request() +init_context_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::init_context_setup_resp() { assert_choice_type("InitialContextSetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ho_cancel_ack_s& s1ap_elem_procs_o::successful_outcome_c::ho_cancel() +ho_cancel_ack_s& s1ap_elem_procs_o::successful_outcome_c::ho_cancel_ack() { assert_choice_type("HandoverCancelAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -kill_resp_s& s1ap_elem_procs_o::successful_outcome_c::kill_request() +kill_resp_s& s1ap_elem_procs_o::successful_outcome_c::kill_resp() { assert_choice_type("KillResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -reset_ack_s& s1ap_elem_procs_o::successful_outcome_c::reset() +reset_ack_s& s1ap_elem_procs_o::successful_outcome_c::reset_ack() { assert_choice_type("ResetAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -s1_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::s1_setup_request() +s1_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::s1_setup_resp() { assert_choice_type("S1SetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ue_context_mod_resp_s& s1ap_elem_procs_o::successful_outcome_c::ue_context_mod_request() +ue_context_mod_resp_s& s1ap_elem_procs_o::successful_outcome_c::ue_context_mod_resp() { assert_choice_type("UEContextModificationResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -ue_context_release_complete_s& s1ap_elem_procs_o::successful_outcome_c::ue_context_release_cmd() +ue_context_release_complete_s& s1ap_elem_procs_o::successful_outcome_c::ue_context_release_complete() { assert_choice_type("UEContextReleaseComplete", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -enb_cfg_upd_ack_s& s1ap_elem_procs_o::successful_outcome_c::enb_cfg_upd() +enb_cfg_upd_ack_s& s1ap_elem_procs_o::successful_outcome_c::enb_cfg_upd_ack() { assert_choice_type("ENBConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -mme_cfg_upd_ack_s& s1ap_elem_procs_o::successful_outcome_c::mme_cfg_upd() +mme_cfg_upd_ack_s& s1ap_elem_procs_o::successful_outcome_c::mme_cfg_upd_ack() { assert_choice_type("MMEConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -write_replace_warning_resp_s& s1ap_elem_procs_o::successful_outcome_c::write_replace_warning_request() +write_replace_warning_resp_s& s1ap_elem_procs_o::successful_outcome_c::write_replace_warning_resp() { assert_choice_type("WriteReplaceWarningResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ho_cmd_s& s1ap_elem_procs_o::successful_outcome_c::ho_required() const +const ho_cmd_s& s1ap_elem_procs_o::successful_outcome_c::ho_cmd() const { assert_choice_type("HandoverCommand", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ho_request_ack_s& s1ap_elem_procs_o::successful_outcome_c::ho_request() const +const ho_request_ack_s& s1ap_elem_procs_o::successful_outcome_c::ho_request_ack() const { assert_choice_type("HandoverRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const path_switch_request_ack_s& s1ap_elem_procs_o::successful_outcome_c::path_switch_request() const +const path_switch_request_ack_s& s1ap_elem_procs_o::successful_outcome_c::path_switch_request_ack() const { assert_choice_type("PathSwitchRequestAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const erab_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_setup_request() const +const erab_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_setup_resp() const { assert_choice_type("E-RABSetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const erab_modify_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_modify_request() const +const erab_modify_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_modify_resp() const { assert_choice_type("E-RABModifyResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const erab_release_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_release_cmd() const +const erab_release_resp_s& s1ap_elem_procs_o::successful_outcome_c::erab_release_resp() const { assert_choice_type("E-RABReleaseResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const init_context_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::init_context_setup_request() const +const init_context_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::init_context_setup_resp() const { assert_choice_type("InitialContextSetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ho_cancel_ack_s& s1ap_elem_procs_o::successful_outcome_c::ho_cancel() const +const ho_cancel_ack_s& s1ap_elem_procs_o::successful_outcome_c::ho_cancel_ack() const { assert_choice_type("HandoverCancelAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const kill_resp_s& s1ap_elem_procs_o::successful_outcome_c::kill_request() const +const kill_resp_s& s1ap_elem_procs_o::successful_outcome_c::kill_resp() const { assert_choice_type("KillResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const reset_ack_s& s1ap_elem_procs_o::successful_outcome_c::reset() const +const reset_ack_s& s1ap_elem_procs_o::successful_outcome_c::reset_ack() const { assert_choice_type("ResetAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const s1_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::s1_setup_request() const +const s1_setup_resp_s& s1ap_elem_procs_o::successful_outcome_c::s1_setup_resp() const { assert_choice_type("S1SetupResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ue_context_mod_resp_s& s1ap_elem_procs_o::successful_outcome_c::ue_context_mod_request() const +const ue_context_mod_resp_s& s1ap_elem_procs_o::successful_outcome_c::ue_context_mod_resp() const { assert_choice_type("UEContextModificationResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const ue_context_release_complete_s& s1ap_elem_procs_o::successful_outcome_c::ue_context_release_cmd() const +const ue_context_release_complete_s& s1ap_elem_procs_o::successful_outcome_c::ue_context_release_complete() const { assert_choice_type("UEContextReleaseComplete", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const enb_cfg_upd_ack_s& s1ap_elem_procs_o::successful_outcome_c::enb_cfg_upd() const +const enb_cfg_upd_ack_s& s1ap_elem_procs_o::successful_outcome_c::enb_cfg_upd_ack() const { assert_choice_type("ENBConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const mme_cfg_upd_ack_s& s1ap_elem_procs_o::successful_outcome_c::mme_cfg_upd() const +const mme_cfg_upd_ack_s& s1ap_elem_procs_o::successful_outcome_c::mme_cfg_upd_ack() const { assert_choice_type("MMEConfigurationUpdateAcknowledge", type_.to_string(), "SuccessfulOutcome"); return c.get(); } -const write_replace_warning_resp_s& s1ap_elem_procs_o::successful_outcome_c::write_replace_warning_request() const +const write_replace_warning_resp_s& s1ap_elem_procs_o::successful_outcome_c::write_replace_warning_resp() const { assert_choice_type("WriteReplaceWarningResponse", type_.to_string(), "SuccessfulOutcome"); return c.get(); @@ -62194,52 +58276,52 @@ const write_replace_warning_resp_s& s1ap_elem_procs_o::successful_outcome_c::wri void s1ap_elem_procs_o::successful_outcome_c::destroy_() { switch (type_) { - case types::ho_required: + case types::ho_cmd: c.destroy(); break; - case types::ho_request: + case types::ho_request_ack: c.destroy(); break; - case types::path_switch_request: + case types::path_switch_request_ack: c.destroy(); break; - case types::erab_setup_request: + case types::erab_setup_resp: c.destroy(); break; - case types::erab_modify_request: + case types::erab_modify_resp: c.destroy(); break; - case types::erab_release_cmd: + case types::erab_release_resp: c.destroy(); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: c.destroy(); break; - case types::ho_cancel: + case types::ho_cancel_ack: c.destroy(); break; - case types::kill_request: + case types::kill_resp: c.destroy(); break; - case types::reset: + case types::reset_ack: c.destroy(); break; - case types::s1_setup_request: + case types::s1_setup_resp: c.destroy(); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: c.destroy(); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: c.destroy(); break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_ack: c.destroy(); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_ack: c.destroy(); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: c.destroy(); break; default: @@ -62251,110 +58333,54 @@ void s1ap_elem_procs_o::successful_outcome_c::set(types::options e) destroy_(); type_ = e; switch (type_) { - case types::ho_required: + case types::ho_cmd: c.init(); break; - case types::ho_request: + case types::ho_request_ack: c.init(); break; - case types::path_switch_request: + case types::path_switch_request_ack: c.init(); break; - case types::erab_setup_request: + case types::erab_setup_resp: c.init(); break; - case types::erab_modify_request: + case types::erab_modify_resp: c.init(); break; - case types::erab_release_cmd: + case types::erab_release_resp: c.init(); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: c.init(); break; - case types::ho_cancel: + case types::ho_cancel_ack: c.init(); break; - case types::kill_request: + case types::kill_resp: c.init(); break; - case types::reset: + case types::reset_ack: c.init(); break; - case types::s1_setup_request: + case types::s1_setup_resp: c.init(); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: c.init(); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: c.init(); break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_ack: c.init(); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_ack: c.init(); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: c.init(); break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::location_report: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::enb_direct_info_transfer: - break; - case types::mme_direct_info_transfer: - break; - case types::enb_cfg_transfer: - break; - case types::mme_cfg_transfer: - break; - case types::private_msg: - break; case types::nulltype: break; default: @@ -62365,110 +58391,54 @@ s1ap_elem_procs_o::successful_outcome_c::successful_outcome_c(const s1ap_elem_pr { type_ = other.type(); switch (type_) { - case types::ho_required: + case types::ho_cmd: c.init(other.c.get()); break; - case types::ho_request: + case types::ho_request_ack: c.init(other.c.get()); break; - case types::path_switch_request: + case types::path_switch_request_ack: c.init(other.c.get()); break; - case types::erab_setup_request: + case types::erab_setup_resp: c.init(other.c.get()); break; - case types::erab_modify_request: + case types::erab_modify_resp: c.init(other.c.get()); break; - case types::erab_release_cmd: + case types::erab_release_resp: c.init(other.c.get()); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: c.init(other.c.get()); break; - case types::ho_cancel: + case types::ho_cancel_ack: c.init(other.c.get()); break; - case types::kill_request: + case types::kill_resp: c.init(other.c.get()); break; - case types::reset: + case types::reset_ack: c.init(other.c.get()); break; - case types::s1_setup_request: + case types::s1_setup_resp: c.init(other.c.get()); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: c.init(other.c.get()); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: c.init(other.c.get()); break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_ack: c.init(other.c.get()); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_ack: c.init(other.c.get()); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: c.init(other.c.get()); break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::location_report: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::enb_direct_info_transfer: - break; - case types::mme_direct_info_transfer: - break; - case types::enb_cfg_transfer: - break; - case types::mme_cfg_transfer: - break; - case types::private_msg: - break; case types::nulltype: break; default: @@ -62483,110 +58453,54 @@ s1ap_elem_procs_o::successful_outcome_c& s1ap_elem_procs_o::successful_outcome_c } set(other.type()); switch (type_) { - case types::ho_required: + case types::ho_cmd: c.set(other.c.get()); break; - case types::ho_request: + case types::ho_request_ack: c.set(other.c.get()); break; - case types::path_switch_request: + case types::path_switch_request_ack: c.set(other.c.get()); break; - case types::erab_setup_request: + case types::erab_setup_resp: c.set(other.c.get()); break; - case types::erab_modify_request: + case types::erab_modify_resp: c.set(other.c.get()); break; - case types::erab_release_cmd: + case types::erab_release_resp: c.set(other.c.get()); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: c.set(other.c.get()); break; - case types::ho_cancel: + case types::ho_cancel_ack: c.set(other.c.get()); break; - case types::kill_request: + case types::kill_resp: c.set(other.c.get()); break; - case types::reset: + case types::reset_ack: c.set(other.c.get()); break; - case types::s1_setup_request: + case types::s1_setup_resp: c.set(other.c.get()); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: c.set(other.c.get()); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: c.set(other.c.get()); break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_ack: c.set(other.c.get()); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_ack: c.set(other.c.get()); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: c.set(other.c.get()); break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::location_report: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::enb_direct_info_transfer: - break; - case types::mme_direct_info_transfer: - break; - case types::enb_cfg_transfer: - break; - case types::mme_cfg_transfer: - break; - case types::private_msg: - break; case types::nulltype: break; default: @@ -62599,126 +58513,70 @@ void s1ap_elem_procs_o::successful_outcome_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ho_required: + case types::ho_cmd: j.write_fieldname("HandoverCommand"); c.get().to_json(j); break; - case types::ho_request: + case types::ho_request_ack: j.write_fieldname("HandoverRequestAcknowledge"); c.get().to_json(j); break; - case types::path_switch_request: + case types::path_switch_request_ack: j.write_fieldname("PathSwitchRequestAcknowledge"); c.get().to_json(j); break; - case types::erab_setup_request: + case types::erab_setup_resp: j.write_fieldname("E-RABSetupResponse"); c.get().to_json(j); break; - case types::erab_modify_request: + case types::erab_modify_resp: j.write_fieldname("E-RABModifyResponse"); c.get().to_json(j); break; - case types::erab_release_cmd: + case types::erab_release_resp: j.write_fieldname("E-RABReleaseResponse"); c.get().to_json(j); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: j.write_fieldname("InitialContextSetupResponse"); c.get().to_json(j); break; - case types::ho_cancel: + case types::ho_cancel_ack: j.write_fieldname("HandoverCancelAcknowledge"); c.get().to_json(j); break; - case types::kill_request: + case types::kill_resp: j.write_fieldname("KillResponse"); c.get().to_json(j); break; - case types::reset: + case types::reset_ack: j.write_fieldname("ResetAcknowledge"); c.get().to_json(j); break; - case types::s1_setup_request: + case types::s1_setup_resp: j.write_fieldname("S1SetupResponse"); c.get().to_json(j); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: j.write_fieldname("UEContextModificationResponse"); c.get().to_json(j); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: j.write_fieldname("UEContextReleaseComplete"); c.get().to_json(j); break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_ack: j.write_fieldname("ENBConfigurationUpdateAcknowledge"); c.get().to_json(j); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_ack: j.write_fieldname("MMEConfigurationUpdateAcknowledge"); c.get().to_json(j); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: j.write_fieldname("WriteReplaceWarningResponse"); c.get().to_json(j); break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::location_report: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::enb_direct_info_transfer: - break; - case types::mme_direct_info_transfer: - break; - case types::enb_cfg_transfer: - break; - case types::mme_cfg_transfer: - break; - case types::private_msg: - break; default: log_invalid_choice_id(type_, "s1ap_elem_procs_o::successful_outcome_c"); } @@ -62728,110 +58586,54 @@ SRSASN_CODE s1ap_elem_procs_o::successful_outcome_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); switch (type_) { - case types::ho_required: + case types::ho_cmd: HANDLE_CODE(c.get().pack(bref)); break; - case types::ho_request: + case types::ho_request_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::path_switch_request: + case types::path_switch_request_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::erab_setup_request: + case types::erab_setup_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::erab_modify_request: + case types::erab_modify_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::erab_release_cmd: + case types::erab_release_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::init_context_setup_request: + case types::init_context_setup_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::ho_cancel: + case types::ho_cancel_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::kill_request: + case types::kill_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::reset: + case types::reset_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::s1_setup_request: + case types::s1_setup_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::ue_context_mod_request: + case types::ue_context_mod_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::ue_context_release_cmd: + case types::ue_context_release_complete: HANDLE_CODE(c.get().pack(bref)); break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_ack: HANDLE_CODE(c.get().pack(bref)); break; - case types::write_replace_warning_request: + case types::write_replace_warning_resp: HANDLE_CODE(c.get().pack(bref)); break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::location_report: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::enb_direct_info_transfer: - break; - case types::mme_direct_info_transfer: - break; - case types::enb_cfg_transfer: - break; - case types::mme_cfg_transfer: - break; - case types::private_msg: - break; default: log_invalid_choice_id(type_, "s1ap_elem_procs_o::successful_outcome_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -62842,109 +58644,53 @@ SRSASN_CODE s1ap_elem_procs_o::successful_outcome_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); switch (type_) { - case types::ho_required: + case types::ho_cmd: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ho_request: + case types::ho_request_ack: HANDLE_CODE(c.get().unpack(bref)); break; - case types::path_switch_request: + case types::path_switch_request_ack: HANDLE_CODE(c.get().unpack(bref)); break; - case types::erab_setup_request: + case types::erab_setup_resp: HANDLE_CODE(c.get().unpack(bref)); break; - case types::erab_modify_request: + case types::erab_modify_resp: HANDLE_CODE(c.get().unpack(bref)); break; - case types::erab_release_cmd: + case types::erab_release_resp: HANDLE_CODE(c.get().unpack(bref)); break; - case types::init_context_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_cancel: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::kill_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::reset: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::s1_setup_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_mod_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ue_context_release_cmd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::enb_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::mme_cfg_upd: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::write_replace_warning_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: + case types::init_context_setup_resp: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::location_report_fail_ind: + case types::ho_cancel_ack: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::location_report: + case types::kill_resp: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::overload_start: + case types::reset_ack: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::overload_stop: + case types::s1_setup_resp: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::enb_direct_info_transfer: + case types::ue_context_mod_resp: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::mme_direct_info_transfer: + case types::ue_context_release_complete: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::enb_cfg_transfer: + case types::enb_cfg_upd_ack: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::mme_cfg_transfer: + case types::mme_cfg_upd_ack: + HANDLE_CODE(c.get().unpack(bref)); break; - case types::private_msg: + case types::write_replace_warning_resp: + HANDLE_CODE(c.get().unpack(bref)); break; default: log_invalid_choice_id(type_, "s1ap_elem_procs_o::successful_outcome_c"); @@ -62955,140 +58701,110 @@ SRSASN_CODE s1ap_elem_procs_o::successful_outcome_c::unpack(cbit_ref& bref) std::string s1ap_elem_procs_o::successful_outcome_c::types_opts::to_string() const { - static constexpr const char* options[] = {"HandoverCommand", - "HandoverRequestAcknowledge", - "PathSwitchRequestAcknowledge", - "E-RABSetupResponse", - "E-RABModifyResponse", - "E-RABReleaseResponse", - "InitialContextSetupResponse", - "HandoverCancelAcknowledge", - "KillResponse", - "ResetAcknowledge", - "S1SetupResponse", - "UEContextModificationResponse", - "UEContextReleaseComplete", - "ENBConfigurationUpdateAcknowledge", - "MMEConfigurationUpdateAcknowledge", - "WriteReplaceWarningResponse", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL"}; - return convert_enum_idx(options, 44, value, "s1ap_elem_procs_o::successful_outcome_c::types"); + static const char* options[] = {"HandoverCommand", + "HandoverRequestAcknowledge", + "PathSwitchRequestAcknowledge", + "E-RABSetupResponse", + "E-RABModifyResponse", + "E-RABReleaseResponse", + "InitialContextSetupResponse", + "HandoverCancelAcknowledge", + "KillResponse", + "ResetAcknowledge", + "S1SetupResponse", + "UEContextModificationResponse", + "UEContextReleaseComplete", + "ENBConfigurationUpdateAcknowledge", + "MMEConfigurationUpdateAcknowledge", + "WriteReplaceWarningResponse"}; + return convert_enum_idx(options, 16, value, "s1ap_elem_procs_o::successful_outcome_c::types"); } uint8_t s1ap_elem_procs_o::successful_outcome_c::types_opts::to_number() const { - switch (value) { - case s1_setup_request: - return 1; - default: - invalid_enum_number(value, "s1ap_elem_procs_o::successful_outcome_c::types"); + if (value == s1_setup_resp) { + return 1; } + invalid_enum_number(value, "s1ap_elem_procs_o::successful_outcome_c::types"); return 0; } // UnsuccessfulOutcome ::= OPEN TYPE -ho_prep_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ho_required() +ho_prep_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ho_prep_fail() { assert_choice_type("HandoverPreparationFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -ho_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ho_request() +ho_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ho_fail() { assert_choice_type("HandoverFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -path_switch_request_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::path_switch_request() +path_switch_request_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::path_switch_request_fail() { assert_choice_type("PathSwitchRequestFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -init_context_setup_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::init_context_setup_request() +init_context_setup_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::init_context_setup_fail() { assert_choice_type("InitialContextSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -s1_setup_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::s1_setup_request() +s1_setup_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::s1_setup_fail() { assert_choice_type("S1SetupFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -ue_context_mod_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ue_context_mod_request() +ue_context_mod_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ue_context_mod_fail() { assert_choice_type("UEContextModificationFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -enb_cfg_upd_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::enb_cfg_upd() +enb_cfg_upd_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::enb_cfg_upd_fail() { assert_choice_type("ENBConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -mme_cfg_upd_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::mme_cfg_upd() +mme_cfg_upd_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::mme_cfg_upd_fail() { assert_choice_type("MMEConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const ho_prep_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ho_required() const +const ho_prep_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ho_prep_fail() const { assert_choice_type("HandoverPreparationFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const ho_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ho_request() const +const ho_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ho_fail() const { assert_choice_type("HandoverFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const path_switch_request_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::path_switch_request() const +const path_switch_request_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::path_switch_request_fail() const { assert_choice_type("PathSwitchRequestFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const init_context_setup_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::init_context_setup_request() const +const init_context_setup_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::init_context_setup_fail() const { assert_choice_type("InitialContextSetupFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const s1_setup_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::s1_setup_request() const +const s1_setup_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::s1_setup_fail() const { assert_choice_type("S1SetupFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const ue_context_mod_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ue_context_mod_request() const +const ue_context_mod_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::ue_context_mod_fail() const { assert_choice_type("UEContextModificationFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const enb_cfg_upd_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::enb_cfg_upd() const +const enb_cfg_upd_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::enb_cfg_upd_fail() const { assert_choice_type("ENBConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); } -const mme_cfg_upd_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::mme_cfg_upd() const +const mme_cfg_upd_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::mme_cfg_upd_fail() const { assert_choice_type("MMEConfigurationUpdateFailure", type_.to_string(), "UnsuccessfulOutcome"); return c.get(); @@ -63096,28 +58812,28 @@ const mme_cfg_upd_fail_s& s1ap_elem_procs_o::unsuccessful_outcome_c::mme_cfg_upd void s1ap_elem_procs_o::unsuccessful_outcome_c::destroy_() { switch (type_) { - case types::ho_required: + case types::ho_prep_fail: c.destroy(); break; - case types::ho_request: + case types::ho_fail: c.destroy(); break; - case types::path_switch_request: + case types::path_switch_request_fail: c.destroy(); break; - case types::init_context_setup_request: + case types::init_context_setup_fail: c.destroy(); break; - case types::s1_setup_request: + case types::s1_setup_fail: c.destroy(); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: c.destroy(); break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_fail: c.destroy(); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_fail: c.destroy(); break; default: @@ -63129,102 +58845,30 @@ void s1ap_elem_procs_o::unsuccessful_outcome_c::set(types::options e) destroy_(); type_ = e; switch (type_) { - case types::ho_required: + case types::ho_prep_fail: c.init(); break; - case types::ho_request: + case types::ho_fail: c.init(); break; - case types::path_switch_request: + case types::path_switch_request_fail: c.init(); break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: + case types::init_context_setup_fail: c.init(); break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: + case types::s1_setup_fail: c.init(); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: c.init(); break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_fail: c.init(); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_fail: c.init(); break; - case types::write_replace_warning_request: - break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::location_report: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::enb_direct_info_transfer: - break; - case types::mme_direct_info_transfer: - break; - case types::enb_cfg_transfer: - break; - case types::mme_cfg_transfer: - break; - case types::private_msg: - break; case types::nulltype: break; default: @@ -63236,102 +58880,30 @@ s1ap_elem_procs_o::unsuccessful_outcome_c::unsuccessful_outcome_c( { type_ = other.type(); switch (type_) { - case types::ho_required: + case types::ho_prep_fail: c.init(other.c.get()); break; - case types::ho_request: + case types::ho_fail: c.init(other.c.get()); break; - case types::path_switch_request: + case types::path_switch_request_fail: c.init(other.c.get()); break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: + case types::init_context_setup_fail: c.init(other.c.get()); break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: + case types::s1_setup_fail: c.init(other.c.get()); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: c.init(other.c.get()); break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_fail: c.init(other.c.get()); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_fail: c.init(other.c.get()); break; - case types::write_replace_warning_request: - break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::location_report: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::enb_direct_info_transfer: - break; - case types::mme_direct_info_transfer: - break; - case types::enb_cfg_transfer: - break; - case types::mme_cfg_transfer: - break; - case types::private_msg: - break; case types::nulltype: break; default: @@ -63346,102 +58918,30 @@ s1ap_elem_procs_o::unsuccessful_outcome_c& s1ap_elem_procs_o::unsuccessful_outco } set(other.type()); switch (type_) { - case types::ho_required: + case types::ho_prep_fail: c.set(other.c.get()); break; - case types::ho_request: + case types::ho_fail: c.set(other.c.get()); break; - case types::path_switch_request: + case types::path_switch_request_fail: c.set(other.c.get()); break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: + case types::init_context_setup_fail: c.set(other.c.get()); break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: + case types::s1_setup_fail: c.set(other.c.get()); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: c.set(other.c.get()); break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_fail: c.set(other.c.get()); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_fail: c.set(other.c.get()); break; - case types::write_replace_warning_request: - break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::location_report: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::enb_direct_info_transfer: - break; - case types::mme_direct_info_transfer: - break; - case types::enb_cfg_transfer: - break; - case types::mme_cfg_transfer: - break; - case types::private_msg: - break; case types::nulltype: break; default: @@ -63454,110 +58954,38 @@ void s1ap_elem_procs_o::unsuccessful_outcome_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ho_required: + case types::ho_prep_fail: j.write_fieldname("HandoverPreparationFailure"); c.get().to_json(j); break; - case types::ho_request: + case types::ho_fail: j.write_fieldname("HandoverFailure"); c.get().to_json(j); break; - case types::path_switch_request: + case types::path_switch_request_fail: j.write_fieldname("PathSwitchRequestFailure"); c.get().to_json(j); break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: + case types::init_context_setup_fail: j.write_fieldname("InitialContextSetupFailure"); c.get().to_json(j); break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: + case types::s1_setup_fail: j.write_fieldname("S1SetupFailure"); c.get().to_json(j); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: j.write_fieldname("UEContextModificationFailure"); c.get().to_json(j); break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_fail: j.write_fieldname("ENBConfigurationUpdateFailure"); c.get().to_json(j); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_fail: j.write_fieldname("MMEConfigurationUpdateFailure"); c.get().to_json(j); break; - case types::write_replace_warning_request: - break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::location_report: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::enb_direct_info_transfer: - break; - case types::mme_direct_info_transfer: - break; - case types::enb_cfg_transfer: - break; - case types::mme_cfg_transfer: - break; - case types::private_msg: - break; default: log_invalid_choice_id(type_, "s1ap_elem_procs_o::unsuccessful_outcome_c"); } @@ -63567,102 +58995,30 @@ SRSASN_CODE s1ap_elem_procs_o::unsuccessful_outcome_c::pack(bit_ref& bref) const { varlength_field_pack_guard varlen_scope(bref, true); switch (type_) { - case types::ho_required: + case types::ho_prep_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::ho_request: + case types::ho_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::path_switch_request: + case types::path_switch_request_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: + case types::init_context_setup_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: + case types::s1_setup_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_fail: HANDLE_CODE(c.get().pack(bref)); break; - case types::write_replace_warning_request: - break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::location_report: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::enb_direct_info_transfer: - break; - case types::mme_direct_info_transfer: - break; - case types::enb_cfg_transfer: - break; - case types::mme_cfg_transfer: - break; - case types::private_msg: - break; default: log_invalid_choice_id(type_, "s1ap_elem_procs_o::unsuccessful_outcome_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -63673,102 +59029,30 @@ SRSASN_CODE s1ap_elem_procs_o::unsuccessful_outcome_c::unpack(cbit_ref& bref) { varlength_field_unpack_guard varlen_scope(bref, true); switch (type_) { - case types::ho_required: + case types::ho_prep_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ho_request: + case types::ho_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::path_switch_request: + case types::path_switch_request_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::erab_setup_request: - break; - case types::erab_modify_request: - break; - case types::erab_release_cmd: - break; - case types::init_context_setup_request: + case types::init_context_setup_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ho_cancel: - break; - case types::kill_request: - break; - case types::reset: - break; - case types::s1_setup_request: + case types::s1_setup_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ue_context_mod_request: + case types::ue_context_mod_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::ue_context_release_cmd: - break; - case types::enb_cfg_upd: + case types::enb_cfg_upd_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::mme_cfg_upd: + case types::mme_cfg_upd_fail: HANDLE_CODE(c.get().unpack(bref)); break; - case types::write_replace_warning_request: - break; - case types::ho_notify: - break; - case types::erab_release_ind: - break; - case types::paging: - break; - case types::dl_nas_transport: - break; - case types::init_ue_msg: - break; - case types::ul_nas_transport: - break; - case types::error_ind: - break; - case types::nas_non_delivery_ind: - break; - case types::ue_context_release_request: - break; - case types::dl_s1cdma2000tunnelling: - break; - case types::ul_s1cdma2000tunnelling: - break; - case types::ue_cap_info_ind: - break; - case types::enb_status_transfer: - break; - case types::mme_status_transfer: - break; - case types::deactiv_trace: - break; - case types::trace_start: - break; - case types::trace_fail_ind: - break; - case types::cell_traffic_trace: - break; - case types::location_report_ctrl: - break; - case types::location_report_fail_ind: - break; - case types::location_report: - break; - case types::overload_start: - break; - case types::overload_stop: - break; - case types::enb_direct_info_transfer: - break; - case types::mme_direct_info_transfer: - break; - case types::enb_cfg_transfer: - break; - case types::mme_cfg_transfer: - break; - case types::private_msg: - break; default: log_invalid_choice_id(type_, "s1ap_elem_procs_o::unsuccessful_outcome_c"); return SRSASN_ERROR_ENCODE_FAIL; @@ -63778,60 +59062,22 @@ SRSASN_CODE s1ap_elem_procs_o::unsuccessful_outcome_c::unpack(cbit_ref& bref) std::string s1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::to_string() const { - static constexpr const char* options[] = {"HandoverPreparationFailure", - "HandoverFailure", - "PathSwitchRequestFailure", - "NULL", - "NULL", - "NULL", - "InitialContextSetupFailure", - "NULL", - "NULL", - "NULL", - "S1SetupFailure", - "UEContextModificationFailure", - "NULL", - "ENBConfigurationUpdateFailure", - "MMEConfigurationUpdateFailure", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL", - "NULL"}; - return convert_enum_idx(options, 44, value, "s1ap_elem_procs_o::unsuccessful_outcome_c::types"); + static const char* options[] = {"HandoverPreparationFailure", + "HandoverFailure", + "PathSwitchRequestFailure", + "InitialContextSetupFailure", + "S1SetupFailure", + "UEContextModificationFailure", + "ENBConfigurationUpdateFailure", + "MMEConfigurationUpdateFailure"}; + return convert_enum_idx(options, 8, value, "s1ap_elem_procs_o::unsuccessful_outcome_c::types"); } uint8_t s1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::to_number() const { - switch (value) { - case s1_setup_request: - return 1; - default: - invalid_enum_number(value, "s1ap_elem_procs_o::unsuccessful_outcome_c::types"); + if (value == s1_setup_fail) { + return 1; } + invalid_enum_number(value, "s1ap_elem_procs_o::unsuccessful_outcome_c::types"); return 0; } @@ -63871,20 +59117,20 @@ bool init_msg_s::load_info_obj(const uint16_t& proc_code_) proc_code = proc_code_; crit = s1ap_elem_procs_o::get_crit(proc_code); value = s1ap_elem_procs_o::get_init_msg(proc_code); - return true; + return value.type().value != s1ap_elem_procs_o::init_msg_c::types_opts::nulltype; } // LastVisitedEUTRANCellInformation-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t last_visited_eutran_cell_info_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {167, 168}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {167, 168}; + return map_enum_number(options, 2, idx, "id"); } bool last_visited_eutran_cell_info_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {167, 168}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {167, 168}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -63898,9 +59144,9 @@ crit_e last_visited_eutran_cell_info_ext_ies_o::get_crit(const uint32_t& id) case 168: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } last_visited_eutran_cell_info_ext_ies_o::ext_c last_visited_eutran_cell_info_ext_ies_o::get_ext(const uint32_t& id) { @@ -63913,7 +59159,7 @@ last_visited_eutran_cell_info_ext_ies_o::ext_c last_visited_eutran_cell_info_ext ret.set(ext_c::types::ho_cause); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -63925,9 +59171,9 @@ presence_e last_visited_eutran_cell_info_ext_ies_o::get_presence(const uint32_t& case 168: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -64066,16 +59312,16 @@ SRSASN_CODE last_visited_eutran_cell_info_ext_ies_o::ext_c::unpack(cbit_ref& bre std::string last_visited_eutran_cell_info_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"INTEGER (0..40950)", "Cause"}; + static const char* options[] = {"INTEGER (0..40950)", "Cause"}; return convert_enum_idx(options, 2, value, "last_visited_eutran_cell_info_ext_ies_o::ext_c::types"); } uint8_t last_visited_eutran_cell_info_ext_ies_o::ext_c::types_opts::to_number() const { - static constexpr uint8_t options[] = {0}; - return convert_enum_idx(options, 1, value, "last_visited_eutran_cell_info_ext_ies_o::ext_c::types"); + static const uint8_t options[] = {0}; + return map_enum_number(options, 1, value, "last_visited_eutran_cell_info_ext_ies_o::ext_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; last_visited_eutran_cell_info_ext_ies_container::last_visited_eutran_cell_info_ext_ies_container() : time_ue_stayed_in_cell_enhanced_granularity(167, crit_e::ignore), @@ -64120,7 +59366,7 @@ SRSASN_CODE last_visited_eutran_cell_info_ext_ies_container::unpack(cbit_ref& br ho_cause.ext = c.ext_value.ho_cause(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -64209,7 +59455,7 @@ SRSASN_CODE last_visited_geran_cell_info_c::unpack(cbit_ref& bref) std::string last_visited_geran_cell_info_c::types_opts::to_string() const { - static constexpr const char* options[] = {"undefined"}; + static const char* options[] = {"undefined"}; return convert_enum_idx(options, 1, value, "last_visited_geran_cell_info_c::types"); } @@ -64356,7 +59602,7 @@ SRSASN_CODE last_visited_cell_item_c::unpack(cbit_ref& bref) std::string last_visited_cell_item_c::types_opts::to_string() const { - static constexpr const char* options[] = {"e-UTRAN-Cell", "uTRAN-Cell", "gERAN-Cell"}; + static const char* options[] = {"e-UTRAN-Cell", "uTRAN-Cell", "gERAN-Cell"}; return convert_enum_idx(options, 3, value, "last_visited_cell_item_c::types"); } @@ -64379,8 +59625,8 @@ void multi_cell_load_report_request_s::to_json(json_writer& j) const { j.start_obj(); j.start_array("requestedCellList"); - for (uint32_t i1 = 0; i1 < requested_cell_list.size(); ++i1) { - requested_cell_list[i1].to_json(j); + for (const auto& e1 : requested_cell_list) { + e1.to_json(j); } j.end_array(); j.end_obj(); @@ -64553,7 +59799,7 @@ SRSASN_CODE multi_cell_load_report_resp_item_c::unpack(cbit_ref& bref) std::string multi_cell_load_report_resp_item_c::types_opts::to_string() const { - static constexpr const char* options[] = {"eUTRANResponse", "uTRANResponse", "gERANResponse", "eHRPD"}; + static const char* options[] = {"eUTRANResponse", "uTRANResponse", "gERANResponse", "eHRPD"}; return convert_enum_idx(options, 4, value, "multi_cell_load_report_resp_item_c::types"); } @@ -64616,7 +59862,7 @@ bool successful_outcome_s::load_info_obj(const uint16_t& proc_code_) proc_code = proc_code_; crit = s1ap_elem_procs_o::get_crit(proc_code); value = s1ap_elem_procs_o::get_successful_outcome(proc_code); - return true; + return value.type().value != s1ap_elem_procs_o::successful_outcome_c::types_opts::nulltype; } // UnsuccessfulOutcome ::= SEQUENCE{{S1AP-ELEMENTARY-PROCEDURE}} @@ -64655,7 +59901,7 @@ bool unsuccessful_outcome_s::load_info_obj(const uint16_t& proc_code_) proc_code = proc_code_; crit = s1ap_elem_procs_o::get_crit(proc_code); value = s1ap_elem_procs_o::get_unsuccessful_outcome(proc_code); - return true; + return value.type().value != s1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::nulltype; } // S1AP-PDU ::= CHOICE @@ -64802,14 +60048,14 @@ SRSASN_CODE s1ap_pdu_c::unpack(cbit_ref& bref) std::string s1ap_pdu_c::types_opts::to_string() const { - static constexpr const char* options[] = {"initiatingMessage", "successfulOutcome", "unsuccessfulOutcome"}; + static const char* options[] = {"initiatingMessage", "successfulOutcome", "unsuccessfulOutcome"}; return convert_enum_idx(options, 3, value, "s1ap_pdu_c::types"); } // CellActivationCause ::= ENUMERATED std::string cell_activation_cause_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "application-container-syntax-error", "inconsistent-reporting-cell-identifier", "unspecified"}; return convert_enum_idx(options, 3, value, "cell_activation_cause_e"); } @@ -64817,7 +60063,7 @@ std::string cell_activation_cause_opts::to_string() const // CellLoadReportingCause ::= ENUMERATED std::string cell_load_report_cause_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "application-container-syntax-error", "inconsistent-reporting-cell-identifier", "unspecified"}; return convert_enum_idx(options, 3, value, "cell_load_report_cause_e"); } @@ -64825,7 +60071,7 @@ std::string cell_load_report_cause_opts::to_string() const // CellStateIndicationCause ::= ENUMERATED std::string cell_state_ind_cause_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "application-container-syntax-error", "inconsistent-reporting-cell-identifier", "unspecified"}; return convert_enum_idx(options, 3, value, "cell_state_ind_cause_e"); } @@ -64833,7 +60079,7 @@ std::string cell_state_ind_cause_opts::to_string() const // FailureEventReportingCause ::= ENUMERATED std::string fail_event_report_cause_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "application-container-syntax-error", "inconsistent-reporting-cell-identifier", "unspecified"}; return convert_enum_idx(options, 3, value, "fail_event_report_cause_e"); } @@ -64841,7 +60087,7 @@ std::string fail_event_report_cause_opts::to_string() const // HOReportingCause ::= ENUMERATED std::string ho_report_cause_opts::to_string() const { - static constexpr const char* options[] = { + static const char* options[] = { "application-container-syntax-error", "inconsistent-reporting-cell-identifier", "unspecified"}; return convert_enum_idx(options, 3, value, "ho_report_cause_e"); } @@ -65029,13 +60275,13 @@ SRSASN_CODE so_ntransfer_cause_c::unpack(cbit_ref& bref) std::string so_ntransfer_cause_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellLoadReporting", - "multiCellLoadReporting", - "eventTriggeredCellLoadReporting", - "hOReporting", - "eutranCellActivation", - "energySavingsIndication", - "failureEventReporting"}; + static const char* options[] = {"cellLoadReporting", + "multiCellLoadReporting", + "eventTriggeredCellLoadReporting", + "hOReporting", + "eutranCellActivation", + "energySavingsIndication", + "failureEventReporting"}; return convert_enum_idx(options, 7, value, "so_ntransfer_cause_c::types"); } @@ -65274,13 +60520,13 @@ SRSASN_CODE so_ntransfer_request_container_c::unpack(cbit_ref& bref) std::string so_ntransfer_request_container_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellLoadReporting", - "multiCellLoadReporting", - "eventTriggeredCellLoadReporting", - "hOReporting", - "eutranCellActivation", - "energySavingsIndication", - "failureEventReporting"}; + static const char* options[] = {"cellLoadReporting", + "multiCellLoadReporting", + "eventTriggeredCellLoadReporting", + "hOReporting", + "eutranCellActivation", + "energySavingsIndication", + "failureEventReporting"}; return convert_enum_idx(options, 7, value, "so_ntransfer_request_container_c::types"); } @@ -65404,8 +60650,8 @@ void so_ntransfer_resp_container_c::to_json(json_writer& j) const break; case types::multi_cell_load_report: j.start_array("multiCellLoadReporting"); - for (uint32_t i1 = 0; i1 < c.get().size(); ++i1) { - c.get()[i1].to_json(j); + for (const auto& e1 : c.get()) { + e1.to_json(j); } j.end_array(); break; @@ -65495,27 +60741,27 @@ SRSASN_CODE so_ntransfer_resp_container_c::unpack(cbit_ref& bref) std::string so_ntransfer_resp_container_c::types_opts::to_string() const { - static constexpr const char* options[] = {"cellLoadReporting", - "multiCellLoadReporting", - "eventTriggeredCellLoadReporting", - "hOReporting", - "eutranCellActivation", - "energySavingsIndication", - "failureEventReporting"}; + static const char* options[] = {"cellLoadReporting", + "multiCellLoadReporting", + "eventTriggeredCellLoadReporting", + "hOReporting", + "eutranCellActivation", + "energySavingsIndication", + "failureEventReporting"}; return convert_enum_idx(options, 7, value, "so_ntransfer_resp_container_c::types"); } // SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION uint32_t sourceenb_to_targetenb_transparent_container_ext_ies_o::idx_to_id(uint32_t idx) { - static constexpr const uint32_t options[] = {175, 194}; - return convert_enum_idx(options, 2, idx, "id"); + static const uint32_t options[] = {175, 194}; + return map_enum_number(options, 2, idx, "id"); } bool sourceenb_to_targetenb_transparent_container_ext_ies_o::is_id_valid(const uint32_t& id) { - static constexpr const uint32_t options[] = {175, 194}; - for (uint32_t i = 0; i < 2; ++i) { - if (options[i] == id) { + static const uint32_t options[] = {175, 194}; + for (const auto& o : options) { + if (o == id) { return true; } } @@ -65529,9 +60775,9 @@ crit_e sourceenb_to_targetenb_transparent_container_ext_ies_o::get_crit(const ui case 194: return crit_e::ignore; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return crit_e(); + return {}; } sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c sourceenb_to_targetenb_transparent_container_ext_ies_o::get_ext(const uint32_t& id) @@ -65545,7 +60791,7 @@ sourceenb_to_targetenb_transparent_container_ext_ies_o::get_ext(const uint32_t& ret.set(ext_c::types::ue_history_info_from_the_ue); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } return ret; } @@ -65557,9 +60803,9 @@ presence_e sourceenb_to_targetenb_transparent_container_ext_ies_o::get_presence( case 194: return presence_e::optional; default: - s1ap_log_print(LOG_LEVEL_ERROR, "The id=%d is not recognized", id); + logmap::get("ASN1::S1AP")->error("The id=%d is not recognized", id); } - return presence_e(); + return {}; } // Extension ::= OPEN TYPE @@ -65704,11 +60950,11 @@ SRSASN_CODE sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::unpac std::string sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::types_opts::to_string() const { - static constexpr const char* options[] = {"BIT STRING", "OCTET STRING"}; + static const char* options[] = {"BIT STRING", "OCTET STRING"}; return convert_enum_idx(options, 2, value, "sourceenb_to_targetenb_transparent_container_ext_ies_o::ext_c::types"); } -template struct protocol_ext_field_s; +template struct asn1::s1ap::protocol_ext_field_s; sourceenb_to_targetenb_transparent_container_ext_ies_container:: sourceenb_to_targetenb_transparent_container_ext_ies_container() : @@ -65754,7 +61000,7 @@ SRSASN_CODE sourceenb_to_targetenb_transparent_container_ext_ies_container::unpa ue_history_info_from_the_ue.ext = c.ext_value.ue_history_info_from_the_ue(); break; default: - s1ap_log_print(LOG_LEVEL_ERROR, "Unpacked object ID=%d is not recognized\n", c.id); + logmap::get("ASN1::S1AP")->error("Unpacked object ID=%d is not recognized\n", c.id); return SRSASN_ERROR_DECODE_FAIL; } } @@ -65826,8 +61072,8 @@ void sourceenb_to_targetenb_transparent_container_s::to_json(json_writer& j) con j.write_str("rRC-Container", rrc_container.to_string()); if (erab_info_list_present) { j.start_array("e-RABInformationList"); - for (uint32_t i1 = 0; i1 < erab_info_list.size(); ++i1) { - erab_info_list[i1].to_json(j); + for (const auto& e1 : erab_info_list) { + e1.to_json(j); } j.end_array(); } @@ -65837,8 +61083,8 @@ void sourceenb_to_targetenb_transparent_container_s::to_json(json_writer& j) con j.write_int("subscriberProfileIDforRFP", subscriber_profile_idfor_rfp); } j.start_array("uE-HistoryInformation"); - for (uint32_t i1 = 0; i1 < ue_history_info.size(); ++i1) { - ue_history_info[i1].to_json(j); + for (const auto& e1 : ue_history_info) { + e1.to_json(j); } j.end_array(); if (ie_exts_present) { diff --git a/lib/test/asn1/ngap_asn1_test.cc b/lib/test/asn1/ngap_asn1_test.cc index 5a322fe72..82483230e 100644 --- a/lib/test/asn1/ngap_asn1_test.cc +++ b/lib/test/asn1/ngap_asn1_test.cc @@ -133,8 +133,8 @@ int test_ngsetup_response() TESTASSERT(pdu.successful_outcome().proc_code == 21); TESTASSERT(pdu.successful_outcome().crit.value == crit_opts::reject); TESTASSERT(pdu.successful_outcome().value.type().value == - ngap_elem_procs_o::successful_outcome_c::types_opts::ng_setup_request); // FIXME: Change name - ng_setup_resp_s& resp = pdu.successful_outcome().value.ng_setup_request(); + ngap_elem_procs_o::successful_outcome_c::types_opts::ng_setup_resp); // FIXME: Change name + ng_setup_resp_s& resp = pdu.successful_outcome().value.ng_setup_resp(); // field 0 TESTASSERT(resp.protocol_ies.amf_name.id == 1); TESTASSERT(resp.protocol_ies.amf_name.crit.value == crit_opts::reject); @@ -288,7 +288,7 @@ int test_ue_context_release_complete() TESTASSERT(pdu.successful_outcome().proc_code == 41); TESTASSERT(pdu.successful_outcome().crit.value == crit_opts::reject); TESTASSERT(pdu.successful_outcome().value.type().value == - ngap_elem_procs_o::successful_outcome_c::types_opts::ue_context_release_cmd); + ngap_elem_procs_o::successful_outcome_c::types_opts::ue_context_release_complete); TESTASSERT(ceil(bref.distance(ngap_msg) / 8.0) == sizeof(ngap_msg)); TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS); @@ -345,9 +345,7 @@ int test_session_res_setup_request() int main() { - srslte::logmap::set_default_log_level(LOG_LEVEL_DEBUG); - srsasn_log_register_handler(srslte::logmap::get("ASN1").get()); - ngap_nr_log_register_handler(srslte::logmap::get("NGAP").get()); + srslte::logmap::set_default_log_level(srslte::LOG_LEVEL_DEBUG); TESTASSERT(test_amf_upd() == 0); TESTASSERT(test_ngsetup_request() == 0); diff --git a/lib/test/asn1/rrc_asn1_test.cc b/lib/test/asn1/rrc_asn1_test.cc index af800fb20..f5054a361 100644 --- a/lib/test/asn1/rrc_asn1_test.cc +++ b/lib/test/asn1/rrc_asn1_test.cc @@ -36,15 +36,12 @@ int test_generic() // test logger handler { - srslte::nullsink_log null_log("NULL"); - null_log.set_level(LOG_LEVEL_INFO); - rrc_log_register_handler(&null_log); - std::string test_str = "This is a console test to see if the RRC logger is working fine\n"; - rrc_log_print(LOG_LEVEL_INFO, test_str.c_str()); - TESTASSERT(null_log.last_log_msg == test_str); - TESTASSERT(null_log.last_log_level == LOG_LEVEL_INFO); + srslte::scoped_log null_log("ASN1::RRC"); + null_log->set_level(srslte::LOG_LEVEL_INFO); + srslte::logmap::get("ASN1::RRC")->info("This is a console test to see if the RRC logger is working fine\n"); + TESTASSERT(null_log->last_log_msg == "This is a console test to see if the RRC logger is working fine\n"); + TESTASSERT(null_log->last_log_level == srslte::LOG_LEVEL_INFO); // go back to original logger - rrc_log_register_handler(srslte::logmap::get("RRC ").get()); } // Test deep copy of choice types @@ -599,9 +596,7 @@ int test_rrc_conn_reconf_r15_2() int main() { - srslte::logmap::set_default_log_level(LOG_LEVEL_DEBUG); - srsasn_log_register_handler(srslte::logmap::get("ASN1").get()); - rrc_log_register_handler(srslte::logmap::get("RRC ").get()); + srslte::logmap::set_default_log_level(srslte::LOG_LEVEL_DEBUG); TESTASSERT(test_generic() == 0); TESTASSERT(test_json_printer() == 0); diff --git a/lib/test/asn1/s1ap_asn1_test.cc b/lib/test/asn1/s1ap_asn1_test.cc new file mode 100644 index 000000000..2c48e1739 --- /dev/null +++ b/lib/test/asn1/s1ap_asn1_test.cc @@ -0,0 +1,152 @@ +/* + Copyright 2013-2019 Software Radio Systems Limited + + This file is part of srsLTE + + srsLTE is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of + the License, or (at your option) any later version. + + srsLTE is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + A copy of the GNU Affero General Public License can be found in + the LICENSE file in the top-level directory of this distribution + and at http://www.gnu.org/licenses/. +*/ + +#include "srslte/asn1/s1ap_asn1.h" +#include "srslte/common/test_common.h" + +using namespace asn1; +using namespace asn1::s1ap; + +/* TESTS */ + +int test_s1setup_request() +{ + uint8_t ngap_msg[] = {0x00, 0x11, 0x00, 0x2d, 0x00, 0x00, 0x04, 0x00, 0x3b, 0x00, 0x08, 0x00, 0x09, + 0xf1, 0x07, 0x00, 0x00, 0x19, 0xb0, 0x00, 0x3c, 0x40, 0x0a, 0x03, 0x80, 0x65, + 0x6e, 0x62, 0x30, 0x30, 0x31, 0x39, 0x62, 0x00, 0x40, 0x00, 0x07, 0x00, 0x00, + 0x01, 0xc0, 0x09, 0xf1, 0x07, 0x00, 0x89, 0x40, 0x01, 0x40}; + cbit_ref bref(&ngap_msg[0], sizeof(ngap_msg)); + // 0011002D000004003B00080009F107000019B0003C400A0380656E62303031396200400007000001C009F1070089400140 + + s1ap_pdu_c pdu; + TESTASSERT(pdu.unpack(bref) == SRSASN_SUCCESS); + + TESTASSERT(pdu.type().value == s1ap_pdu_c::types_opts::init_msg); + TESTASSERT(pdu.init_msg().proc_code == 17); + TESTASSERT(pdu.init_msg().crit.value == crit_opts::reject); + s1ap_elem_procs_o::init_msg_c& init_choice = pdu.init_msg().value; + TESTASSERT(init_choice.type().value == s1ap_elem_procs_o::init_msg_c::types_opts::s1_setup_request); + s1_setup_request_s& s1req = init_choice.s1_setup_request(); + TESTASSERT(not s1req.ext); + TESTASSERT(s1req.protocol_ies.global_enb_id.id == ASN1_S1AP_ID_GLOBAL_ENB_ID); + TESTASSERT(s1req.protocol_ies.global_enb_id.crit.value == crit_opts::reject); + TESTASSERT(s1req.protocol_ies.global_enb_id.value.enb_id.type().value == enb_id_c::types_opts::macro_enb_id); + TESTASSERT(s1req.protocol_ies.global_enb_id.value.enb_id.macro_enb_id().to_number() == 0x0019B); + // + // // json_writer js; + // // pdu.to_json(js); + // // printf("PDU json: %s\n", js.to_string().c_str()); + + TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS); + + return 0; +} + +int test_init_ctxt_setup_req() +{ + uint8_t s1ap_msg[] = { + 0x00, 0x09, 0x00, 0x80, 0xc6, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x64, 0x00, 0x08, 0x00, 0x02, 0x00, + 0x01, 0x00, 0x42, 0x00, 0x0a, 0x18, 0x3b, 0x9a, 0xca, 0x00, 0x60, 0x3b, 0x9a, 0xca, 0x00, 0x00, 0x18, 0x00, 0x78, + 0x00, 0x00, 0x34, 0x00, 0x73, 0x45, 0x00, 0x09, 0x3c, 0x0f, 0x80, 0x0a, 0x00, 0x21, 0xf0, 0xb7, 0x36, 0x1c, 0x56, + 0x64, 0x27, 0x3e, 0x5b, 0x04, 0xb7, 0x02, 0x07, 0x42, 0x02, 0x3e, 0x06, 0x00, 0x09, 0xf1, 0x07, 0x00, 0x07, 0x00, + 0x37, 0x52, 0x66, 0xc1, 0x01, 0x09, 0x1b, 0x07, 0x74, 0x65, 0x73, 0x74, 0x31, 0x32, 0x33, 0x06, 0x6d, 0x6e, 0x63, + 0x30, 0x37, 0x30, 0x06, 0x6d, 0x63, 0x63, 0x39, 0x30, 0x31, 0x04, 0x67, 0x70, 0x72, 0x73, 0x05, 0x01, 0xc0, 0xa8, + 0x03, 0x02, 0x27, 0x0e, 0x80, 0x80, 0x21, 0x0a, 0x03, 0x00, 0x00, 0x0a, 0x81, 0x06, 0x08, 0x08, 0x08, 0x08, 0x50, + 0x0b, 0xf6, 0x09, 0xf1, 0x07, 0x80, 0x01, 0x01, 0xf6, 0x7e, 0x72, 0x69, 0x13, 0x09, 0xf1, 0x07, 0x00, 0x01, 0x23, + 0x05, 0xf4, 0xf6, 0x7e, 0x72, 0x69, 0x00, 0x6b, 0x00, 0x05, 0x18, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x49, 0x00, 0x20, + 0x45, 0x25, 0xe4, 0x9a, 0x77, 0xc8, 0xd5, 0xcf, 0x26, 0x33, 0x63, 0xeb, 0x5b, 0xb9, 0xc3, 0x43, 0x9b, 0x9e, 0xb3, + 0x86, 0x1f, 0xa8, 0xa7, 0xcf, 0x43, 0x54, 0x07, 0xae, 0x42, 0x2b, 0x63, 0xb9}; + // 00090080c60000060000000200640008000200010042000a183b9aca00603b9aca000018007800003400734500093c0f800a0021f0b7361c5664273e5b04b7020742023e060009f107000700375266c101091b0774657374313233066d6e63303730066d636339303104677072730501c0a80302270e8080210a0300000a810608080808500bf609f107800101f67e72691309f10700012305f4f67e7269006b000518000c0000004900204525e49a77c8d5cf263363eb5bb9c3439b9eb3861fa8a7cf435407ae422b63b9 + + cbit_ref bref(&s1ap_msg[0], sizeof(s1ap_msg)); + s1ap_pdu_c pdu; + TESTASSERT(pdu.unpack(bref) == SRSASN_SUCCESS); + + TESTASSERT(pdu.type().value == s1ap_pdu_c::types_opts::init_msg); + TESTASSERT(pdu.init_msg().proc_code == 9); + TESTASSERT(pdu.init_msg().crit.value == crit_opts::reject); + s1ap_elem_procs_o::init_msg_c& init_choice = pdu.init_msg().value; + auto& ctxt_setup = init_choice.init_context_setup_request().protocol_ies; + TESTASSERT(ctxt_setup.ue_security_cap.id == 107); + TESTASSERT(ctxt_setup.ue_security_cap.value.encryption_algorithms.to_string() == "1100000000000000"); + TESTASSERT(ctxt_setup.ue_security_cap.value.integrity_protection_algorithms.to_string() == "1100000000000000"); + + TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS); + + return SRSLTE_SUCCESS; +} + +template +bool is_same_type(U& u) +{ + return std::is_same::value; +} + +int test_proc_id_consistency() +{ + s1ap_pdu_c pdu; + + /* Check IDs */ + TESTASSERT(ASN1_S1AP_ID_HO_PREP == 0); + TESTASSERT(ASN1_S1AP_ID_HO_RES_ALLOC == 1); + TESTASSERT(ASN1_S1AP_ID_ERAB_SETUP == 5); + TESTASSERT(ASN1_S1AP_ID_INIT_CONTEXT_SETUP == 9); + + /* Unsuccessful case */ + unsuccessful_outcome_s& unsuc = pdu.set_unsuccessful_outcome(); + // HandoverPreparation + TESTASSERT(unsuc.load_info_obj(ASN1_S1AP_ID_HO_PREP)); + TESTASSERT(unsuc.proc_code == ASN1_S1AP_ID_HO_PREP); + TESTASSERT(unsuc.crit.value == crit_opts::reject); + TESTASSERT(unsuc.value.type().value == s1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::ho_prep_fail); + TESTASSERT(is_same_type(unsuc.value.ho_prep_fail())); + // HandoverResourceAllocation + TESTASSERT(unsuc.load_info_obj(ASN1_S1AP_ID_HO_RES_ALLOC)); + TESTASSERT(unsuc.proc_code == ASN1_S1AP_ID_HO_RES_ALLOC); + TESTASSERT(unsuc.crit.value == crit_opts::reject); + TESTASSERT(unsuc.value.type().value == s1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::ho_fail); + TESTASSERT(is_same_type(unsuc.value.ho_fail())); + // e-RABSetup (No Unsuccessful Outcome) + { + srslte::scoped_log sink("ASN1::S1AP"); + TESTASSERT(not unsuc.load_info_obj(ASN1_S1AP_ID_ERAB_SETUP)); + TESTASSERT(sink->error_counter == 1); + } + // initialContextSetup + TESTASSERT(unsuc.load_info_obj(ASN1_S1AP_ID_INIT_CONTEXT_SETUP)); + TESTASSERT(unsuc.proc_code == ASN1_S1AP_ID_INIT_CONTEXT_SETUP); + TESTASSERT(unsuc.crit.value == crit_opts::reject); + TESTASSERT(is_same_type(unsuc.value.init_context_setup_fail())); + + return SRSLTE_SUCCESS; +} + +int main() +{ + srslte::logmap::set_default_log_level(srslte::LOG_LEVEL_DEBUG); + TESTASSERT(srslte::logmap::get("ASN1")->get_level() == srslte::LOG_LEVEL_DEBUG); + + TESTASSERT(test_s1setup_request() == 0); + TESTASSERT(test_init_ctxt_setup_req() == 0); + TESTASSERT(test_proc_id_consistency() == 0); + + printf("Success\n"); + return 0; +} diff --git a/lib/test/asn1/s1ap_test.cc b/lib/test/asn1/s1ap_test.cc index 03b72c010..fb00d2c9d 100644 --- a/lib/test/asn1/s1ap_test.cc +++ b/lib/test/asn1/s1ap_test.cc @@ -61,7 +61,7 @@ int test_initial_ctxt_setup_response() tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_INIT_CONTEXT_SETUP); // Fill in the MME and eNB IDs - auto& container = tx_pdu.successful_outcome().value.init_context_setup_request().protocol_ies; + auto& container = tx_pdu.successful_outcome().value.init_context_setup_resp().protocol_ies; container.mme_ue_s1ap_id.value = 1; container.enb_ue_s1ap_id.value = 1; @@ -133,7 +133,7 @@ int test_eci_pack() int main() { - srslte::logmap::set_default_log_level(LOG_LEVEL_DEBUG); + srslte::logmap::set_default_log_level(srslte::LOG_LEVEL_DEBUG); srslte::logmap::set_default_hex_limit(1024); TESTASSERT(unpack_test_served_gummeis_with_multiple_plmns() == SRSLTE_SUCCESS); diff --git a/srsenb/hdr/stack/enb_stack_lte.h b/srsenb/hdr/stack/enb_stack_lte.h index 91a666c07..9c4431480 100644 --- a/srsenb/hdr/stack/enb_stack_lte.h +++ b/srsenb/hdr/stack/enb_stack_lte.h @@ -153,7 +153,6 @@ private: srslte::log_filter s1ap_log; srslte::log_filter gtpu_log; srslte::log_filter stack_log; - srslte::log_filter asn1_log, rrc_asn1_log; // RAT-specific interfaces phy_interface_stack_lte* phy = nullptr; diff --git a/srsenb/src/stack/enb_stack_lte.cc b/srsenb/src/stack/enb_stack_lte.cc index e0605069e..2d0c816de 100644 --- a/srsenb/src/stack/enb_stack_lte.cc +++ b/srsenb/src/stack/enb_stack_lte.cc @@ -78,8 +78,6 @@ int enb_stack_lte::init(const stack_args_t& args_, const rrc_cfg_t& rrc_cfg_) gtpu_log.init("GTPU", logger); s1ap_log.init("S1AP", logger); stack_log.init("STACK", logger); - asn1_log.init("ASN1", logger); - rrc_asn1_log.init("ASN1::RRC", logger); // Init logs mac_log.set_level(args.log.mac_level); @@ -89,8 +87,6 @@ int enb_stack_lte::init(const stack_args_t& args_, const rrc_cfg_t& rrc_cfg_) gtpu_log.set_level(args.log.gtpu_level); s1ap_log.set_level(args.log.s1ap_level); stack_log.set_level(LOG_LEVEL_INFO); - asn1_log.set_level(LOG_LEVEL_INFO); - rrc_asn1_log.set_level(args.log.rrc_level); mac_log.set_hex_limit(args.log.mac_hex_limit); rlc_log.set_hex_limit(args.log.rlc_hex_limit); @@ -99,10 +95,6 @@ int enb_stack_lte::init(const stack_args_t& args_, const rrc_cfg_t& rrc_cfg_) gtpu_log.set_hex_limit(args.log.gtpu_hex_limit); s1ap_log.set_hex_limit(args.log.s1ap_hex_limit); stack_log.set_hex_limit(128); - asn1_log.set_hex_limit(128); - asn1::srsasn_log_register_handler(&asn1_log); - rrc_asn1_log.set_hex_limit(args.log.rrc_hex_limit); - asn1::rrc::rrc_log_register_handler(&rrc_log); // Set up pcap and trace if (args.pcap.enable) { diff --git a/srsenb/src/stack/upper/s1ap.cc b/srsenb/src/stack/upper/s1ap.cc index 88473701f..cef4cb0e0 100644 --- a/srsenb/src/stack/upper/s1ap.cc +++ b/srsenb/src/stack/upper/s1ap.cc @@ -571,10 +571,10 @@ bool s1ap::handle_initiatingmessage(const init_msg_s& msg) bool s1ap::handle_successfuloutcome(const successful_outcome_s& msg) { switch (msg.value.type().value) { - case s1ap_elem_procs_o::successful_outcome_c::types_opts::s1_setup_request: - return handle_s1setupresponse(msg.value.s1_setup_request()); - case s1ap_elem_procs_o::successful_outcome_c::types_opts::ho_required: - return handle_s1hocommand(msg.value.ho_required()); + case s1ap_elem_procs_o::successful_outcome_c::types_opts::s1_setup_resp: + return handle_s1setupresponse(msg.value.s1_setup_resp()); + case s1ap_elem_procs_o::successful_outcome_c::types_opts::ho_cmd: + return handle_s1hocommand(msg.value.ho_cmd()); default: s1ap_log->error("Unhandled successful outcome message: %s\n", msg.value.type().to_string().c_str()); } @@ -584,10 +584,10 @@ bool s1ap::handle_successfuloutcome(const successful_outcome_s& msg) bool s1ap::handle_unsuccessfuloutcome(const unsuccessful_outcome_s& msg) { switch (msg.value.type().value) { - case s1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::s1_setup_request: - return handle_s1setupfailure(msg.value.s1_setup_request()); - case s1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::ho_required: - return handle_hopreparationfailure(msg.value.ho_required()); + case s1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::s1_setup_fail: + return handle_s1setupfailure(msg.value.s1_setup_fail()); + case s1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::ho_prep_fail: + return handle_hopreparationfailure(msg.value.ho_prep_fail()); default: s1ap_log->error("Unhandled unsuccessful outcome message: %s\n", msg.value.type().to_string().c_str()); } @@ -906,7 +906,7 @@ bool s1ap::ue::send_uectxtreleasecomplete() s1ap_pdu_c tx_pdu; tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_UE_CONTEXT_RELEASE); - auto& container = tx_pdu.successful_outcome().value.ue_context_release_cmd().protocol_ies; + auto& container = tx_pdu.successful_outcome().value.ue_context_release_complete().protocol_ies; container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id; @@ -923,10 +923,10 @@ bool s1ap::ue::send_initial_ctxt_setup_response(const asn1::s1ap::init_context_s tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_INIT_CONTEXT_SETUP); // Copy in the provided response message - tx_pdu.successful_outcome().value.init_context_setup_request() = res_; + tx_pdu.successful_outcome().value.init_context_setup_resp() = res_; // Fill in the MME and eNB IDs - auto& container = tx_pdu.successful_outcome().value.init_context_setup_request().protocol_ies; + auto& container = tx_pdu.successful_outcome().value.init_context_setup_resp().protocol_ies; container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id; container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; @@ -952,7 +952,7 @@ bool s1ap::ue::send_erab_setup_response(const erab_setup_resp_s& res_) asn1::s1ap::s1ap_pdu_c tx_pdu; tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_ERAB_SETUP); - erab_setup_resp_s& res = tx_pdu.successful_outcome().value.erab_setup_request(); + erab_setup_resp_s& res = tx_pdu.successful_outcome().value.erab_setup_resp(); res = res_; @@ -984,7 +984,7 @@ bool s1ap::ue::send_initial_ctxt_setup_failure() s1ap_pdu_c tx_pdu; tx_pdu.set_unsuccessful_outcome().load_info_obj(ASN1_S1AP_ID_INIT_CONTEXT_SETUP); - auto& container = tx_pdu.unsuccessful_outcome().value.init_context_setup_request().protocol_ies; + auto& container = tx_pdu.unsuccessful_outcome().value.init_context_setup_fail().protocol_ies; container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id; @@ -1001,7 +1001,7 @@ bool s1ap::ue::send_uectxtmodifyresp() s1ap_pdu_c tx_pdu; tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_UE_CONTEXT_MOD); - auto& container = tx_pdu.successful_outcome().value.ue_context_mod_request().protocol_ies; + auto& container = tx_pdu.successful_outcome().value.ue_context_mod_resp().protocol_ies; container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id; @@ -1017,7 +1017,7 @@ bool s1ap::ue::send_uectxtmodifyfailure(const cause_c& cause) s1ap_pdu_c tx_pdu; tx_pdu.set_unsuccessful_outcome().load_info_obj(ASN1_S1AP_ID_UE_CONTEXT_MOD); - auto& container = tx_pdu.unsuccessful_outcome().value.ue_context_mod_request().protocol_ies; + auto& container = tx_pdu.unsuccessful_outcome().value.ue_context_mod_fail().protocol_ies; container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id; diff --git a/srsue/hdr/stack/ue_stack_lte.h b/srsue/hdr/stack/ue_stack_lte.h index 66613f440..773ba25e7 100644 --- a/srsue/hdr/stack/ue_stack_lte.h +++ b/srsue/hdr/stack/ue_stack_lte.h @@ -145,8 +145,6 @@ private: srslte::log_filter rrc_log; srslte::log_filter usim_log; srslte::log_filter pool_log; - srslte::log_filter asn1_log; - srslte::log_filter rrc_asn1_log; // stack components srsue::mac mac; diff --git a/srsue/src/stack/ue_stack_lte.cc b/srsue/src/stack/ue_stack_lte.cc index 17688ebc3..046b01fb3 100644 --- a/srsue/src/stack/ue_stack_lte.cc +++ b/srsue/src/stack/ue_stack_lte.cc @@ -88,8 +88,6 @@ int ue_stack_lte::init(const stack_args_t& args_, srslte::logger* logger_) pdcp_log.init("PDCP", logger); rrc_log.init("RRC ", logger); usim_log.init("USIM", logger); - asn1_log.init("ASN1", logger); - rrc_asn1_log.init("ASN1::RRC", logger); pool_log.init("POOL", logger); pool_log.set_level(srslte::LOG_LEVEL_ERROR); @@ -100,18 +98,12 @@ int ue_stack_lte::init(const stack_args_t& args_, srslte::logger* logger_) pdcp_log.set_level(args.log.pdcp_level); rrc_log.set_level(args.log.rrc_level); usim_log.set_level(args.log.usim_level); - asn1_log.set_level(LOG_LEVEL_INFO); - rrc_asn1_log.set_level(args.log.rrc_level); mac_log.set_hex_limit(args.log.mac_hex_limit); rlc_log.set_hex_limit(args.log.rlc_hex_limit); pdcp_log.set_hex_limit(args.log.pdcp_hex_limit); rrc_log.set_hex_limit(args.log.rrc_hex_limit); usim_log.set_hex_limit(args.log.usim_hex_limit); - asn1_log.set_hex_limit(128); - rrc_asn1_log.set_hex_limit(args.log.rrc_hex_limit); - asn1::srsasn_log_register_handler(&asn1_log); - asn1::rrc::rrc_log_register_handler(&rrc_log); // Set NAS log srslte::log_ref log_ptr = logmap::get("NAS");